Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Unified Diff: test/cctest/test-parsing.cc

Issue 8417035: Introduce extended mode. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed more comments. Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/x64/stub-cache-x64.cc ('k') | test/mjsunit/debug-scopes.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-parsing.cc
diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc
index 00d200a6c85a533b7119f61bdc56f7ea0292969c..c2bde79b13b28a4333c95f781b3eeb4fd27a5d6f 100755
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -758,76 +758,82 @@ TEST(ScopePositions) {
const char* inner_source;
const char* outer_suffix;
i::ScopeType scope_type;
+ i::LanguageMode language_mode;
};
const SourceData source_data[] = {
- { " with ({}) ", "{ block; }", " more;", i::WITH_SCOPE },
- { " with ({}) ", "{ block; }", "; more;", i::WITH_SCOPE },
+ { " with ({}) ", "{ block; }", " more;", i::WITH_SCOPE, i::CLASSIC_MODE },
+ { " with ({}) ", "{ block; }", "; more;", i::WITH_SCOPE, i::CLASSIC_MODE },
{ " with ({}) ", "{\n"
" block;\n"
" }", "\n"
- " more;", i::WITH_SCOPE },
- { " with ({}) ", "statement;", " more;", i::WITH_SCOPE },
+ " more;", i::WITH_SCOPE, i::CLASSIC_MODE },
+ { " with ({}) ", "statement;", " more;", i::WITH_SCOPE, i::CLASSIC_MODE },
{ " with ({}) ", "statement", "\n"
- " more;", i::WITH_SCOPE },
+ " more;", i::WITH_SCOPE, i::CLASSIC_MODE },
{ " with ({})\n"
" ", "statement;", "\n"
- " more;", i::WITH_SCOPE },
- { " try {} catch ", "(e) { block; }", " more;", i::CATCH_SCOPE },
- { " try {} catch ", "(e) { block; }", "; more;", i::CATCH_SCOPE },
+ " more;", i::WITH_SCOPE, i::CLASSIC_MODE },
+ { " try {} catch ", "(e) { block; }", " more;",
+ i::CATCH_SCOPE, i::CLASSIC_MODE },
+ { " try {} catch ", "(e) { block; }", "; more;",
+ i::CATCH_SCOPE, i::CLASSIC_MODE },
{ " try {} catch ", "(e) {\n"
" block;\n"
" }", "\n"
- " more;", i::CATCH_SCOPE },
+ " more;", i::CATCH_SCOPE, i::CLASSIC_MODE },
{ " try {} catch ", "(e) { block; }", " finally { block; } more;",
- i::CATCH_SCOPE },
+ i::CATCH_SCOPE, i::CLASSIC_MODE },
{ " start;\n"
- " ", "{ let block; }", " more;", i::BLOCK_SCOPE },
+ " ", "{ let block; }", " more;", i::BLOCK_SCOPE, i::EXTENDED_MODE },
{ " start;\n"
- " ", "{ let block; }", "; more;", i::BLOCK_SCOPE },
+ " ", "{ let block; }", "; more;", i::BLOCK_SCOPE, i::EXTENDED_MODE },
{ " start;\n"
" ", "{\n"
" let block;\n"
" }", "\n"
- " more;", i::BLOCK_SCOPE },
+ " more;", i::BLOCK_SCOPE, i::EXTENDED_MODE },
{ " start;\n"
" function fun", "(a,b) { infunction; }", " more;",
- i::FUNCTION_SCOPE },
+ i::FUNCTION_SCOPE, i::CLASSIC_MODE },
{ " start;\n"
" function fun", "(a,b) {\n"
" infunction;\n"
" }", "\n"
- " more;", i::FUNCTION_SCOPE },
+ " more;", i::FUNCTION_SCOPE, i::CLASSIC_MODE },
{ " (function fun", "(a,b) { infunction; }", ")();",
- i::FUNCTION_SCOPE },
+ i::FUNCTION_SCOPE, i::CLASSIC_MODE },
{ " for ", "(let x = 1 ; x < 10; ++ x) { block; }", " more;",
- i::BLOCK_SCOPE },
+ i::BLOCK_SCOPE, i::EXTENDED_MODE },
{ " for ", "(let x = 1 ; x < 10; ++ x) { block; }", "; more;",
- i::BLOCK_SCOPE },
+ i::BLOCK_SCOPE, i::EXTENDED_MODE },
{ " for ", "(let x = 1 ; x < 10; ++ x) {\n"
" block;\n"
" }", "\n"
- " more;", i::BLOCK_SCOPE },
+ " more;", i::BLOCK_SCOPE, i::EXTENDED_MODE },
{ " for ", "(let x = 1 ; x < 10; ++ x) statement;", " more;",
- i::BLOCK_SCOPE },
+ i::BLOCK_SCOPE, i::EXTENDED_MODE },
{ " for ", "(let x = 1 ; x < 10; ++ x) statement", "\n"
- " more;", i::BLOCK_SCOPE },
+ " more;", i::BLOCK_SCOPE, i::EXTENDED_MODE },
{ " for ", "(let x = 1 ; x < 10; ++ x)\n"
" statement;", "\n"
- " more;", i::BLOCK_SCOPE },
- { " for ", "(let x in {}) { block; }", " more;", i::BLOCK_SCOPE },
- { " for ", "(let x in {}) { block; }", "; more;", i::BLOCK_SCOPE },
+ " more;", i::BLOCK_SCOPE, i::EXTENDED_MODE },
+ { " for ", "(let x in {}) { block; }", " more;",
+ i::BLOCK_SCOPE, i::EXTENDED_MODE },
+ { " for ", "(let x in {}) { block; }", "; more;",
+ i::BLOCK_SCOPE, i::EXTENDED_MODE },
{ " for ", "(let x in {}) {\n"
" block;\n"
" }", "\n"
- " more;", i::BLOCK_SCOPE },
- { " for ", "(let x in {}) statement;", " more;", i::BLOCK_SCOPE },
+ " more;", i::BLOCK_SCOPE, i::EXTENDED_MODE },
+ { " for ", "(let x in {}) statement;", " more;",
+ i::BLOCK_SCOPE, i::EXTENDED_MODE },
{ " for ", "(let x in {}) statement", "\n"
- " more;", i::BLOCK_SCOPE },
+ " more;", i::BLOCK_SCOPE, i::EXTENDED_MODE },
{ " for ", "(let x in {})\n"
" statement;", "\n"
- " more;", i::BLOCK_SCOPE },
- { NULL, NULL, NULL, i::EVAL_SCOPE }
+ " more;", i::BLOCK_SCOPE, i::EXTENDED_MODE },
+ { NULL, NULL, NULL, i::EVAL_SCOPE, i::CLASSIC_MODE }
};
v8::HandleScope handles;
@@ -857,7 +863,7 @@ TEST(ScopePositions) {
i::Parser parser(script, false, NULL, NULL);
parser.SetHarmonyScoping(true);
i::FunctionLiteral* function =
- parser.ParseProgram(source, true, i::kNonStrictMode);
+ parser.ParseProgram(source, true, source_data[i].language_mode);
ASSERT(function != NULL);
// Check scope types and positions.
« no previous file with comments | « src/x64/stub-cache-x64.cc ('k') | test/mjsunit/debug-scopes.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698