| 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/bailout-reason.h" | 9 #include "src/bailout-reason.h" |
| 10 #include "src/base/platform/platform.h" | 10 #include "src/base/platform/platform.h" |
| (...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 901 parsing_on_main_thread_(true) { | 901 parsing_on_main_thread_(true) { |
| 902 // Even though we were passed ParseInfo, we should not store it in | 902 // Even though we were passed ParseInfo, we should not store it in |
| 903 // Parser - this makes sure that Isolate is not accidentally accessed via | 903 // Parser - this makes sure that Isolate is not accidentally accessed via |
| 904 // ParseInfo during background parsing. | 904 // ParseInfo during background parsing. |
| 905 DCHECK(!info->script().is_null() || info->source_stream() != NULL); | 905 DCHECK(!info->script().is_null() || info->source_stream() != NULL); |
| 906 set_allow_lazy(info->allow_lazy_parsing()); | 906 set_allow_lazy(info->allow_lazy_parsing()); |
| 907 set_allow_natives(FLAG_allow_natives_syntax || info->is_native()); | 907 set_allow_natives(FLAG_allow_natives_syntax || info->is_native()); |
| 908 set_allow_harmony_modules(!info->is_native() && FLAG_harmony_modules); | 908 set_allow_harmony_modules(!info->is_native() && FLAG_harmony_modules); |
| 909 set_allow_harmony_arrow_functions(FLAG_harmony_arrow_functions); | 909 set_allow_harmony_arrow_functions(FLAG_harmony_arrow_functions); |
| 910 set_allow_harmony_classes(FLAG_harmony_classes); | 910 set_allow_harmony_classes(FLAG_harmony_classes); |
| 911 set_allow_harmony_object_literals(FLAG_harmony_object_literals); | |
| 912 set_allow_harmony_sloppy(FLAG_harmony_sloppy); | 911 set_allow_harmony_sloppy(FLAG_harmony_sloppy); |
| 913 set_allow_harmony_unicode(FLAG_harmony_unicode); | 912 set_allow_harmony_unicode(FLAG_harmony_unicode); |
| 914 set_allow_harmony_computed_property_names( | 913 set_allow_harmony_computed_property_names( |
| 915 FLAG_harmony_computed_property_names); | 914 FLAG_harmony_computed_property_names); |
| 916 set_allow_harmony_rest_params(FLAG_harmony_rest_parameters); | 915 set_allow_harmony_rest_params(FLAG_harmony_rest_parameters); |
| 917 set_allow_harmony_spreadcalls(FLAG_harmony_spreadcalls); | 916 set_allow_harmony_spreadcalls(FLAG_harmony_spreadcalls); |
| 918 set_allow_harmony_destructuring(FLAG_harmony_destructuring); | 917 set_allow_harmony_destructuring(FLAG_harmony_destructuring); |
| 919 set_allow_harmony_spread_arrays(FLAG_harmony_spread_arrays); | 918 set_allow_harmony_spread_arrays(FLAG_harmony_spread_arrays); |
| 920 set_allow_harmony_new_target(FLAG_harmony_new_target); | 919 set_allow_harmony_new_target(FLAG_harmony_new_target); |
| 921 set_allow_strong_mode(FLAG_strong_mode); | 920 set_allow_strong_mode(FLAG_strong_mode); |
| (...skipping 3440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4362 | 4361 |
| 4363 if (reusable_preparser_ == NULL) { | 4362 if (reusable_preparser_ == NULL) { |
| 4364 reusable_preparser_ = new PreParser(zone(), &scanner_, ast_value_factory(), | 4363 reusable_preparser_ = new PreParser(zone(), &scanner_, ast_value_factory(), |
| 4365 NULL, stack_limit_); | 4364 NULL, stack_limit_); |
| 4366 reusable_preparser_->set_allow_lazy(true); | 4365 reusable_preparser_->set_allow_lazy(true); |
| 4367 #define SET_ALLOW(name) reusable_preparser_->set_allow_##name(allow_##name()); | 4366 #define SET_ALLOW(name) reusable_preparser_->set_allow_##name(allow_##name()); |
| 4368 SET_ALLOW(natives); | 4367 SET_ALLOW(natives); |
| 4369 SET_ALLOW(harmony_modules); | 4368 SET_ALLOW(harmony_modules); |
| 4370 SET_ALLOW(harmony_arrow_functions); | 4369 SET_ALLOW(harmony_arrow_functions); |
| 4371 SET_ALLOW(harmony_classes); | 4370 SET_ALLOW(harmony_classes); |
| 4372 SET_ALLOW(harmony_object_literals); | |
| 4373 SET_ALLOW(harmony_sloppy); | 4371 SET_ALLOW(harmony_sloppy); |
| 4374 SET_ALLOW(harmony_unicode); | 4372 SET_ALLOW(harmony_unicode); |
| 4375 SET_ALLOW(harmony_computed_property_names); | 4373 SET_ALLOW(harmony_computed_property_names); |
| 4376 SET_ALLOW(harmony_rest_params); | 4374 SET_ALLOW(harmony_rest_params); |
| 4377 SET_ALLOW(harmony_spreadcalls); | 4375 SET_ALLOW(harmony_spreadcalls); |
| 4378 SET_ALLOW(harmony_destructuring); | 4376 SET_ALLOW(harmony_destructuring); |
| 4379 SET_ALLOW(harmony_spread_arrays); | 4377 SET_ALLOW(harmony_spread_arrays); |
| 4380 SET_ALLOW(harmony_new_target); | 4378 SET_ALLOW(harmony_new_target); |
| 4381 SET_ALLOW(strong_mode); | 4379 SET_ALLOW(strong_mode); |
| 4382 #undef SET_ALLOW | 4380 #undef SET_ALLOW |
| (...skipping 1513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5896 Expression* Parser::SpreadCallNew(Expression* function, | 5894 Expression* Parser::SpreadCallNew(Expression* function, |
| 5897 ZoneList<v8::internal::Expression*>* args, | 5895 ZoneList<v8::internal::Expression*>* args, |
| 5898 int pos) { | 5896 int pos) { |
| 5899 args->InsertAt(0, function, zone()); | 5897 args->InsertAt(0, function, zone()); |
| 5900 | 5898 |
| 5901 return factory()->NewCallRuntime( | 5899 return factory()->NewCallRuntime( |
| 5902 ast_value_factory()->reflect_construct_string(), NULL, args, pos); | 5900 ast_value_factory()->reflect_construct_string(), NULL, args, pos); |
| 5903 } | 5901 } |
| 5904 } // namespace internal | 5902 } // namespace internal |
| 5905 } // namespace v8 | 5903 } // namespace v8 |
| OLD | NEW |