[es6] Ship rest parameters.

R=rossberg
BUG=

Review URL: https://codereview.chromium.org/1371963002

Cr-Commit-Position: refs/heads/master@{#30970}
This commit is contained in:
neis 2015-09-28 04:16:55 -07:00 committed by Commit bot
parent 91397ac7aa
commit d3ef8f4b95
12 changed files with 19 additions and 18 deletions

View File

@ -1861,7 +1861,7 @@ EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy_function)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_sloppy_let)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_rest_parameters)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_default_parameters)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_spreadcalls)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_spread_calls)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_destructuring)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_object_observe)
EMPTY_INITIALIZE_GLOBAL_FOR_FEATURE(harmony_spread_arrays)
@ -2565,7 +2565,7 @@ bool Genesis::InstallExperimentalNatives() {
static const char* harmony_default_parameters_natives[] = {nullptr};
static const char* harmony_reflect_natives[] = {"native harmony-reflect.js",
nullptr};
static const char* harmony_spreadcalls_natives[] = {
static const char* harmony_spread_calls_natives[] = {
"native harmony-spread.js", nullptr};
static const char* harmony_destructuring_natives[] = {nullptr};
static const char* harmony_object_observe_natives[] = {

View File

@ -204,7 +204,6 @@ DEFINE_BOOL(legacy_const, true, "legacy semantics for const in sloppy mode")
#define HARMONY_STAGED(V) \
V(harmony_tostring, "harmony toString") \
V(harmony_concat_spreadable, "harmony isConcatSpreadable") \
V(harmony_rest_parameters, "harmony rest parameters") \
V(harmony_sloppy, "harmony features in sloppy mode") \
V(harmony_sloppy_function, "harmony sloppy function block scoping") \
V(harmony_sloppy_let, "harmony let in sloppy mode")
@ -215,7 +214,8 @@ DEFINE_BOOL(legacy_const, true, "legacy semantics for const in sloppy mode")
V(harmony_array_includes, "harmony Array.prototype.includes") \
V(harmony_new_target, "harmony new.target") \
V(harmony_object_observe, "harmony Object.observe") \
V(harmony_spreadcalls, "harmony spread-calls") \
V(harmony_rest_parameters, "harmony rest parameters") \
V(harmony_spread_calls, "harmony spread-calls") \
V(harmony_spread_arrays, "harmony spread in array literals")
// Once a shipping feature has proved stable in the wild, it will be dropped

View File

@ -919,7 +919,7 @@ Parser::Parser(ParseInfo* info)
set_allow_harmony_sloppy_let(FLAG_harmony_sloppy_let);
set_allow_harmony_rest_parameters(FLAG_harmony_rest_parameters);
set_allow_harmony_default_parameters(FLAG_harmony_default_parameters);
set_allow_harmony_spreadcalls(FLAG_harmony_spreadcalls);
set_allow_harmony_spread_calls(FLAG_harmony_spread_calls);
set_allow_harmony_destructuring(FLAG_harmony_destructuring);
set_allow_harmony_spread_arrays(FLAG_harmony_spread_arrays);
set_allow_harmony_new_target(FLAG_harmony_new_target);
@ -4737,7 +4737,7 @@ PreParser::PreParseResult Parser::ParseLazyFunctionBodyWithPreParser(
SET_ALLOW(harmony_sloppy_let);
SET_ALLOW(harmony_rest_parameters);
SET_ALLOW(harmony_default_parameters);
SET_ALLOW(harmony_spreadcalls);
SET_ALLOW(harmony_spread_calls);
SET_ALLOW(harmony_destructuring);
SET_ALLOW(harmony_spread_arrays);
SET_ALLOW(harmony_new_target);

View File

@ -113,7 +113,7 @@ class ParserBase : public Traits {
allow_harmony_sloppy_let_(false),
allow_harmony_rest_parameters_(false),
allow_harmony_default_parameters_(false),
allow_harmony_spreadcalls_(false),
allow_harmony_spread_calls_(false),
allow_harmony_destructuring_(false),
allow_harmony_spread_arrays_(false),
allow_harmony_new_target_(false),
@ -132,7 +132,7 @@ class ParserBase : public Traits {
ALLOW_ACCESSORS(harmony_sloppy_let);
ALLOW_ACCESSORS(harmony_rest_parameters);
ALLOW_ACCESSORS(harmony_default_parameters);
ALLOW_ACCESSORS(harmony_spreadcalls);
ALLOW_ACCESSORS(harmony_spread_calls);
ALLOW_ACCESSORS(harmony_destructuring);
ALLOW_ACCESSORS(harmony_spread_arrays);
ALLOW_ACCESSORS(harmony_new_target);
@ -833,7 +833,7 @@ class ParserBase : public Traits {
bool allow_harmony_sloppy_let_;
bool allow_harmony_rest_parameters_;
bool allow_harmony_default_parameters_;
bool allow_harmony_spreadcalls_;
bool allow_harmony_spread_calls_;
bool allow_harmony_destructuring_;
bool allow_harmony_spread_arrays_;
bool allow_harmony_new_target_;
@ -2835,7 +2835,8 @@ typename Traits::Type::ExpressionList ParserBase<Traits>::ParseArguments(
bool was_unspread = false;
int unspread_sequences_count = 0;
while (!done) {
bool is_spread = allow_harmony_spreadcalls() && (peek() == Token::ELLIPSIS);
bool is_spread =
allow_harmony_spread_calls() && (peek() == Token::ELLIPSIS);
int start_pos = peek_position();
if (is_spread) Consume(Token::ELLIPSIS);

View File

@ -1528,7 +1528,7 @@ void SetParserFlags(i::ParserBase<Traits>* parser,
flags.Contains(kAllowHarmonyDefaultParameters));
parser->set_allow_harmony_rest_parameters(
flags.Contains(kAllowHarmonyRestParameters));
parser->set_allow_harmony_spreadcalls(
parser->set_allow_harmony_spread_calls(
flags.Contains(kAllowHarmonySpreadCalls));
parser->set_allow_harmony_sloppy(flags.Contains(kAllowHarmonySloppy));
parser->set_allow_harmony_sloppy_let(flags.Contains(kAllowHarmonySloppyLet));

View File

@ -26,7 +26,7 @@
"path": ["SpreadCalls"],
"main": "run.js",
"resources": ["spreadcalls.js"],
"flags": ["--harmony-spreadcalls"],
"flags": ["--harmony-spread_calls"],
"run_count": 5,
"units": "score",
"results_regexp": "^%s\\-SpreadCalls\\(Score\\): (.+)$",

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony-spreadcalls --harmony-sloppy --harmony-rest-parameters
// Flags: --harmony-spread-calls --harmony-sloppy --harmony-rest-parameters
(function testConstructClassStrict() {

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony-spreadcalls
// Flags: --harmony-spread-calls
(function testNonConstructorStrict() {
"use strict";

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony-spreadcalls --harmony-sloppy --harmony-rest-parameters
// Flags: --harmony-spread-calls --harmony-sloppy --harmony-rest-parameters
(function testCallSuperPropertyStrict() {
"use strict";

View File

@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --harmony-spreadcalls
// Flags: --harmony-spread-calls
(function testSpreadCallsStrict() {
"use strict"

View File

@ -3,7 +3,7 @@
// found in the LICENSE file.
// Flags: --harmony-arrow-functions --allow-natives-syntax
// Flags: --harmony-spreadcalls --harmony-destructuring
// Flags: --harmony-spread-calls --harmony-destructuring
// Flags: --harmony-rest-parameters --harmony-sloppy
(function TestSuperNamedLoads() {

View File

@ -3,7 +3,7 @@
// found in the LICENSE file.
// Flags: --strong-mode --harmony-arrow-functions --harmony-reflect
// Flags: --harmony-spreadcalls --harmony-rest-parameters --allow-natives-syntax
// Flags: --harmony-spread-calls --harmony-rest-parameters --allow-natives-syntax
'use strict';