Revision: 12698
Author:   [email protected]
Date:     Thu Oct 11 04:40:10 2012
Log:      Bump variable limit further to 2^17.

[email protected]
BUG=151625

Review URL: https://codereview.chromium.org/11099063
http://code.google.com/p/v8/source/detail?r=12698

Modified:
 /branches/bleeding_edge/src/messages.js
 /branches/bleeding_edge/src/parser.h
 /branches/bleeding_edge/test/mjsunit/limit-locals.js

=======================================
--- /branches/bleeding_edge/src/messages.js     Mon Sep 24 09:22:17 2012
+++ /branches/bleeding_edge/src/messages.js     Thu Oct 11 04:40:10 2012
@@ -229,7 +229,7 @@
"strict_catch_variable", ["Catch variable may not be eval or arguments in strict mode"], "too_many_arguments", ["Too many arguments in function call (only 32766 allowed)"], "too_many_parameters", ["Too many parameters in function definition (only 32766 allowed)"], - "too_many_variables", ["Too many variables declared (only 65535 allowed)"], + "too_many_variables", ["Too many variables declared (only 131071 allowed)"], "strict_param_name", ["Parameter name eval or arguments is not allowed in strict mode"], "strict_param_dupe", ["Strict mode function may not have duplicate parameter names"], "strict_var_name", ["Variable name may not be eval or arguments in strict mode"],
=======================================
--- /branches/bleeding_edge/src/parser.h        Fri Oct  5 02:14:08 2012
+++ /branches/bleeding_edge/src/parser.h        Thu Oct 11 04:40:10 2012
@@ -454,7 +454,7 @@
   // construct a hashable id, so if more than 2^17 are allowed, this
   // should be checked.
   static const int kMaxNumFunctionParameters = 32766;
-  static const int kMaxNumFunctionLocals = 65535;
+  static const int kMaxNumFunctionLocals = 131071;  // 2^17-1

   enum Mode {
     PARSE_LAZILY,
=======================================
--- /branches/bleeding_edge/test/mjsunit/limit-locals.js Mon Sep 24 09:22:17 2012 +++ /branches/bleeding_edge/test/mjsunit/limit-locals.js Thu Oct 11 04:40:10 2012
@@ -25,7 +25,9 @@
 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

-// Test that there is a limit of 65535 locals.
+// Test that there is a limit of 131071 locals.
+
+// Flags: --stack-size=721

 function function_with_n_locals(n) {
   test_prefix = "prefix ";
@@ -40,8 +42,6 @@

 assertEquals("prefix 0 suffix", function_with_n_locals(0));
 assertEquals("prefix 16000 suffix", function_with_n_locals(16000));
-assertEquals("prefix 32767 suffix", function_with_n_locals(32767));
-assertEquals("prefix 65535 suffix", function_with_n_locals(65535));
+assertEquals("prefix 131071 suffix", function_with_n_locals(131071));

-assertThrows("function_with_n_locals(65536)");
-assertThrows("function_with_n_locals(100000)");
+assertThrows("function_with_n_locals(131072)");

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to