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

Side by Side Diff: src/parser.cc

Issue 1024603002: Remove --harmony-numeric-literal flag (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: git rebase Created 5 years, 8 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/bailout-reason.h" 9 #include "src/bailout-reason.h"
10 #include "src/base/platform/platform.h" 10 #include "src/base/platform/platform.h"
(...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after
863 pre_parse_timer_(NULL), 863 pre_parse_timer_(NULL),
864 parsing_on_main_thread_(true) { 864 parsing_on_main_thread_(true) {
865 // Even though we were passed ParseInfo, we should not store it in 865 // Even though we were passed ParseInfo, we should not store it in
866 // Parser - this makes sure that Isolate is not accidentally accessed via 866 // Parser - this makes sure that Isolate is not accidentally accessed via
867 // ParseInfo during background parsing. 867 // ParseInfo during background parsing.
868 DCHECK(!info->script().is_null() || info->source_stream() != NULL); 868 DCHECK(!info->script().is_null() || info->source_stream() != NULL);
869 set_allow_lazy(info->allow_lazy_parsing()); 869 set_allow_lazy(info->allow_lazy_parsing());
870 set_allow_natives(FLAG_allow_natives_syntax || info->is_native()); 870 set_allow_natives(FLAG_allow_natives_syntax || info->is_native());
871 set_allow_harmony_modules(!info->is_native() && FLAG_harmony_modules); 871 set_allow_harmony_modules(!info->is_native() && FLAG_harmony_modules);
872 set_allow_harmony_arrow_functions(FLAG_harmony_arrow_functions); 872 set_allow_harmony_arrow_functions(FLAG_harmony_arrow_functions);
873 set_allow_harmony_numeric_literals(FLAG_harmony_numeric_literals);
874 set_allow_harmony_classes(FLAG_harmony_classes); 873 set_allow_harmony_classes(FLAG_harmony_classes);
875 set_allow_harmony_object_literals(FLAG_harmony_object_literals); 874 set_allow_harmony_object_literals(FLAG_harmony_object_literals);
876 set_allow_harmony_sloppy(FLAG_harmony_sloppy); 875 set_allow_harmony_sloppy(FLAG_harmony_sloppy);
877 set_allow_harmony_unicode(FLAG_harmony_unicode); 876 set_allow_harmony_unicode(FLAG_harmony_unicode);
878 set_allow_harmony_computed_property_names( 877 set_allow_harmony_computed_property_names(
879 FLAG_harmony_computed_property_names); 878 FLAG_harmony_computed_property_names);
880 set_allow_harmony_rest_params(FLAG_harmony_rest_parameters); 879 set_allow_harmony_rest_params(FLAG_harmony_rest_parameters);
881 set_allow_strong_mode(FLAG_strong_mode); 880 set_allow_strong_mode(FLAG_strong_mode);
882 for (int feature = 0; feature < v8::Isolate::kUseCounterFeatureCount; 881 for (int feature = 0; feature < v8::Isolate::kUseCounterFeatureCount;
883 ++feature) { 882 ++feature) {
(...skipping 3281 matching lines...) Expand 10 before | Expand all | Expand 10 after
4165 DCHECK_EQ(Token::LBRACE, scanner()->current_token()); 4164 DCHECK_EQ(Token::LBRACE, scanner()->current_token());
4166 4165
4167 if (reusable_preparser_ == NULL) { 4166 if (reusable_preparser_ == NULL) {
4168 reusable_preparser_ = new PreParser(zone(), &scanner_, ast_value_factory(), 4167 reusable_preparser_ = new PreParser(zone(), &scanner_, ast_value_factory(),
4169 NULL, stack_limit_); 4168 NULL, stack_limit_);
4170 reusable_preparser_->set_allow_lazy(true); 4169 reusable_preparser_->set_allow_lazy(true);
4171 reusable_preparser_->set_allow_natives(allow_natives()); 4170 reusable_preparser_->set_allow_natives(allow_natives());
4172 reusable_preparser_->set_allow_harmony_modules(allow_harmony_modules()); 4171 reusable_preparser_->set_allow_harmony_modules(allow_harmony_modules());
4173 reusable_preparser_->set_allow_harmony_arrow_functions( 4172 reusable_preparser_->set_allow_harmony_arrow_functions(
4174 allow_harmony_arrow_functions()); 4173 allow_harmony_arrow_functions());
4175 reusable_preparser_->set_allow_harmony_numeric_literals(
4176 allow_harmony_numeric_literals());
4177 reusable_preparser_->set_allow_harmony_classes(allow_harmony_classes()); 4174 reusable_preparser_->set_allow_harmony_classes(allow_harmony_classes());
4178 reusable_preparser_->set_allow_harmony_object_literals( 4175 reusable_preparser_->set_allow_harmony_object_literals(
4179 allow_harmony_object_literals()); 4176 allow_harmony_object_literals());
4180 reusable_preparser_->set_allow_harmony_sloppy(allow_harmony_sloppy()); 4177 reusable_preparser_->set_allow_harmony_sloppy(allow_harmony_sloppy());
4181 reusable_preparser_->set_allow_harmony_unicode(allow_harmony_unicode()); 4178 reusable_preparser_->set_allow_harmony_unicode(allow_harmony_unicode());
4182 reusable_preparser_->set_allow_harmony_computed_property_names( 4179 reusable_preparser_->set_allow_harmony_computed_property_names(
4183 allow_harmony_computed_property_names()); 4180 allow_harmony_computed_property_names());
4184 reusable_preparser_->set_allow_harmony_rest_params( 4181 reusable_preparser_->set_allow_harmony_rest_params(
4185 allow_harmony_rest_params()); 4182 allow_harmony_rest_params());
4186 reusable_preparser_->set_allow_strong_mode(allow_strong_mode()); 4183 reusable_preparser_->set_allow_strong_mode(allow_strong_mode());
(...skipping 1373 matching lines...) Expand 10 before | Expand all | Expand 10 after
5560 } else { 5557 } else {
5561 const uc16* data = reinterpret_cast<const uc16*>(raw_string->raw_data()); 5558 const uc16* data = reinterpret_cast<const uc16*>(raw_string->raw_data());
5562 running_hash = StringHasher::ComputeRunningHash(running_hash, data, 5559 running_hash = StringHasher::ComputeRunningHash(running_hash, data,
5563 raw_string->length()); 5560 raw_string->length());
5564 } 5561 }
5565 } 5562 }
5566 5563
5567 return running_hash; 5564 return running_hash;
5568 } 5565 }
5569 } } // namespace v8::internal 5566 } } // namespace v8::internal
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