"src/promise.js",
"src/object-observe.js",
"src/macros.py",
+ "src/array-iterator.js",
+ "src/string-iterator.js",
]
outputs = [
"src/macros.py",
"src/proxy.js",
"src/generator.js",
- "src/array-iterator.js",
"src/harmony-string.js",
"src/harmony-array.js",
"src/unscopables.js",
void Bootstrapper::TearDown() {
if (delete_these_non_arrays_on_tear_down_ != NULL) {
int len = delete_these_non_arrays_on_tear_down_->length();
- DCHECK(len < 25); // Don't use this mechanism for unbounded allocations.
+ DCHECK(len < 27); // Don't use this mechanism for unbounded allocations.
for (int i = 0; i < len; i++) {
delete delete_these_non_arrays_on_tear_down_->at(i);
delete_these_non_arrays_on_tear_down_->at(i) = NULL;
i++) {
INSTALL_EXPERIMENTAL_NATIVE(i, proxies, "proxy.js")
INSTALL_EXPERIMENTAL_NATIVE(i, generators, "generator.js")
- INSTALL_EXPERIMENTAL_NATIVE(i, iteration, "array-iterator.js")
- INSTALL_EXPERIMENTAL_NATIVE(i, iteration, "string-iterator.js")
INSTALL_EXPERIMENTAL_NATIVE(i, strings, "harmony-string.js")
INSTALL_EXPERIMENTAL_NATIVE(i, arrays, "harmony-array.js")
INSTALL_EXPERIMENTAL_NATIVE(i, unscopables, "unscopables.js")
"enable harmony modules (implies block scoping)")
DEFINE_BOOL(harmony_proxies, false, "enable harmony proxies")
DEFINE_BOOL(harmony_generators, false, "enable harmony generators")
-DEFINE_BOOL(harmony_iteration, false, "enable harmony iteration (for-of)")
DEFINE_BOOL(harmony_numeric_literals, false,
"enable harmony numeric literals (0o77, 0b11)")
DEFINE_BOOL(harmony_strings, false, "enable harmony string")
DEFINE_IMPLICATION(harmony_modules, harmony_scoping)
DEFINE_IMPLICATION(harmony, es_staging)
-DEFINE_IMPLICATION(es_staging, harmony_iteration)
// Flags for experimental implementation features.
DEFINE_BOOL(compiled_keyed_dictionary_loads, true,
set_allow_natives_syntax(FLAG_allow_natives_syntax || info->is_native());
set_allow_lazy(false); // Must be explicitly enabled.
set_allow_generators(FLAG_harmony_generators);
- set_allow_for_of(FLAG_harmony_iteration);
set_allow_arrow_functions(FLAG_harmony_arrow_functions);
set_allow_harmony_numeric_literals(FLAG_harmony_numeric_literals);
for (int feature = 0; feature < v8::Isolate::kUseCounterFeatureCount;
if (Check(Token::IN)) {
*visit_mode = ForEachStatement::ENUMERATE;
return true;
- } else if (allow_for_of() && accept_OF &&
- CheckContextualKeyword(CStrVector("of"))) {
+ } else if (accept_OF && CheckContextualKeyword(CStrVector("of"))) {
*visit_mode = ForEachStatement::ITERATE;
return true;
}
reusable_preparser_->set_allow_natives_syntax(allow_natives_syntax());
reusable_preparser_->set_allow_lazy(true);
reusable_preparser_->set_allow_generators(allow_generators());
- reusable_preparser_->set_allow_for_of(allow_for_of());
reusable_preparser_->set_allow_arrow_functions(allow_arrow_functions());
reusable_preparser_->set_allow_harmony_numeric_literals(
allow_harmony_numeric_literals());
bool PreParser::CheckInOrOf(bool accept_OF) {
if (Check(Token::IN) ||
- (allow_for_of() && accept_OF &&
- CheckContextualKeyword(CStrVector("of")))) {
+ (accept_OF && CheckContextualKeyword(CStrVector("of")))) {
return true;
}
return false;
allow_lazy_(false),
allow_natives_syntax_(false),
allow_generators_(false),
- allow_for_of_(false),
allow_arrow_functions_(false),
zone_(zone) {}
bool allow_lazy() const { return allow_lazy_; }
bool allow_natives_syntax() const { return allow_natives_syntax_; }
bool allow_generators() const { return allow_generators_; }
- bool allow_for_of() const { return allow_for_of_; }
bool allow_arrow_functions() const { return allow_arrow_functions_; }
bool allow_modules() const { return scanner()->HarmonyModules(); }
bool allow_harmony_scoping() const { return scanner()->HarmonyScoping(); }
void set_allow_lazy(bool allow) { allow_lazy_ = allow; }
void set_allow_natives_syntax(bool allow) { allow_natives_syntax_ = allow; }
void set_allow_generators(bool allow) { allow_generators_ = allow; }
- void set_allow_for_of(bool allow) { allow_for_of_ = allow; }
void set_allow_arrow_functions(bool allow) { allow_arrow_functions_ = allow; }
void set_allow_modules(bool allow) { scanner()->SetHarmonyModules(allow); }
void set_allow_harmony_scoping(bool allow) {
bool allow_lazy_;
bool allow_natives_syntax_;
bool allow_generators_;
- bool allow_for_of_;
bool allow_arrow_functions_;
typename Traits::Type::Zone* zone_; // Only used by Parser.
// var $Array = global.Array;
// var $Symbol = global.Symbol;
-function ExtendSymbol() {
+function UnscopablesExtendSymbol() {
%CheckIsBootstrapping();
InstallConstants($Symbol, $Array(
"unscopables", symbolUnscopables
));
}
-ExtendSymbol();
+UnscopablesExtendSymbol();
var arrayUnscopables = {
};
-function ExtendArrayPrototype() {
+function UnscopablesExtendArrayPrototype() {
%CheckIsBootstrapping();
%AddNamedProperty($Array.prototype, symbolUnscopables, arrayUnscopables,
DONT_ENUM | READ_ONLY);
}
-ExtendArrayPrototype();
+UnscopablesExtendArrayPrototype();
kAllowHarmonyScoping,
kAllowModules,
kAllowGenerators,
- kAllowForOf,
kAllowHarmonyNumericLiterals,
kAllowArrowFunctions
};
parser->set_allow_harmony_scoping(flags.Contains(kAllowHarmonyScoping));
parser->set_allow_modules(flags.Contains(kAllowModules));
parser->set_allow_generators(flags.Contains(kAllowGenerators));
- parser->set_allow_for_of(flags.Contains(kAllowForOf));
parser->set_allow_harmony_numeric_literals(
flags.Contains(kAllowHarmonyNumericLiterals));
parser->set_allow_arrow_functions(flags.Contains(kAllowArrowFunctions));
CcTest::i_isolate()->stack_guard()->SetStackLimit(GetCurrentStackPosition() -
128 * 1024);
- static const ParserFlag flags1[] = {
- kAllowLazy, kAllowHarmonyScoping, kAllowModules, kAllowGenerators,
- kAllowForOf, kAllowArrowFunctions
- };
+ static const ParserFlag flags1[] = {kAllowLazy, kAllowHarmonyScoping,
+ kAllowModules, kAllowGenerators,
+ kAllowArrowFunctions};
for (int i = 0; context_data[i][0] != NULL; ++i) {
for (int j = 0; statement_data[j] != NULL; ++j) {
for (int k = 0; termination_data[k] != NULL; ++k) {
128 * 1024);
static const ParserFlag default_flags[] = {
- kAllowLazy, kAllowHarmonyScoping, kAllowModules, kAllowGenerators,
- kAllowForOf, kAllowNativesSyntax, kAllowArrowFunctions
- };
+ kAllowLazy, kAllowHarmonyScoping, kAllowModules,
+ kAllowGenerators, kAllowNativesSyntax, kAllowArrowFunctions};
ParserFlag* generated_flags = NULL;
if (flags == NULL) {
flags = default_flags;
function isV8Native(name) {
return name == "GeneratorFunctionPrototype" ||
name == "SetIterator" ||
- name == "MapIterator";
+ name == "MapIterator" ||
+ name == "ArrayIterator" ||
+ name == "StringIterator";
}
function checkConstructor(func, name) {
}
// This has to be updated if the number of native scripts change.
-assertTrue(named_native_count == 23 || named_native_count == 24);
+assertTrue(named_native_count == 25 || named_native_count == 26);
// Only the 'gc' extension is loaded.
assertEquals(1, extension_count);
// This script and mjsunit.js has been loaded. If using d8, d8 loads
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --harmony-iteration --allow-natives-syntax
+// Flags: --allow-natives-syntax
var NONE = 0;
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --harmony-iteration
// Flags: --harmony-generators --harmony-scoping --harmony-proxies
// Test for-of semantics.
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --harmony-iteration --harmony-scoping --use-strict
+// Flags: --harmony-scoping --use-strict
// Test for-of syntax.
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --harmony-iteration
-
// Filler long enough to trigger lazy parsing.
var filler = "//" + new Array(1024).join('x');
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --harmony-iteration
-
function TestStringPrototypeIterator() {
assertTrue(String.prototype.hasOwnProperty(Symbol.iterator));
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --harmony-iteration
-
var constructors = [Uint8Array, Int8Array,
Uint16Array, Int16Array,
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --harmony-generators --expose-gc --harmony-iteration
+// Flags: --harmony-generators --expose-gc
// Test generator iteration.
},
})
-TestKeysThrow([], {
+TestKeysThrow({
get getOwnPropertyNames() {
return function() { return [1, 2] }
},
'harmony/regress/regress-3280': [PASS, NO_VARIANTS],
# Support for ES6 for-of iteration is missing.
- 'harmony/array-iterator': [PASS, NO_VARIANTS],
- 'harmony/iteration-semantics': [PASS, NO_VARIANTS],
- 'harmony/string-iterator': [PASS, NO_VARIANTS],
- 'harmony/typed-array-iterator': [PASS, NO_VARIANTS],
+ 'es6/array-iterator': [PASS, NO_VARIANTS],
+ 'es6/iteration-semantics': [PASS, NO_VARIANTS],
+ 'es6/string-iterator': [PASS, NO_VARIANTS],
+ 'es6/typed-array-iterator': [PASS, NO_VARIANTS],
##############################################################################
# Too slow in debug mode with --stress-opt mode.
'../../src/collection.js',
'../../src/collection-iterator.js',
'../../src/macros.py',
+ '../../src/array-iterator.js',
+ '../../src/string-iterator.js'
],
'experimental_library_files': [
'../../src/macros.py',
'../../src/proxy.js',
'../../src/generator.js',
- '../../src/array-iterator.js',
- '../../src/string-iterator.js',
'../../src/harmony-string.js',
'../../src/harmony-array.js',
'../../src/unscopables.js',