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

Side by Side Diff: src/parser.cc

Issue 1411723007: Remove --harmony-new-target flag (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased Created 5 years, 1 month 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/parser.h" 5 #include "src/parser.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 903 matching lines...) Expand 10 before | Expand all | Expand 10 after
914 // ParseInfo during background parsing. 914 // ParseInfo during background parsing.
915 DCHECK(!info->script().is_null() || info->source_stream() != NULL); 915 DCHECK(!info->script().is_null() || info->source_stream() != NULL);
916 set_allow_lazy(info->allow_lazy_parsing()); 916 set_allow_lazy(info->allow_lazy_parsing());
917 set_allow_natives(FLAG_allow_natives_syntax || info->is_native()); 917 set_allow_natives(FLAG_allow_natives_syntax || info->is_native());
918 set_allow_harmony_sloppy(FLAG_harmony_sloppy); 918 set_allow_harmony_sloppy(FLAG_harmony_sloppy);
919 set_allow_harmony_sloppy_function(FLAG_harmony_sloppy_function); 919 set_allow_harmony_sloppy_function(FLAG_harmony_sloppy_function);
920 set_allow_harmony_sloppy_let(FLAG_harmony_sloppy_let); 920 set_allow_harmony_sloppy_let(FLAG_harmony_sloppy_let);
921 set_allow_harmony_rest_parameters(FLAG_harmony_rest_parameters); 921 set_allow_harmony_rest_parameters(FLAG_harmony_rest_parameters);
922 set_allow_harmony_default_parameters(FLAG_harmony_default_parameters); 922 set_allow_harmony_default_parameters(FLAG_harmony_default_parameters);
923 set_allow_harmony_destructuring(FLAG_harmony_destructuring); 923 set_allow_harmony_destructuring(FLAG_harmony_destructuring);
924 set_allow_harmony_new_target(FLAG_harmony_new_target);
925 set_allow_strong_mode(FLAG_strong_mode); 924 set_allow_strong_mode(FLAG_strong_mode);
926 set_allow_legacy_const(FLAG_legacy_const); 925 set_allow_legacy_const(FLAG_legacy_const);
927 set_allow_harmony_do_expressions(FLAG_harmony_do_expressions); 926 set_allow_harmony_do_expressions(FLAG_harmony_do_expressions);
928 for (int feature = 0; feature < v8::Isolate::kUseCounterFeatureCount; 927 for (int feature = 0; feature < v8::Isolate::kUseCounterFeatureCount;
929 ++feature) { 928 ++feature) {
930 use_counts_[feature] = 0; 929 use_counts_[feature] = 0;
931 } 930 }
932 if (info->ast_value_factory() == NULL) { 931 if (info->ast_value_factory() == NULL) {
933 // info takes ownership of AstValueFactory. 932 // info takes ownership of AstValueFactory.
934 info->set_ast_value_factory(new AstValueFactory(zone(), info->hash_seed())); 933 info->set_ast_value_factory(new AstValueFactory(zone(), info->hash_seed()));
(...skipping 3869 matching lines...) Expand 10 before | Expand all | Expand 10 after
4804 reusable_preparser_ = new PreParser(zone(), &scanner_, ast_value_factory(), 4803 reusable_preparser_ = new PreParser(zone(), &scanner_, ast_value_factory(),
4805 NULL, stack_limit_); 4804 NULL, stack_limit_);
4806 reusable_preparser_->set_allow_lazy(true); 4805 reusable_preparser_->set_allow_lazy(true);
4807 #define SET_ALLOW(name) reusable_preparser_->set_allow_##name(allow_##name()); 4806 #define SET_ALLOW(name) reusable_preparser_->set_allow_##name(allow_##name());
4808 SET_ALLOW(natives); 4807 SET_ALLOW(natives);
4809 SET_ALLOW(harmony_sloppy); 4808 SET_ALLOW(harmony_sloppy);
4810 SET_ALLOW(harmony_sloppy_let); 4809 SET_ALLOW(harmony_sloppy_let);
4811 SET_ALLOW(harmony_rest_parameters); 4810 SET_ALLOW(harmony_rest_parameters);
4812 SET_ALLOW(harmony_default_parameters); 4811 SET_ALLOW(harmony_default_parameters);
4813 SET_ALLOW(harmony_destructuring); 4812 SET_ALLOW(harmony_destructuring);
4814 SET_ALLOW(harmony_new_target);
4815 SET_ALLOW(strong_mode); 4813 SET_ALLOW(strong_mode);
4816 SET_ALLOW(harmony_do_expressions); 4814 SET_ALLOW(harmony_do_expressions);
4817 #undef SET_ALLOW 4815 #undef SET_ALLOW
4818 } 4816 }
4819 PreParser::PreParseResult result = reusable_preparser_->PreParseLazyFunction( 4817 PreParser::PreParseResult result = reusable_preparser_->PreParseLazyFunction(
4820 language_mode(), function_state_->kind(), scope_->has_simple_parameters(), 4818 language_mode(), function_state_->kind(), scope_->has_simple_parameters(),
4821 logger, bookmark); 4819 logger, bookmark);
4822 if (pre_parse_timer_ != NULL) { 4820 if (pre_parse_timer_ != NULL) {
4823 pre_parse_timer_->Stop(); 4821 pre_parse_timer_->Stop();
4824 } 4822 }
(...skipping 1558 matching lines...) Expand 10 before | Expand all | Expand 10 after
6383 6381
6384 Expression* Parser::SpreadCallNew(Expression* function, 6382 Expression* Parser::SpreadCallNew(Expression* function,
6385 ZoneList<v8::internal::Expression*>* args, 6383 ZoneList<v8::internal::Expression*>* args,
6386 int pos) { 6384 int pos) {
6387 args->InsertAt(0, function, zone()); 6385 args->InsertAt(0, function, zone());
6388 6386
6389 return factory()->NewCallRuntime(Context::REFLECT_CONSTRUCT_INDEX, args, pos); 6387 return factory()->NewCallRuntime(Context::REFLECT_CONSTRUCT_INDEX, args, pos);
6390 } 6388 }
6391 } // namespace internal 6389 } // namespace internal
6392 } // namespace v8 6390 } // 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