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

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

Issue 2065453002: [module] Track script "module code" status Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Use idiomatic variable names Created 4 years, 5 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/objects-inl.h ('k') | test/cctest/heap/test-heap.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 "src/api.h" 7 #include "src/api.h"
8 #include "src/ast/ast.h" 8 #include "src/ast/ast.h"
9 #include "src/ast/ast-expression-rewriter.h" 9 #include "src/ast/ast-expression-rewriter.h"
10 #include "src/ast/ast-expression-visitor.h" 10 #include "src/ast/ast-expression-visitor.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 set_lazy(); 69 set_lazy();
70 set_hash_seed(isolate_->heap()->HashSeed()); 70 set_hash_seed(isolate_->heap()->HashSeed());
71 set_stack_limit(isolate_->stack_guard()->real_climit()); 71 set_stack_limit(isolate_->stack_guard()->real_climit());
72 set_unicode_cache(isolate_->unicode_cache()); 72 set_unicode_cache(isolate_->unicode_cache());
73 set_language_mode(shared->language_mode()); 73 set_language_mode(shared->language_mode());
74 set_shared_info(shared); 74 set_shared_info(shared);
75 75
76 Handle<Script> script(Script::cast(shared->script())); 76 Handle<Script> script(Script::cast(shared->script()));
77 set_script(script); 77 set_script(script);
78
79 if (script->is_module()) {
80 set_module();
81 }
82
78 if (!script.is_null() && script->type() == Script::TYPE_NATIVE) { 83 if (!script.is_null() && script->type() == Script::TYPE_NATIVE) {
79 set_native(); 84 set_native();
80 } 85 }
81 } 86 }
82 87
83 88
84 ParseInfo::ParseInfo(Zone* zone, Handle<Script> script) : ParseInfo(zone) { 89 ParseInfo::ParseInfo(Zone* zone, Handle<Script> script) : ParseInfo(zone) {
85 isolate_ = script->GetIsolate(); 90 isolate_ = script->GetIsolate();
86 91
87 set_hash_seed(isolate_->heap()->HashSeed()); 92 set_hash_seed(isolate_->heap()->HashSeed());
88 set_stack_limit(isolate_->stack_guard()->real_climit()); 93 set_stack_limit(isolate_->stack_guard()->real_climit());
89 set_unicode_cache(isolate_->unicode_cache()); 94 set_unicode_cache(isolate_->unicode_cache());
90 set_script(script); 95 set_script(script);
91 96
97 if (script->is_module()) {
98 set_module();
99 }
100
92 if (script->type() == Script::TYPE_NATIVE) { 101 if (script->type() == Script::TYPE_NATIVE) {
93 set_native(); 102 set_native();
94 } 103 }
95 } 104 }
96 105
97 106
98 FunctionEntry ParseData::GetFunctionEntry(int start) { 107 FunctionEntry ParseData::GetFunctionEntry(int start) {
99 // The current pre-data entry must be a FunctionEntry with the given 108 // The current pre-data entry must be a FunctionEntry with the given
100 // start position. 109 // start position.
101 if ((function_index_ + FunctionEntry::kSize <= Length()) && 110 if ((function_index_ + FunctionEntry::kSize <= Length()) &&
(...skipping 6895 matching lines...) Expand 10 before | Expand all | Expand 10 after
6997 try_block, target); 7006 try_block, target);
6998 final_loop = target; 7007 final_loop = target;
6999 } 7008 }
7000 7009
7001 return final_loop; 7010 return final_loop;
7002 } 7011 }
7003 7012
7004 7013
7005 } // namespace internal 7014 } // namespace internal
7006 } // namespace v8 7015 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | test/cctest/heap/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698