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

Side by Side Diff: test/cctest/test-parsing.cc

Issue 2661933003: [ESnext] Parse dynamic import expression (Closed)
Patch Set: review fixes Created 3 years, 10 months 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 unified diff | Download patch
« src/runtime/runtime-module.cc ('K') | « src/runtime/runtime-module.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1267 matching lines...) Expand 10 before | Expand all | Expand 10 after
1278 } 1278 }
1279 1279
1280 enum ParserFlag { 1280 enum ParserFlag {
1281 kAllowLazy, 1281 kAllowLazy,
1282 kAllowNatives, 1282 kAllowNatives,
1283 kAllowHarmonyFunctionSent, 1283 kAllowHarmonyFunctionSent,
1284 kAllowHarmonyRestrictiveGenerators, 1284 kAllowHarmonyRestrictiveGenerators,
1285 kAllowHarmonyTrailingCommas, 1285 kAllowHarmonyTrailingCommas,
1286 kAllowHarmonyClassFields, 1286 kAllowHarmonyClassFields,
1287 kAllowHarmonyObjectRestSpread, 1287 kAllowHarmonyObjectRestSpread,
1288 kAllowHarmonyDynamicImport,
1288 }; 1289 };
1289 1290
1290 enum ParserSyncTestResult { 1291 enum ParserSyncTestResult {
1291 kSuccessOrError, 1292 kSuccessOrError,
1292 kSuccess, 1293 kSuccess,
1293 kError 1294 kError
1294 }; 1295 };
1295 1296
1296 void SetGlobalFlags(i::EnumSet<ParserFlag> flags) { 1297 void SetGlobalFlags(i::EnumSet<ParserFlag> flags) {
1297 i::FLAG_allow_natives_syntax = flags.Contains(kAllowNatives); 1298 i::FLAG_allow_natives_syntax = flags.Contains(kAllowNatives);
1298 i::FLAG_harmony_function_sent = flags.Contains(kAllowHarmonyFunctionSent); 1299 i::FLAG_harmony_function_sent = flags.Contains(kAllowHarmonyFunctionSent);
1299 i::FLAG_harmony_restrictive_generators = 1300 i::FLAG_harmony_restrictive_generators =
1300 flags.Contains(kAllowHarmonyRestrictiveGenerators); 1301 flags.Contains(kAllowHarmonyRestrictiveGenerators);
1301 i::FLAG_harmony_trailing_commas = flags.Contains(kAllowHarmonyTrailingCommas); 1302 i::FLAG_harmony_trailing_commas = flags.Contains(kAllowHarmonyTrailingCommas);
1302 i::FLAG_harmony_class_fields = flags.Contains(kAllowHarmonyClassFields); 1303 i::FLAG_harmony_class_fields = flags.Contains(kAllowHarmonyClassFields);
1303 i::FLAG_harmony_object_rest_spread = 1304 i::FLAG_harmony_object_rest_spread =
1304 flags.Contains(kAllowHarmonyObjectRestSpread); 1305 flags.Contains(kAllowHarmonyObjectRestSpread);
1306 i::FLAG_harmony_dynamic_import = flags.Contains(kAllowHarmonyDynamicImport);
1305 } 1307 }
1306 1308
1307 void SetParserFlags(i::PreParser* parser, i::EnumSet<ParserFlag> flags) { 1309 void SetParserFlags(i::PreParser* parser, i::EnumSet<ParserFlag> flags) {
1308 parser->set_allow_natives(flags.Contains(kAllowNatives)); 1310 parser->set_allow_natives(flags.Contains(kAllowNatives));
1309 parser->set_allow_harmony_function_sent( 1311 parser->set_allow_harmony_function_sent(
1310 flags.Contains(kAllowHarmonyFunctionSent)); 1312 flags.Contains(kAllowHarmonyFunctionSent));
1311 parser->set_allow_harmony_restrictive_generators( 1313 parser->set_allow_harmony_restrictive_generators(
1312 flags.Contains(kAllowHarmonyRestrictiveGenerators)); 1314 flags.Contains(kAllowHarmonyRestrictiveGenerators));
1313 parser->set_allow_harmony_trailing_commas( 1315 parser->set_allow_harmony_trailing_commas(
1314 flags.Contains(kAllowHarmonyTrailingCommas)); 1316 flags.Contains(kAllowHarmonyTrailingCommas));
1315 parser->set_allow_harmony_class_fields( 1317 parser->set_allow_harmony_class_fields(
1316 flags.Contains(kAllowHarmonyClassFields)); 1318 flags.Contains(kAllowHarmonyClassFields));
1317 parser->set_allow_harmony_object_rest_spread( 1319 parser->set_allow_harmony_object_rest_spread(
1318 flags.Contains(kAllowHarmonyObjectRestSpread)); 1320 flags.Contains(kAllowHarmonyObjectRestSpread));
1321 parser->set_allow_harmony_dynamic_import(
1322 flags.Contains(kAllowHarmonyDynamicImport));
1319 } 1323 }
1320 1324
1321 void TestParserSyncWithFlags(i::Handle<i::String> source, 1325 void TestParserSyncWithFlags(i::Handle<i::String> source,
1322 i::EnumSet<ParserFlag> flags, 1326 i::EnumSet<ParserFlag> flags,
1323 ParserSyncTestResult result, 1327 ParserSyncTestResult result,
1324 bool is_module = false, 1328 bool is_module = false, bool test_preparser = true,
1325 bool test_preparser = true) { 1329 bool ignore_error_msg = false) {
1326 i::Isolate* isolate = CcTest::i_isolate(); 1330 i::Isolate* isolate = CcTest::i_isolate();
1327 i::Factory* factory = isolate->factory(); 1331 i::Factory* factory = isolate->factory();
1328 1332
1329 uintptr_t stack_limit = isolate->stack_guard()->real_climit(); 1333 uintptr_t stack_limit = isolate->stack_guard()->real_climit();
1330 int preparser_materialized_literals = -1; 1334 int preparser_materialized_literals = -1;
1331 int parser_materialized_literals = -2; 1335 int parser_materialized_literals = -2;
1332 1336
1333 // Preparse the data. 1337 // Preparse the data.
1334 i::PendingCompilationErrorHandler pending_error_handler; 1338 i::PendingCompilationErrorHandler pending_error_handler;
1335 if (test_preparser) { 1339 if (test_preparser) {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
1392 v8::base::OS::Print( 1396 v8::base::OS::Print(
1393 "Parser failed on:\n" 1397 "Parser failed on:\n"
1394 "\t%s\n" 1398 "\t%s\n"
1395 "with error:\n" 1399 "with error:\n"
1396 "\t%s\n" 1400 "\t%s\n"
1397 "However, the preparser succeeded", 1401 "However, the preparser succeeded",
1398 source->ToCString().get(), message_string->ToCString().get()); 1402 source->ToCString().get(), message_string->ToCString().get());
1399 CHECK(false); 1403 CHECK(false);
1400 } 1404 }
1401 // Check that preparser and parser produce the same error. 1405 // Check that preparser and parser produce the same error.
1402 if (test_preparser) { 1406 if (test_preparser && !ignore_error_msg) {
1403 i::Handle<i::String> preparser_message = 1407 i::Handle<i::String> preparser_message =
1404 pending_error_handler.FormatMessage(CcTest::i_isolate()); 1408 pending_error_handler.FormatMessage(CcTest::i_isolate());
1405 if (!i::String::Equals(message_string, preparser_message)) { 1409 if (!i::String::Equals(message_string, preparser_message)) {
1406 v8::base::OS::Print( 1410 v8::base::OS::Print(
1407 "Expected parser and preparser to produce the same error on:\n" 1411 "Expected parser and preparser to produce the same error on:\n"
1408 "\t%s\n" 1412 "\t%s\n"
1409 "However, found the following error messages\n" 1413 "However, found the following error messages\n"
1410 "\tparser: %s\n" 1414 "\tparser: %s\n"
1411 "\tpreparser: %s\n", 1415 "\tpreparser: %s\n",
1412 source->ToCString().get(), message_string->ToCString().get(), 1416 source->ToCString().get(), message_string->ToCString().get(),
(...skipping 26 matching lines...) Expand all
1439 "Preparser materialized literals (%d) differ from Parser materialized " 1443 "Preparser materialized literals (%d) differ from Parser materialized "
1440 "literals (%d) on:\n" 1444 "literals (%d) on:\n"
1441 "\t%s\n" 1445 "\t%s\n"
1442 "However, parser and preparser succeeded", 1446 "However, parser and preparser succeeded",
1443 preparser_materialized_literals, parser_materialized_literals, 1447 preparser_materialized_literals, parser_materialized_literals,
1444 source->ToCString().get()); 1448 source->ToCString().get());
1445 CHECK(false); 1449 CHECK(false);
1446 } 1450 }
1447 } 1451 }
1448 1452
1449
1450 void TestParserSync(const char* source, const ParserFlag* varying_flags, 1453 void TestParserSync(const char* source, const ParserFlag* varying_flags,
1451 size_t varying_flags_length, 1454 size_t varying_flags_length,
1452 ParserSyncTestResult result = kSuccessOrError, 1455 ParserSyncTestResult result = kSuccessOrError,
1453 const ParserFlag* always_true_flags = NULL, 1456 const ParserFlag* always_true_flags = NULL,
1454 size_t always_true_flags_length = 0, 1457 size_t always_true_flags_length = 0,
1455 const ParserFlag* always_false_flags = NULL, 1458 const ParserFlag* always_false_flags = NULL,
1456 size_t always_false_flags_length = 0, 1459 size_t always_false_flags_length = 0,
1457 bool is_module = false, bool test_preparser = true) { 1460 bool is_module = false, bool test_preparser = true,
1461 bool ignore_error_msg = false) {
1458 i::Handle<i::String> str = 1462 i::Handle<i::String> str =
1459 CcTest::i_isolate()->factory()->NewStringFromAsciiChecked(source); 1463 CcTest::i_isolate()->factory()->NewStringFromAsciiChecked(source);
1460 for (int bits = 0; bits < (1 << varying_flags_length); bits++) { 1464 for (int bits = 0; bits < (1 << varying_flags_length); bits++) {
1461 i::EnumSet<ParserFlag> flags; 1465 i::EnumSet<ParserFlag> flags;
1462 for (size_t flag_index = 0; flag_index < varying_flags_length; 1466 for (size_t flag_index = 0; flag_index < varying_flags_length;
1463 ++flag_index) { 1467 ++flag_index) {
1464 if ((bits & (1 << flag_index)) != 0) flags.Add(varying_flags[flag_index]); 1468 if ((bits & (1 << flag_index)) != 0) flags.Add(varying_flags[flag_index]);
1465 } 1469 }
1466 for (size_t flag_index = 0; flag_index < always_true_flags_length; 1470 for (size_t flag_index = 0; flag_index < always_true_flags_length;
1467 ++flag_index) { 1471 ++flag_index) {
1468 flags.Add(always_true_flags[flag_index]); 1472 flags.Add(always_true_flags[flag_index]);
1469 } 1473 }
1470 for (size_t flag_index = 0; flag_index < always_false_flags_length; 1474 for (size_t flag_index = 0; flag_index < always_false_flags_length;
1471 ++flag_index) { 1475 ++flag_index) {
1472 flags.Remove(always_false_flags[flag_index]); 1476 flags.Remove(always_false_flags[flag_index]);
1473 } 1477 }
1474 TestParserSyncWithFlags(str, flags, result, is_module, test_preparser); 1478 TestParserSyncWithFlags(str, flags, result, is_module, test_preparser,
1479 ignore_error_msg);
1475 } 1480 }
1476 } 1481 }
1477 1482
1478 1483
1479 TEST(ParserSync) { 1484 TEST(ParserSync) {
1480 const char* context_data[][2] = { 1485 const char* context_data[][2] = {
1481 { "", "" }, 1486 { "", "" },
1482 { "{", "}" }, 1487 { "{", "}" },
1483 { "if (true) ", " else {}" }, 1488 { "if (true) ", " else {}" },
1484 { "if (true) {} else ", "" }, 1489 { "if (true) {} else ", "" },
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
1604 " }; \n" 1609 " }; \n"
1605 "}; \n"; 1610 "}; \n";
1606 v8_compile(v8_str(script)); 1611 v8_compile(v8_str(script));
1607 CHECK(try_catch.HasCaught()); 1612 CHECK(try_catch.HasCaught());
1608 v8::String::Utf8Value exception(try_catch.Exception()); 1613 v8::String::Utf8Value exception(try_catch.Exception());
1609 CHECK_EQ(0, 1614 CHECK_EQ(0,
1610 strcmp("SyntaxError: Octal literals are not allowed in strict mode.", 1615 strcmp("SyntaxError: Octal literals are not allowed in strict mode.",
1611 *exception)); 1616 *exception));
1612 } 1617 }
1613 1618
1614 1619 void RunParserSyncTest(
1615 void RunParserSyncTest(const char* context_data[][2], 1620 const char* context_data[][2], const char* statement_data[],
1616 const char* statement_data[], 1621 ParserSyncTestResult result, const ParserFlag* flags = NULL,
1617 ParserSyncTestResult result, 1622 int flags_len = 0, const ParserFlag* always_true_flags = NULL,
1618 const ParserFlag* flags = NULL, int flags_len = 0, 1623 int always_true_len = 0, const ParserFlag* always_false_flags = NULL,
1619 const ParserFlag* always_true_flags = NULL, 1624 int always_false_len = 0, bool is_module = false,
1620 int always_true_len = 0, 1625 bool test_preparser = true, bool ignore_error_msg = false) {
1621 const ParserFlag* always_false_flags = NULL,
1622 int always_false_len = 0, bool is_module = false,
1623 bool test_preparser = true) {
1624 v8::HandleScope handles(CcTest::isolate()); 1626 v8::HandleScope handles(CcTest::isolate());
1625 v8::Local<v8::Context> context = v8::Context::New(CcTest::isolate()); 1627 v8::Local<v8::Context> context = v8::Context::New(CcTest::isolate());
1626 v8::Context::Scope context_scope(context); 1628 v8::Context::Scope context_scope(context);
1627 1629
1628 CcTest::i_isolate()->stack_guard()->SetStackLimit( 1630 CcTest::i_isolate()->stack_guard()->SetStackLimit(
1629 i::GetCurrentStackPosition() - 128 * 1024); 1631 i::GetCurrentStackPosition() - 128 * 1024);
1630 1632
1631 // Experimental feature flags should not go here; pass the flags as 1633 // Experimental feature flags should not go here; pass the flags as
1632 // always_true_flags if the test needs them. 1634 // always_true_flags if the test needs them.
1633 static const ParserFlag default_flags[] = { 1635 static const ParserFlag default_flags[] = {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
1668 // Plug the source code pieces together. 1670 // Plug the source code pieces together.
1669 i::ScopedVector<char> program(kProgramSize + 1); 1671 i::ScopedVector<char> program(kProgramSize + 1);
1670 int length = i::SNPrintF(program, 1672 int length = i::SNPrintF(program,
1671 "%s%s%s", 1673 "%s%s%s",
1672 context_data[i][0], 1674 context_data[i][0],
1673 statement_data[j], 1675 statement_data[j],
1674 context_data[i][1]); 1676 context_data[i][1]);
1675 CHECK(length == kProgramSize); 1677 CHECK(length == kProgramSize);
1676 TestParserSync(program.start(), flags, flags_len, result, 1678 TestParserSync(program.start(), flags, flags_len, result,
1677 always_true_flags, always_true_len, always_false_flags, 1679 always_true_flags, always_true_len, always_false_flags,
1678 always_false_len, is_module, test_preparser); 1680 always_false_len, is_module, test_preparser,
1681 ignore_error_msg);
1679 } 1682 }
1680 } 1683 }
1681 delete[] generated_flags; 1684 delete[] generated_flags;
1682 } 1685 }
1683 1686
1684 1687 void RunModuleParserSyncTest(
1685 void RunModuleParserSyncTest(const char* context_data[][2], 1688 const char* context_data[][2], const char* statement_data[],
1686 const char* statement_data[], 1689 ParserSyncTestResult result, const ParserFlag* flags = NULL,
1687 ParserSyncTestResult result, 1690 int flags_len = 0, const ParserFlag* always_true_flags = NULL,
1688 const ParserFlag* flags = NULL, int flags_len = 0, 1691 int always_true_len = 0, const ParserFlag* always_false_flags = NULL,
1689 const ParserFlag* always_true_flags = NULL, 1692 int always_false_len = 0, bool test_preparser = true,
1690 int always_true_len = 0, 1693 bool ignore_error_msg = false) {
1691 const ParserFlag* always_false_flags = NULL,
1692 int always_false_len = 0,
1693 bool test_preparser = true) {
1694 RunParserSyncTest(context_data, statement_data, result, flags, flags_len, 1694 RunParserSyncTest(context_data, statement_data, result, flags, flags_len,
1695 always_true_flags, always_true_len, always_false_flags, 1695 always_true_flags, always_true_len, always_false_flags,
1696 always_false_len, true, test_preparser); 1696 always_false_len, true, test_preparser, ignore_error_msg);
1697 } 1697 }
1698 1698
1699 1699
1700 TEST(ErrorsEvalAndArguments) { 1700 TEST(ErrorsEvalAndArguments) {
1701 // Tests that both preparsing and parsing produce the right kind of errors for 1701 // Tests that both preparsing and parsing produce the right kind of errors for
1702 // using "eval" and "arguments" as identifiers. Without the strict mode, it's 1702 // using "eval" and "arguments" as identifiers. Without the strict mode, it's
1703 // ok to use "eval" or "arguments" as identifiers. With the strict mode, it 1703 // ok to use "eval" or "arguments" as identifiers. With the strict mode, it
1704 // isn't. 1704 // isn't.
1705 const char* context_data[][2] = { 1705 const char* context_data[][2] = {
1706 {"\"use strict\";", ""}, 1706 {"\"use strict\";", ""},
(...skipping 2428 matching lines...) Expand 10 before | Expand all | Expand 10 after
4135 "new super(12, 45)", 4135 "new super(12, 45)",
4136 "new new super", 4136 "new new super",
4137 "new new super()", 4137 "new new super()",
4138 "new new super()()", 4138 "new new super()()",
4139 NULL 4139 NULL
4140 }; 4140 };
4141 4141
4142 RunParserSyncTest(context_data, expression_data, kError); 4142 RunParserSyncTest(context_data, expression_data, kError);
4143 } 4143 }
4144 4144
4145 TEST(ImportExpressionSuccess) {
4146 // clang-format off
4147 const char* context_data[][2] = {
4148 {"", ""},
4149 {NULL, NULL}
4150 };
4151
4152 const char* data[] = {
4153 "new import(x)",
4154 "import(1)",
4155 "import(y=x)",
4156 "f(...[import(y=x)])",
4157 "x = {[import(y=x)]: 1}",
4158 "var {[import(y=x)]: x} = {}",
4159 "({[import(y=x)]: x} = {})",
4160 "async () => { await import(x) }",
4161 "() => { import(x) }",
4162 "(import(y=x))",
4163 "{import(y=x)}",
4164 "import(import(x))",
4165 "x = import(x)",
4166 "var x = import(x)",
4167 "let x = import(x)",
4168 "for(x of import(x)) {}",
4169 "import(x).then()",
4170 NULL
4171 };
4172
4173 // clang-format on
4174 RunParserSyncTest(context_data, data, kError);
4175 RunModuleParserSyncTest(context_data, data, kError, NULL, 0, NULL, 0, NULL, 0,
4176 true, true);
4177 static const ParserFlag flags[] = {kAllowHarmonyDynamicImport};
4178 RunParserSyncTest(context_data, data, kSuccess, NULL, 0, flags,
4179 arraysize(flags));
4180 RunModuleParserSyncTest(context_data, data, kSuccess, NULL, 0, flags,
4181 arraysize(flags), NULL, 0, true, true);
neis 2017/01/31 10:47:57 Please add a comment here on why we ignore the err
gsathya 2017/01/31 18:26:08 Done.
4182 }
4183
4184 TEST(ImportExpressionErrors) {
4185 {
4186 // clang-format off
4187 const char* context_data[][2] = {
4188 {"", ""},
4189 {"var ", ""},
4190 {"let ", ""},
4191 {"new ", ""},
4192 {NULL, NULL}
4193 };
4194
4195 const char* data[] = {
4196 "import(",
4197 "import)",
4198 "import()",
4199 "import('x",
4200 "import('x']",
4201 "import['x')",
4202 "import = x",
4203 "import[",
4204 "import[]",
4205 "import]",
4206 "import[x]",
4207 "import{",
4208 "import{x",
4209 "import{x}",
4210 "import(x, y)",
4211 "import(...y)",
4212 "import(x,)",
4213 "import(,)",
4214 "import(,y)",
4215 "import(;)",
4216 "[import]",
4217 "{import}",
4218 "import+",
4219 "import = 1",
4220 "import.wat",
4221 NULL
4222 };
4223
4224 // clang-format on
4225 RunParserSyncTest(context_data, data, kError);
4226 RunModuleParserSyncTest(context_data, data, kError, NULL, 0, NULL, 0, NULL,
4227 0, true, true);
4228 static const ParserFlag flags[] = {kAllowHarmonyDynamicImport};
4229 RunParserSyncTest(context_data, data, kError, NULL, 0, flags,
4230 arraysize(flags));
4231 RunModuleParserSyncTest(context_data, data, kError, NULL, 0, flags,
4232 arraysize(flags), NULL, 0, true, true);
4233 }
4234
4235 {
4236 // clang-format off
4237 const char* context_data[][2] = {
4238 {"var ", ""},
4239 {"let ", ""},
4240 {NULL, NULL}
4241 };
4242
4243 const char* data[] = {
4244 "import('x')",
4245 NULL
4246 };
4247
4248 // clang-format on
4249 RunParserSyncTest(context_data, data, kError);
4250 RunModuleParserSyncTest(context_data, data, kError);
4251
4252 static const ParserFlag flags[] = {kAllowHarmonyDynamicImport};
4253 RunParserSyncTest(context_data, data, kError, NULL, 0, flags,
4254 arraysize(flags));
4255 RunModuleParserSyncTest(context_data, data, kError, NULL, 0, flags,
4256 arraysize(flags));
4257 }
4258 }
4145 4259
4146 TEST(SuperCall) { 4260 TEST(SuperCall) {
4147 const char* context_data[][2] = {{"", ""}, 4261 const char* context_data[][2] = {{"", ""},
4148 {NULL, NULL}}; 4262 {NULL, NULL}};
4149 4263
4150 const char* success_data[] = { 4264 const char* success_data[] = {
4151 "class C extends B { constructor() { super(); } }", 4265 "class C extends B { constructor() { super(); } }",
4152 "class C extends B { constructor() { () => super(); } }", 4266 "class C extends B { constructor() { () => super(); } }",
4153 NULL 4267 NULL
4154 }; 4268 };
(...skipping 5007 matching lines...) Expand 10 before | Expand all | Expand 10 after
9162 eager_info.literal()->scope()->inner_scope()->inner_scope(); 9276 eager_info.literal()->scope()->inner_scope()->inner_scope();
9163 DCHECK_NOT_NULL(scope); 9277 DCHECK_NOT_NULL(scope);
9164 DCHECK_NULL(scope->sibling()); 9278 DCHECK_NULL(scope->sibling());
9165 DCHECK(scope->is_function_scope()); 9279 DCHECK(scope->is_function_scope());
9166 9280
9167 size_t index = 0; 9281 size_t index = 0;
9168 i::ScopeTestHelper::CompareScopeToData( 9282 i::ScopeTestHelper::CompareScopeToData(
9169 scope, lazy_info.preparsed_scope_data(), index); 9283 scope, lazy_info.preparsed_scope_data(), index);
9170 } 9284 }
9171 } 9285 }
OLDNEW
« src/runtime/runtime-module.cc ('K') | « src/runtime/runtime-module.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698