Commit 29ede2bf authored by marja's avatar marja Committed by Commit bot

test-parsing/NoPessimisticContextAllocation: add a missing test

The "sloppy eval in default param" cases will be useful for the future
tests which assert that parser and preparser produce the same scopes.

BUG=v8:5501, v8:5516

Review-Url: https://codereview.chromium.org/2644333002
Cr-Commit-Position: refs/heads/master@{#42625}
parent 3dea55b4
......@@ -8713,9 +8713,9 @@ TEST(NoPessimisticContextAllocation) {
// Context allocating because we need to:
{"", "my_var;", true},
{"", "if (true) { let my_var; } my_var;", true},
{"", "eval(\"foo\");", true},
{"", "eval('foo');", true},
{"", "function inner2() { my_var; }", true},
{"", "function inner2() { eval(\"foo\"); }", true},
{"", "function inner2() { eval('foo'); }", true},
{"", "var {my_var : a} = {my_var};", true},
{"", "let {my_var : a} = {my_var};", true},
{"", "const {my_var : a} = {my_var};", true},
......@@ -8728,6 +8728,8 @@ TEST(NoPessimisticContextAllocation) {
{"[a] = [my_var]", "", true},
{"", "function inner2([a] = [my_var]) { }", true},
{"", "([a] = [my_var]) => { }", true},
{"", "function inner2(a = eval('')) { }", true},
{"", "(a = eval('')) => { }", true},
{"", "try { } catch (my_var) { } my_var;", true},
{"", "for (my_var in {}) { my_var; }", true},
{"", "for (my_var in {}) { }", true},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment