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

Side by Side Diff: src/asmjs/asm-wasm-builder.cc

Issue 2618553004: [compiler] Collect eager inner functions for compilation during renumbering. (Closed)
Patch Set: Remove unused variable 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 | « no previous file | src/ast/ast-numbering.h » ('j') | src/ast/ast-numbering.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 // Required to get M_E etc. in MSVC. 7 // Required to get M_E etc. in MSVC.
8 #if defined(_WIN32) 8 #if defined(_WIN32)
9 #define _USE_MATH_DEFINES 9 #define _USE_MATH_DEFINES
10 #endif 10 #endif
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 133
134 void VisitFunctionDeclaration(FunctionDeclaration* decl) { 134 void VisitFunctionDeclaration(FunctionDeclaration* decl) {
135 DCHECK_EQ(kModuleScope, scope_); 135 DCHECK_EQ(kModuleScope, scope_);
136 DCHECK_NULL(current_function_builder_); 136 DCHECK_NULL(current_function_builder_);
137 FunctionLiteral* old_func = decl->fun(); 137 FunctionLiteral* old_func = decl->fun();
138 Zone zone(isolate_->allocator(), ZONE_NAME); 138 Zone zone(isolate_->allocator(), ZONE_NAME);
139 DeclarationScope* new_func_scope = nullptr; 139 DeclarationScope* new_func_scope = nullptr;
140 if (decl->fun()->body() == nullptr) { 140 if (decl->fun()->body() == nullptr) {
141 // TODO(titzer/bradnelson): Reuse SharedFunctionInfos used here when 141 // TODO(titzer/bradnelson): Reuse SharedFunctionInfos used here when
142 // compiling the wasm module. 142 // compiling the wasm module.
143 Handle<SharedFunctionInfo> shared = Compiler::GetSharedFunctionInfo( 143 Handle<SharedFunctionInfo> shared =
144 decl->fun(), script_, info_, LazyCompilationMode::kAlways); 144 Compiler::GetSharedFunctionInfo(decl->fun(), script_, info_);
145 shared->set_is_toplevel(false); 145 shared->set_is_toplevel(false);
146 ParseInfo info(&zone, script_); 146 ParseInfo info(&zone, script_);
147 info.set_shared_info(shared); 147 info.set_shared_info(shared);
148 info.set_toplevel(false); 148 info.set_toplevel(false);
149 info.set_language_mode(decl->fun()->scope()->language_mode()); 149 info.set_language_mode(decl->fun()->scope()->language_mode());
150 info.set_allow_lazy_parsing(false); 150 info.set_allow_lazy_parsing(false);
151 info.set_function_literal_id(shared->function_literal_id()); 151 info.set_function_literal_id(shared->function_literal_id());
152 info.set_ast_value_factory(ast_value_factory_); 152 info.set_ast_value_factory(ast_value_factory_);
153 info.set_ast_value_factory_owned(false); 153 info.set_ast_value_factory_owned(false);
154 // Create fresh function scope to use to parse the function in. 154 // Create fresh function scope to use to parse the function in.
(...skipping 1824 matching lines...) Expand 10 before | Expand all | Expand 10 after
1979 impl.builder_->WriteAsmJsOffsetTable(*asm_offsets_buffer); 1979 impl.builder_->WriteAsmJsOffsetTable(*asm_offsets_buffer);
1980 return {module_buffer, asm_offsets_buffer, success}; 1980 return {module_buffer, asm_offsets_buffer, success};
1981 } 1981 }
1982 1982
1983 const char* AsmWasmBuilder::foreign_init_name = "__foreign_init__"; 1983 const char* AsmWasmBuilder::foreign_init_name = "__foreign_init__";
1984 const char* AsmWasmBuilder::single_function_name = "__single_function__"; 1984 const char* AsmWasmBuilder::single_function_name = "__single_function__";
1985 1985
1986 } // namespace wasm 1986 } // namespace wasm
1987 } // namespace internal 1987 } // namespace internal
1988 } // namespace v8 1988 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/ast/ast-numbering.h » ('j') | src/ast/ast-numbering.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698