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/parsing/parser.h" | 5 #include "src/parsing/parser.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "src/api.h" | 9 #include "src/api.h" |
10 #include "src/ast/ast-expression-rewriter.h" | 10 #include "src/ast/ast-expression-rewriter.h" |
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
552 set_allow_harmony_restrictive_generators(FLAG_harmony_restrictive_generators); | 552 set_allow_harmony_restrictive_generators(FLAG_harmony_restrictive_generators); |
553 set_allow_harmony_trailing_commas(FLAG_harmony_trailing_commas); | 553 set_allow_harmony_trailing_commas(FLAG_harmony_trailing_commas); |
554 set_allow_harmony_class_fields(FLAG_harmony_class_fields); | 554 set_allow_harmony_class_fields(FLAG_harmony_class_fields); |
555 set_allow_harmony_object_spread(FLAG_harmony_object_spread); | 555 set_allow_harmony_object_spread(FLAG_harmony_object_spread); |
556 for (int feature = 0; feature < v8::Isolate::kUseCounterFeatureCount; | 556 for (int feature = 0; feature < v8::Isolate::kUseCounterFeatureCount; |
557 ++feature) { | 557 ++feature) { |
558 use_counts_[feature] = 0; | 558 use_counts_[feature] = 0; |
559 } | 559 } |
560 if (info->ast_value_factory() == NULL) { | 560 if (info->ast_value_factory() == NULL) { |
561 // info takes ownership of AstValueFactory. | 561 // info takes ownership of AstValueFactory. |
562 info->set_ast_value_factory(new AstValueFactory( | 562 info->set_ast_value_factory(new AstValueFactory(zone(), info->hash_seed())); |
563 zone(), info->isolate()->ast_string_constants(), info->hash_seed())); | |
564 info->set_ast_value_factory_owned(); | 563 info->set_ast_value_factory_owned(); |
565 ast_value_factory_ = info->ast_value_factory(); | 564 ast_value_factory_ = info->ast_value_factory(); |
566 ast_node_factory_.set_ast_value_factory(ast_value_factory_); | 565 ast_node_factory_.set_ast_value_factory(ast_value_factory_); |
567 } | 566 } |
568 } | 567 } |
569 | 568 |
570 void Parser::DeserializeScopeChain( | 569 void Parser::DeserializeScopeChain( |
571 ParseInfo* info, MaybeHandle<ScopeInfo> maybe_outer_scope_info) { | 570 ParseInfo* info, MaybeHandle<ScopeInfo> maybe_outer_scope_info) { |
572 DCHECK(ThreadId::Current().Equals(info->isolate()->thread_id())); | 571 DCHECK(ThreadId::Current().Equals(info->isolate()->thread_id())); |
573 // TODO(wingo): Add an outer SCRIPT_SCOPE corresponding to the native | 572 // TODO(wingo): Add an outer SCRIPT_SCOPE corresponding to the native |
(...skipping 4547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5121 | 5120 |
5122 return final_loop; | 5121 return final_loop; |
5123 } | 5122 } |
5124 | 5123 |
5125 #undef CHECK_OK | 5124 #undef CHECK_OK |
5126 #undef CHECK_OK_VOID | 5125 #undef CHECK_OK_VOID |
5127 #undef CHECK_FAILED | 5126 #undef CHECK_FAILED |
5128 | 5127 |
5129 } // namespace internal | 5128 } // namespace internal |
5130 } // namespace v8 | 5129 } // namespace v8 |
OLD | NEW |