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

Side by Side Diff: src/parsing/parser.cc

Issue 2630343002: [Parser] Introduce AstStringConstants to share constants across AstValueFactory (Closed)
Patch Set: Fix test Created 3 years, 11 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/isolate.cc ('k') | test/cctest/asmjs/test-asm-typer.cc » ('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/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
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(zone(), info->hash_seed())); 562 info->set_ast_value_factory(new AstValueFactory(
563 zone(), info->isolate()->ast_string_constants(), info->hash_seed()));
563 info->set_ast_value_factory_owned(); 564 info->set_ast_value_factory_owned();
564 ast_value_factory_ = info->ast_value_factory(); 565 ast_value_factory_ = info->ast_value_factory();
565 ast_node_factory_.set_ast_value_factory(ast_value_factory_); 566 ast_node_factory_.set_ast_value_factory(ast_value_factory_);
566 } 567 }
567 } 568 }
568 569
569 void Parser::DeserializeScopeChain( 570 void Parser::DeserializeScopeChain(
570 ParseInfo* info, MaybeHandle<ScopeInfo> maybe_outer_scope_info) { 571 ParseInfo* info, MaybeHandle<ScopeInfo> maybe_outer_scope_info) {
571 DCHECK(ThreadId::Current().Equals(info->isolate()->thread_id())); 572 DCHECK(ThreadId::Current().Equals(info->isolate()->thread_id()));
572 // TODO(wingo): Add an outer SCRIPT_SCOPE corresponding to the native 573 // TODO(wingo): Add an outer SCRIPT_SCOPE corresponding to the native
(...skipping 4547 matching lines...) Expand 10 before | Expand all | Expand 10 after
5120 5121
5121 return final_loop; 5122 return final_loop;
5122 } 5123 }
5123 5124
5124 #undef CHECK_OK 5125 #undef CHECK_OK
5125 #undef CHECK_OK_VOID 5126 #undef CHECK_OK_VOID
5126 #undef CHECK_FAILED 5127 #undef CHECK_FAILED
5127 5128
5128 } // namespace internal 5129 } // namespace internal
5129 } // namespace v8 5130 } // namespace v8
OLDNEW
« no previous file with comments | « src/isolate.cc ('k') | test/cctest/asmjs/test-asm-typer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698