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

Side by Side Diff: src/parser.cc

Issue 1255013002: Split off a separate --harmony_sloppy_let flag (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix flags on mjsunit tests Created 5 years, 5 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
« no previous file with comments | « src/flag-definitions.h ('k') | src/preparser.h » ('j') | 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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/ast.h" 8 #include "src/ast.h"
9 #include "src/ast-literal-reindexer.h" 9 #include "src/ast-literal-reindexer.h"
10 #include "src/bailout-reason.h" 10 #include "src/bailout-reason.h"
(...skipping 895 matching lines...) Expand 10 before | Expand all | Expand 10 after
906 parsing_on_main_thread_(true) { 906 parsing_on_main_thread_(true) {
907 // Even though we were passed ParseInfo, we should not store it in 907 // Even though we were passed ParseInfo, we should not store it in
908 // Parser - this makes sure that Isolate is not accidentally accessed via 908 // Parser - this makes sure that Isolate is not accidentally accessed via
909 // ParseInfo during background parsing. 909 // ParseInfo during background parsing.
910 DCHECK(!info->script().is_null() || info->source_stream() != NULL); 910 DCHECK(!info->script().is_null() || info->source_stream() != NULL);
911 set_allow_lazy(info->allow_lazy_parsing()); 911 set_allow_lazy(info->allow_lazy_parsing());
912 set_allow_natives(FLAG_allow_natives_syntax || info->is_native()); 912 set_allow_natives(FLAG_allow_natives_syntax || info->is_native());
913 set_allow_harmony_modules(!info->is_native() && FLAG_harmony_modules); 913 set_allow_harmony_modules(!info->is_native() && FLAG_harmony_modules);
914 set_allow_harmony_arrow_functions(FLAG_harmony_arrow_functions); 914 set_allow_harmony_arrow_functions(FLAG_harmony_arrow_functions);
915 set_allow_harmony_sloppy(FLAG_harmony_sloppy); 915 set_allow_harmony_sloppy(FLAG_harmony_sloppy);
916 set_allow_harmony_sloppy_let(FLAG_harmony_sloppy_let);
916 set_allow_harmony_unicode(FLAG_harmony_unicode); 917 set_allow_harmony_unicode(FLAG_harmony_unicode);
917 set_allow_harmony_computed_property_names( 918 set_allow_harmony_computed_property_names(
918 FLAG_harmony_computed_property_names); 919 FLAG_harmony_computed_property_names);
919 set_allow_harmony_rest_params(FLAG_harmony_rest_parameters); 920 set_allow_harmony_rest_params(FLAG_harmony_rest_parameters);
920 set_allow_harmony_spreadcalls(FLAG_harmony_spreadcalls); 921 set_allow_harmony_spreadcalls(FLAG_harmony_spreadcalls);
921 set_allow_harmony_destructuring(FLAG_harmony_destructuring); 922 set_allow_harmony_destructuring(FLAG_harmony_destructuring);
922 set_allow_harmony_spread_arrays(FLAG_harmony_spread_arrays); 923 set_allow_harmony_spread_arrays(FLAG_harmony_spread_arrays);
923 set_allow_harmony_new_target(FLAG_harmony_new_target); 924 set_allow_harmony_new_target(FLAG_harmony_new_target);
924 set_allow_strong_mode(FLAG_strong_mode); 925 set_allow_strong_mode(FLAG_strong_mode);
925 set_allow_legacy_const(FLAG_legacy_const); 926 set_allow_legacy_const(FLAG_legacy_const);
(...skipping 3526 matching lines...) Expand 10 before | Expand all | Expand 10 after
4452 4453
4453 if (reusable_preparser_ == NULL) { 4454 if (reusable_preparser_ == NULL) {
4454 reusable_preparser_ = new PreParser(zone(), &scanner_, ast_value_factory(), 4455 reusable_preparser_ = new PreParser(zone(), &scanner_, ast_value_factory(),
4455 NULL, stack_limit_); 4456 NULL, stack_limit_);
4456 reusable_preparser_->set_allow_lazy(true); 4457 reusable_preparser_->set_allow_lazy(true);
4457 #define SET_ALLOW(name) reusable_preparser_->set_allow_##name(allow_##name()); 4458 #define SET_ALLOW(name) reusable_preparser_->set_allow_##name(allow_##name());
4458 SET_ALLOW(natives); 4459 SET_ALLOW(natives);
4459 SET_ALLOW(harmony_modules); 4460 SET_ALLOW(harmony_modules);
4460 SET_ALLOW(harmony_arrow_functions); 4461 SET_ALLOW(harmony_arrow_functions);
4461 SET_ALLOW(harmony_sloppy); 4462 SET_ALLOW(harmony_sloppy);
4463 SET_ALLOW(harmony_sloppy_let);
4462 SET_ALLOW(harmony_unicode); 4464 SET_ALLOW(harmony_unicode);
4463 SET_ALLOW(harmony_computed_property_names); 4465 SET_ALLOW(harmony_computed_property_names);
4464 SET_ALLOW(harmony_rest_params); 4466 SET_ALLOW(harmony_rest_params);
4465 SET_ALLOW(harmony_spreadcalls); 4467 SET_ALLOW(harmony_spreadcalls);
4466 SET_ALLOW(harmony_destructuring); 4468 SET_ALLOW(harmony_destructuring);
4467 SET_ALLOW(harmony_spread_arrays); 4469 SET_ALLOW(harmony_spread_arrays);
4468 SET_ALLOW(harmony_new_target); 4470 SET_ALLOW(harmony_new_target);
4469 SET_ALLOW(strong_mode); 4471 SET_ALLOW(strong_mode);
4470 #undef SET_ALLOW 4472 #undef SET_ALLOW
4471 } 4473 }
(...skipping 1508 matching lines...) Expand 10 before | Expand all | Expand 10 after
5980 Expression* Parser::SpreadCallNew(Expression* function, 5982 Expression* Parser::SpreadCallNew(Expression* function,
5981 ZoneList<v8::internal::Expression*>* args, 5983 ZoneList<v8::internal::Expression*>* args,
5982 int pos) { 5984 int pos) {
5983 args->InsertAt(0, function, zone()); 5985 args->InsertAt(0, function, zone());
5984 5986
5985 return factory()->NewCallRuntime( 5987 return factory()->NewCallRuntime(
5986 ast_value_factory()->reflect_construct_string(), NULL, args, pos); 5988 ast_value_factory()->reflect_construct_string(), NULL, args, pos);
5987 } 5989 }
5988 } // namespace internal 5990 } // namespace internal
5989 } // namespace v8 5991 } // namespace v8
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/preparser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698