Reviewers: Jakob,
Description:
Merged r12600 into 3.13 branch.
Bump number of allowed variables per scope to 65535, to address GWT.
BUG=151625
[email protected]
Please review this at https://codereview.chromium.org/10973012/
SVN Base: https://v8.googlecode.com/svn/branches/3.13
Affected files:
M src/messages.js
M src/parser.h
M src/version.cc
M test/mjsunit/limit-locals.js
Index: src/messages.js
diff --git a/src/messages.js b/src/messages.js
index
b819724a1034957e0422da4deb6fd8176db5140f..d896ac3944a5763fe1f648c8915baf414f6852c4
100644
--- a/src/messages.js
+++ b/src/messages.js
@@ -229,7 +229,7 @@ function FormatMessage(message) {
"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
32767 allowed)"],
+ "too_many_variables", ["Too many variables declared (only
65535 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"],
Index: src/parser.h
diff --git a/src/parser.h b/src/parser.h
index
1ab7a141be72b526f2a7433e22009050357210a5..93dd03a63b201d986e8d9c09cdc6342653619daf
100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -454,7 +454,7 @@ class Parser {
// 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 = 32767;
+ static const int kMaxNumFunctionLocals = 65535;
enum Mode {
PARSE_LAZILY,
Index: src/version.cc
diff --git a/src/version.cc b/src/version.cc
index
628665caf198203612be2da7d4745691cb6354c9..5654d3cf26dc3858ea9635837b8742dc9670fad3
100644
--- a/src/version.cc
+++ b/src/version.cc
@@ -35,7 +35,7 @@
#define MAJOR_VERSION 3
#define MINOR_VERSION 13
#define BUILD_NUMBER 7
-#define PATCH_LEVEL 1
+#define PATCH_LEVEL 2
// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)
#define IS_CANDIDATE_VERSION 0
Index: test/mjsunit/limit-locals.js
diff --git a/test/mjsunit/limit-locals.js b/test/mjsunit/limit-locals.js
index
ad9ec43686e9366f7d7b4f4ddec3b1af7f6566c7..22f895c71492365bbdf69ef4d037bd05fc297bfc
100644
--- a/test/mjsunit/limit-locals.js
+++ b/test/mjsunit/limit-locals.js
@@ -25,7 +25,7 @@
// (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 32767 locals.
+// Test that there is a limit of 65535 locals.
function function_with_n_locals(n) {
test_prefix = "prefix ";
@@ -41,6 +41,7 @@ function function_with_n_locals(n) {
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));
-assertThrows("function_with_n_locals(32768)");
+assertThrows("function_with_n_locals(65536)");
assertThrows("function_with_n_locals(100000)");
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev