| 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 895 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   906       parsing_on_main_thread_(true) { |   906       parsing_on_main_thread_(true) { | 
|   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_arrow_functions(FLAG_harmony_arrow_functions); |   913   set_allow_harmony_arrow_functions(FLAG_harmony_arrow_functions); | 
|   914   set_allow_harmony_sloppy(FLAG_harmony_sloppy); |   914   set_allow_harmony_sloppy(FLAG_harmony_sloppy); | 
|   915   set_allow_harmony_sloppy_let(FLAG_harmony_sloppy_let); |   915   set_allow_harmony_sloppy_let(FLAG_harmony_sloppy_let); | 
|   916   set_allow_harmony_unicode(FLAG_harmony_unicode); |  | 
|   917   set_allow_harmony_computed_property_names( |   916   set_allow_harmony_computed_property_names( | 
|   918       FLAG_harmony_computed_property_names); |   917       FLAG_harmony_computed_property_names); | 
|   919   set_allow_harmony_rest_parameters(FLAG_harmony_rest_parameters); |   918   set_allow_harmony_rest_parameters(FLAG_harmony_rest_parameters); | 
|   920   set_allow_harmony_spreadcalls(FLAG_harmony_spreadcalls); |   919   set_allow_harmony_spreadcalls(FLAG_harmony_spreadcalls); | 
|   921   set_allow_harmony_destructuring(FLAG_harmony_destructuring); |   920   set_allow_harmony_destructuring(FLAG_harmony_destructuring); | 
|   922   set_allow_harmony_spread_arrays(FLAG_harmony_spread_arrays); |   921   set_allow_harmony_spread_arrays(FLAG_harmony_spread_arrays); | 
|   923   set_allow_harmony_new_target(FLAG_harmony_new_target); |   922   set_allow_harmony_new_target(FLAG_harmony_new_target); | 
|   924   set_allow_strong_mode(FLAG_strong_mode); |   923   set_allow_strong_mode(FLAG_strong_mode); | 
|   925   set_allow_legacy_const(FLAG_legacy_const); |   924   set_allow_legacy_const(FLAG_legacy_const); | 
|   926   for (int feature = 0; feature < v8::Isolate::kUseCounterFeatureCount; |   925   for (int feature = 0; feature < v8::Isolate::kUseCounterFeatureCount; | 
| (...skipping 3559 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  4486  |  4485  | 
|  4487   if (reusable_preparser_ == NULL) { |  4486   if (reusable_preparser_ == NULL) { | 
|  4488     reusable_preparser_ = new PreParser(zone(), &scanner_, ast_value_factory(), |  4487     reusable_preparser_ = new PreParser(zone(), &scanner_, ast_value_factory(), | 
|  4489                                         NULL, stack_limit_); |  4488                                         NULL, stack_limit_); | 
|  4490     reusable_preparser_->set_allow_lazy(true); |  4489     reusable_preparser_->set_allow_lazy(true); | 
|  4491 #define SET_ALLOW(name) reusable_preparser_->set_allow_##name(allow_##name()); |  4490 #define SET_ALLOW(name) reusable_preparser_->set_allow_##name(allow_##name()); | 
|  4492     SET_ALLOW(natives); |  4491     SET_ALLOW(natives); | 
|  4493     SET_ALLOW(harmony_arrow_functions); |  4492     SET_ALLOW(harmony_arrow_functions); | 
|  4494     SET_ALLOW(harmony_sloppy); |  4493     SET_ALLOW(harmony_sloppy); | 
|  4495     SET_ALLOW(harmony_sloppy_let); |  4494     SET_ALLOW(harmony_sloppy_let); | 
|  4496     SET_ALLOW(harmony_unicode); |  | 
|  4497     SET_ALLOW(harmony_computed_property_names); |  4495     SET_ALLOW(harmony_computed_property_names); | 
|  4498     SET_ALLOW(harmony_rest_parameters); |  4496     SET_ALLOW(harmony_rest_parameters); | 
|  4499     SET_ALLOW(harmony_spreadcalls); |  4497     SET_ALLOW(harmony_spreadcalls); | 
|  4500     SET_ALLOW(harmony_destructuring); |  4498     SET_ALLOW(harmony_destructuring); | 
|  4501     SET_ALLOW(harmony_spread_arrays); |  4499     SET_ALLOW(harmony_spread_arrays); | 
|  4502     SET_ALLOW(harmony_new_target); |  4500     SET_ALLOW(harmony_new_target); | 
|  4503     SET_ALLOW(strong_mode); |  4501     SET_ALLOW(strong_mode); | 
|  4504 #undef SET_ALLOW |  4502 #undef SET_ALLOW | 
|  4505   } |  4503   } | 
|  4506   PreParser::PreParseResult result = reusable_preparser_->PreParseLazyFunction( |  4504   PreParser::PreParseResult result = reusable_preparser_->PreParseLazyFunction( | 
| (...skipping 1507 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  6014 Expression* Parser::SpreadCallNew(Expression* function, |  6012 Expression* Parser::SpreadCallNew(Expression* function, | 
|  6015                                   ZoneList<v8::internal::Expression*>* args, |  6013                                   ZoneList<v8::internal::Expression*>* args, | 
|  6016                                   int pos) { |  6014                                   int pos) { | 
|  6017   args->InsertAt(0, function, zone()); |  6015   args->InsertAt(0, function, zone()); | 
|  6018  |  6016  | 
|  6019   return factory()->NewCallRuntime( |  6017   return factory()->NewCallRuntime( | 
|  6020       ast_value_factory()->reflect_construct_string(), NULL, args, pos); |  6018       ast_value_factory()->reflect_construct_string(), NULL, args, pos); | 
|  6021 } |  6019 } | 
|  6022 }  // namespace internal |  6020 }  // namespace internal | 
|  6023 }  // namespace v8 |  6021 }  // namespace v8 | 
| OLD | NEW |