OLD | NEW |
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 896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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_sloppy_let(FLAG_harmony_sloppy_let); |
917 set_allow_harmony_unicode(FLAG_harmony_unicode); | |
918 set_allow_harmony_computed_property_names( | 917 set_allow_harmony_computed_property_names( |
919 FLAG_harmony_computed_property_names); | 918 FLAG_harmony_computed_property_names); |
920 set_allow_harmony_rest_parameters(FLAG_harmony_rest_parameters); | 919 set_allow_harmony_rest_parameters(FLAG_harmony_rest_parameters); |
921 set_allow_harmony_spreadcalls(FLAG_harmony_spreadcalls); | 920 set_allow_harmony_spreadcalls(FLAG_harmony_spreadcalls); |
922 set_allow_harmony_destructuring(FLAG_harmony_destructuring); | 921 set_allow_harmony_destructuring(FLAG_harmony_destructuring); |
923 set_allow_harmony_spread_arrays(FLAG_harmony_spread_arrays); | 922 set_allow_harmony_spread_arrays(FLAG_harmony_spread_arrays); |
924 set_allow_harmony_new_target(FLAG_harmony_new_target); | 923 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 for (int feature = 0; feature < v8::Isolate::kUseCounterFeatureCount; | 926 for (int feature = 0; feature < v8::Isolate::kUseCounterFeatureCount; |
(...skipping 3544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4472 if (reusable_preparser_ == NULL) { | 4471 if (reusable_preparser_ == NULL) { |
4473 reusable_preparser_ = new PreParser(zone(), &scanner_, ast_value_factory(), | 4472 reusable_preparser_ = new PreParser(zone(), &scanner_, ast_value_factory(), |
4474 NULL, stack_limit_); | 4473 NULL, stack_limit_); |
4475 reusable_preparser_->set_allow_lazy(true); | 4474 reusable_preparser_->set_allow_lazy(true); |
4476 #define SET_ALLOW(name) reusable_preparser_->set_allow_##name(allow_##name()); | 4475 #define SET_ALLOW(name) reusable_preparser_->set_allow_##name(allow_##name()); |
4477 SET_ALLOW(natives); | 4476 SET_ALLOW(natives); |
4478 SET_ALLOW(harmony_modules); | 4477 SET_ALLOW(harmony_modules); |
4479 SET_ALLOW(harmony_arrow_functions); | 4478 SET_ALLOW(harmony_arrow_functions); |
4480 SET_ALLOW(harmony_sloppy); | 4479 SET_ALLOW(harmony_sloppy); |
4481 SET_ALLOW(harmony_sloppy_let); | 4480 SET_ALLOW(harmony_sloppy_let); |
4482 SET_ALLOW(harmony_unicode); | |
4483 SET_ALLOW(harmony_computed_property_names); | 4481 SET_ALLOW(harmony_computed_property_names); |
4484 SET_ALLOW(harmony_rest_parameters); | 4482 SET_ALLOW(harmony_rest_parameters); |
4485 SET_ALLOW(harmony_spreadcalls); | 4483 SET_ALLOW(harmony_spreadcalls); |
4486 SET_ALLOW(harmony_destructuring); | 4484 SET_ALLOW(harmony_destructuring); |
4487 SET_ALLOW(harmony_spread_arrays); | 4485 SET_ALLOW(harmony_spread_arrays); |
4488 SET_ALLOW(harmony_new_target); | 4486 SET_ALLOW(harmony_new_target); |
4489 SET_ALLOW(strong_mode); | 4487 SET_ALLOW(strong_mode); |
4490 #undef SET_ALLOW | 4488 #undef SET_ALLOW |
4491 } | 4489 } |
4492 PreParser::PreParseResult result = reusable_preparser_->PreParseLazyFunction( | 4490 PreParser::PreParseResult result = reusable_preparser_->PreParseLazyFunction( |
(...skipping 1507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6000 Expression* Parser::SpreadCallNew(Expression* function, | 5998 Expression* Parser::SpreadCallNew(Expression* function, |
6001 ZoneList<v8::internal::Expression*>* args, | 5999 ZoneList<v8::internal::Expression*>* args, |
6002 int pos) { | 6000 int pos) { |
6003 args->InsertAt(0, function, zone()); | 6001 args->InsertAt(0, function, zone()); |
6004 | 6002 |
6005 return factory()->NewCallRuntime( | 6003 return factory()->NewCallRuntime( |
6006 ast_value_factory()->reflect_construct_string(), NULL, args, pos); | 6004 ast_value_factory()->reflect_construct_string(), NULL, args, pos); |
6007 } | 6005 } |
6008 } // namespace internal | 6006 } // namespace internal |
6009 } // namespace v8 | 6007 } // namespace v8 |
OLD | NEW |