| Index: test/cctest/compiler/test-run-variables.cc
|
| diff --git a/test/cctest/compiler/test-run-variables.cc b/test/cctest/compiler/test-run-variables.cc
|
| index f85636850924ba5e0e26eadb0ef62333fb8ade7a..6997967b42cb9f7d885be3868f837ad724430ce8 100644
|
| --- a/test/cctest/compiler/test-run-variables.cc
|
| +++ b/test/cctest/compiler/test-run-variables.cc
|
| @@ -15,7 +15,6 @@ static const char* load_tests[] = {
|
| "var x = (r = x)", "undefined", "undefined",
|
| "var x = (a?1:2); r = x", "1", "2",
|
| "const x = a; r = x", "123", "0",
|
| - "const x = (r = x)", "undefined", "undefined",
|
| "const x = (a?3:4); r = x", "3", "4",
|
| "'use strict'; const x = a; r = x", "123", "0",
|
| "'use strict'; const x = (r = x)", throws, throws,
|
| @@ -29,9 +28,6 @@ static const char* store_tests[] = {
|
| "var x = 1; x = a; r = x", "123", "0",
|
| "var x = (a?(x=4,2):3); r = x", "2", "3",
|
| "var x = (a?4:5); x = a; r = x", "123", "0",
|
| - "const x = 1; x = a; r = x", "1", "1",
|
| - "const x = (a?(x=4,2):3); r = x", "2", "3",
|
| - "const x = (a?4:5); x = a; r = x", "4", "5",
|
| // Assignments to 'const' are SyntaxErrors, handled by the parser,
|
| // hence we cannot test them here because they are early errors.
|
| "'use strict'; let x = 1; x = a; r = x", "123", "0",
|
| @@ -39,16 +35,8 @@ static const char* store_tests[] = {
|
| "'use strict'; let x = (a?4:5); x = a; r = x", "123", "0",
|
| NULL};
|
|
|
| -static const char* bind_tests[] = {
|
| - "if (a) { const x = a }; r = x;", "123", "undefined",
|
| - "for (; a > 0; a--) { const x = a }; r = x", "123", "undefined",
|
| - // Re-initialization of variables other than legacy 'const' is not
|
| - // possible due to sane variable scoping, hence no tests here.
|
| - NULL};
|
| -
|
|
|
| static void RunVariableTests(const char* source, const char* tests[]) {
|
| - i::FLAG_legacy_const = true;
|
| EmbeddedVector<char, 512> buffer;
|
|
|
| for (int i = 0; tests[i] != NULL; i += 3) {
|
| @@ -99,18 +87,6 @@ TEST(ContextStoreVariables) {
|
| }
|
|
|
|
|
| -TEST(StackInitializeVariables) {
|
| - const char* source = "(function(a,r) { %s; return r; })";
|
| - RunVariableTests(source, bind_tests);
|
| -}
|
| -
|
| -
|
| -TEST(ContextInitializeVariables) {
|
| - const char* source = "(function(a,r) { %s; function f() {x} return r; })";
|
| - RunVariableTests(source, bind_tests);
|
| -}
|
| -
|
| -
|
| TEST(SelfReferenceVariable) {
|
| FunctionTester T("(function self() { return self; })");
|
|
|
|
|