Upgrade to V8 3.4
Merge 3.4.14.35
Simple merge required updates to makefiles only.
Bug: 568872
Change-Id: I403a38452c547e06fcfa951c12eca12a1bc40978
diff --git a/test/preparser/strict-identifiers.pyt b/test/preparser/strict-identifiers.pyt
index a0f4612..72808e2 100644
--- a/test/preparser/strict-identifiers.pyt
+++ b/test/preparser/strict-identifiers.pyt
@@ -164,6 +164,20 @@
x = {get $id() {}, set $id(value) {}};
""")
+identifier_name_source = """
+ var x = {$id: 42};
+ x = {get $id() {}, set $id(value) {}};
+ x.$id = 42;
+ function foo() { "use strict;" }
+ x = {$id: 42};
+ x = {get $id() {}, set $id(value) {}};
+ x.$id = 42;
+"""
+
+identifier_name = Template("identifier_name-$id", identifier_name_source)
+identifier_name_strict = StrictTemplate("identifier_name_strict-$id",
+ identifier_name_source)
+
# ----------------------------------------------------------------------
# Run tests
@@ -189,8 +203,12 @@
# Reserved words just throw the same exception in all cases
# (with "const" being special, as usual).
for reserved_word in reserved_words + strict_reserved_words:
- message = "strict_reserved_word"
- if (reserved_word == "const"): message = "unexpected_token"
+ if (reserved_word in strict_reserved_words):
+ message = "strict_reserved_word"
+ elif (reserved_word == "const"):
+ message = "unexpected_token"
+ else:
+ message = "reserved_word"
arg_name_own({"id":reserved_word}, message)
arg_name_nested({"id":reserved_word}, message)
setter_arg({"id": reserved_word}, message)
@@ -205,5 +223,11 @@
postfix_var({"id":reserved_word, "op":"++", "opname":"inc"}, message)
postfix_var({"id":reserved_word, "op":"--", "opname":"dec"}, message)
read_var({"id": reserved_word}, message)
+ identifier_name({"id": reserved_word}, None);
+ identifier_name_strict({"id": reserved_word}, None);
+# Future reserved words in strict mode behave like normal identifiers
+# in a non strict context.
+for reserved_word in strict_reserved_words:
+ non_strict_use({"id": id}, None)