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

Side by Side Diff: src/parser.cc

Issue 1125183008: [es6] Spread in array literals (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: cleanup Created 5 years, 7 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/mips64/full-codegen-mips64.cc ('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 860 matching lines...) Expand 10 before | Expand all | Expand 10 after
871 set_allow_harmony_arrow_functions(FLAG_harmony_arrow_functions); 871 set_allow_harmony_arrow_functions(FLAG_harmony_arrow_functions);
872 set_allow_harmony_classes(FLAG_harmony_classes); 872 set_allow_harmony_classes(FLAG_harmony_classes);
873 set_allow_harmony_object_literals(FLAG_harmony_object_literals); 873 set_allow_harmony_object_literals(FLAG_harmony_object_literals);
874 set_allow_harmony_sloppy(FLAG_harmony_sloppy); 874 set_allow_harmony_sloppy(FLAG_harmony_sloppy);
875 set_allow_harmony_unicode(FLAG_harmony_unicode); 875 set_allow_harmony_unicode(FLAG_harmony_unicode);
876 set_allow_harmony_computed_property_names( 876 set_allow_harmony_computed_property_names(
877 FLAG_harmony_computed_property_names); 877 FLAG_harmony_computed_property_names);
878 set_allow_harmony_rest_params(FLAG_harmony_rest_parameters); 878 set_allow_harmony_rest_params(FLAG_harmony_rest_parameters);
879 set_allow_harmony_spreadcalls(FLAG_harmony_spreadcalls); 879 set_allow_harmony_spreadcalls(FLAG_harmony_spreadcalls);
880 set_allow_harmony_destructuring(FLAG_harmony_destructuring); 880 set_allow_harmony_destructuring(FLAG_harmony_destructuring);
881 set_allow_harmony_spread_arrays(FLAG_harmony_spread_arrays);
881 set_allow_strong_mode(FLAG_strong_mode); 882 set_allow_strong_mode(FLAG_strong_mode);
882 for (int feature = 0; feature < v8::Isolate::kUseCounterFeatureCount; 883 for (int feature = 0; feature < v8::Isolate::kUseCounterFeatureCount;
883 ++feature) { 884 ++feature) {
884 use_counts_[feature] = 0; 885 use_counts_[feature] = 0;
885 } 886 }
886 if (info->ast_value_factory() == NULL) { 887 if (info->ast_value_factory() == NULL) {
887 // info takes ownership of AstValueFactory. 888 // info takes ownership of AstValueFactory.
888 info->set_ast_value_factory(new AstValueFactory(zone(), info->hash_seed())); 889 info->set_ast_value_factory(new AstValueFactory(zone(), info->hash_seed()));
889 info->set_ast_value_factory_owned(); 890 info->set_ast_value_factory_owned();
890 ast_value_factory_ = info->ast_value_factory(); 891 ast_value_factory_ = info->ast_value_factory();
(...skipping 3390 matching lines...) Expand 10 before | Expand all | Expand 10 after
4281 reusable_preparser_->set_allow_harmony_sloppy(allow_harmony_sloppy()); 4282 reusable_preparser_->set_allow_harmony_sloppy(allow_harmony_sloppy());
4282 reusable_preparser_->set_allow_harmony_unicode(allow_harmony_unicode()); 4283 reusable_preparser_->set_allow_harmony_unicode(allow_harmony_unicode());
4283 reusable_preparser_->set_allow_harmony_computed_property_names( 4284 reusable_preparser_->set_allow_harmony_computed_property_names(
4284 allow_harmony_computed_property_names()); 4285 allow_harmony_computed_property_names());
4285 reusable_preparser_->set_allow_harmony_rest_params( 4286 reusable_preparser_->set_allow_harmony_rest_params(
4286 allow_harmony_rest_params()); 4287 allow_harmony_rest_params());
4287 reusable_preparser_->set_allow_harmony_spreadcalls( 4288 reusable_preparser_->set_allow_harmony_spreadcalls(
4288 allow_harmony_spreadcalls()); 4289 allow_harmony_spreadcalls());
4289 reusable_preparser_->set_allow_harmony_destructuring( 4290 reusable_preparser_->set_allow_harmony_destructuring(
4290 allow_harmony_destructuring()); 4291 allow_harmony_destructuring());
4292 reusable_preparser_->set_allow_harmony_spread_arrays(
4293 allow_harmony_spread_arrays());
4291 reusable_preparser_->set_allow_strong_mode(allow_strong_mode()); 4294 reusable_preparser_->set_allow_strong_mode(allow_strong_mode());
4292 } 4295 }
4293 PreParser::PreParseResult result = reusable_preparser_->PreParseLazyFunction( 4296 PreParser::PreParseResult result = reusable_preparser_->PreParseLazyFunction(
4294 language_mode(), function_state_->kind(), logger, bookmark); 4297 language_mode(), function_state_->kind(), logger, bookmark);
4295 if (pre_parse_timer_ != NULL) { 4298 if (pre_parse_timer_ != NULL) {
4296 pre_parse_timer_->Stop(); 4299 pre_parse_timer_->Stop();
4297 } 4300 }
4298 return result; 4301 return result;
4299 } 4302 }
4300 4303
(...skipping 1502 matching lines...) Expand 10 before | Expand all | Expand 10 after
5803 5806
5804 Expression* Parser::SpreadCallNew(Expression* function, 5807 Expression* Parser::SpreadCallNew(Expression* function,
5805 ZoneList<v8::internal::Expression*>* args, 5808 ZoneList<v8::internal::Expression*>* args,
5806 int pos) { 5809 int pos) {
5807 args->InsertAt(0, function, zone()); 5810 args->InsertAt(0, function, zone());
5808 5811
5809 return factory()->NewCallRuntime( 5812 return factory()->NewCallRuntime(
5810 ast_value_factory()->reflect_construct_string(), NULL, args, pos); 5813 ast_value_factory()->reflect_construct_string(), NULL, args, pos);
5811 } 5814 }
5812 } } // namespace v8::internal 5815 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips64/full-codegen-mips64.cc ('k') | src/preparser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698