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

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

Issue 1371963002: [es6] Ship rest parameters. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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
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 1510 matching lines...) Expand 10 before | Expand all | Expand 10 after
1521 void SetParserFlags(i::ParserBase<Traits>* parser, 1521 void SetParserFlags(i::ParserBase<Traits>* parser,
1522 i::EnumSet<ParserFlag> flags) { 1522 i::EnumSet<ParserFlag> flags) {
1523 parser->set_allow_lazy(flags.Contains(kAllowLazy)); 1523 parser->set_allow_lazy(flags.Contains(kAllowLazy));
1524 parser->set_allow_natives(flags.Contains(kAllowNatives)); 1524 parser->set_allow_natives(flags.Contains(kAllowNatives));
1525 parser->set_allow_harmony_arrow_functions( 1525 parser->set_allow_harmony_arrow_functions(
1526 flags.Contains(kAllowHarmonyArrowFunctions)); 1526 flags.Contains(kAllowHarmonyArrowFunctions));
1527 parser->set_allow_harmony_default_parameters( 1527 parser->set_allow_harmony_default_parameters(
1528 flags.Contains(kAllowHarmonyDefaultParameters)); 1528 flags.Contains(kAllowHarmonyDefaultParameters));
1529 parser->set_allow_harmony_rest_parameters( 1529 parser->set_allow_harmony_rest_parameters(
1530 flags.Contains(kAllowHarmonyRestParameters)); 1530 flags.Contains(kAllowHarmonyRestParameters));
1531 parser->set_allow_harmony_spreadcalls( 1531 parser->set_allow_harmony_spread_calls(
1532 flags.Contains(kAllowHarmonySpreadCalls)); 1532 flags.Contains(kAllowHarmonySpreadCalls));
1533 parser->set_allow_harmony_sloppy(flags.Contains(kAllowHarmonySloppy)); 1533 parser->set_allow_harmony_sloppy(flags.Contains(kAllowHarmonySloppy));
1534 parser->set_allow_harmony_sloppy_let(flags.Contains(kAllowHarmonySloppyLet)); 1534 parser->set_allow_harmony_sloppy_let(flags.Contains(kAllowHarmonySloppyLet));
1535 parser->set_allow_harmony_destructuring( 1535 parser->set_allow_harmony_destructuring(
1536 flags.Contains(kAllowHarmonyDestructuring)); 1536 flags.Contains(kAllowHarmonyDestructuring));
1537 parser->set_allow_harmony_spread_arrays( 1537 parser->set_allow_harmony_spread_arrays(
1538 flags.Contains(kAllowHarmonySpreadArrays)); 1538 flags.Contains(kAllowHarmonySpreadArrays));
1539 parser->set_allow_harmony_new_target(flags.Contains(kAllowHarmonyNewTarget)); 1539 parser->set_allow_harmony_new_target(flags.Contains(kAllowHarmonyNewTarget));
1540 parser->set_allow_strong_mode(flags.Contains(kAllowStrongMode)); 1540 parser->set_allow_strong_mode(flags.Contains(kAllowStrongMode));
1541 parser->set_allow_legacy_const(!flags.Contains(kNoLegacyConst)); 1541 parser->set_allow_legacy_const(!flags.Contains(kNoLegacyConst));
(...skipping 5689 matching lines...) Expand 10 before | Expand all | Expand 10 after
7231 "for (let in {}) {}", 7231 "for (let in {}) {}",
7232 NULL 7232 NULL
7233 }; 7233 };
7234 // clang-format on 7234 // clang-format on
7235 7235
7236 static const ParserFlag always_flags[] = {kAllowHarmonySloppy, 7236 static const ParserFlag always_flags[] = {kAllowHarmonySloppy,
7237 kAllowHarmonySloppyLet}; 7237 kAllowHarmonySloppyLet};
7238 RunParserSyncTest(context_data, data, kSuccess, NULL, 0, always_flags, 7238 RunParserSyncTest(context_data, data, kSuccess, NULL, 0, always_flags,
7239 arraysize(always_flags)); 7239 arraysize(always_flags));
7240 } 7240 }
OLDNEW
« src/flag-definitions.h ('K') | « src/preparser.h ('k') | test/js-perf-test/JSTests.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698