Update V8 to version 4.1.0.21
This is a cherry-pick of all commits up to and including the
4.1.0.21 cherry-pick in Chromium.
Original commit message:
Version 4.1.0.21 (cherry-pick)
Merged 206e9136bde0f2b5ae8cb77afbb1e7833e5bd412
Unlink pages from the space page list after evacuation.
BUG=430201
LOG=N
R=jkummerow@chromium.org
Review URL: https://codereview.chromium.org/953813002
Cr-Commit-Position: refs/branch-heads/4.1@{#22}
Cr-Branched-From: 2e08d2a7aa9d65d269d8c57aba82eb38a8cb0a18-refs/heads/candidates@{#25353}
---
FPIIM-449
Change-Id: I8c23c7bbb70772b4858fe8a47b64fa97ee0d1f8c
diff --git a/test/preparser/strict-function-statement.pyt b/test/preparser/strict-function-statement.pyt
index 08c4288..cc3d7bb 100644
--- a/test/preparser/strict-function-statement.pyt
+++ b/test/preparser/strict-function-statement.pyt
@@ -29,71 +29,81 @@
# A template that performs the same strict-mode test in different
# scopes (global scope, function scope, and nested function scope).
-def StrictTest(name, source):
- Test(name, '"use strict";\n' + source, "strict_function")
+def StrictTest(name, source, legacy):
+ if legacy:
+ extra_flags = [
+ "--noharmony-scoping",
+ "--noharmony-classes",
+ "--noharmony-object-literals"]
+ else:
+ extra_flags = []
+ Test(name, '"use strict";\n' + source, "strict_function",
+ extra_flags)
Test(name + '-infunc',
'function foo() {\n "use strict";\n' + source +'\n}\n',
- "strict_function")
+ "strict_function",
+ extra_flags)
Test(name + '-infunc2',
'function foo() {\n "use strict";\n function bar() {\n' +
source +'\n }\n}\n',
- "strict_function")
+ "strict_function",
+ extra_flags)
# Not testing with-scope, since with is not allowed in strict mode at all.
StrictTest("block", """
{ function foo() { } }
-""")
+""", True)
StrictTest("try-w-catch", """
try { function foo() { } } catch (e) { }
-""")
+""", True)
StrictTest("try-w-finally", """
try { function foo() { } } finally { }
-""")
+""", True)
StrictTest("catch", """
try { } catch (e) { function foo() { } }
-""")
+""", True)
StrictTest("finally", """
try { } finally { function foo() { } }
-""")
+""", True)
StrictTest("for", """
for (;;) { function foo() { } }
-""")
+""", True)
StrictTest("while", """
while (true) { function foo() { } }
-""")
+""", True)
StrictTest("do", """
do { function foo() { } } while (true);
-""")
+""", True)
StrictTest("then", """
if (true) { function foo() { } }
-""")
+""", True)
StrictTest("then-w-else", """
if (true) { function foo() { } } else { }
-""")
+""", True)
StrictTest("else", """
if (true) { } else { function foo() { } }
-""")
+""", True)
StrictTest("switch-case", """
switch (true) { case true: function foo() { } }
-""")
+""", False)
StrictTest("labeled", """
label: function foo() { }
-""")
+""", False)