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

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

Issue 2618553004: [compiler] Collect eager inner functions for compilation during renumbering. (Closed)
Patch Set: Move to ThreadedList 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/full-codegen/full-codegen.cc » ('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 1829 matching lines...) Expand 10 before | Expand all | Expand 10 after
1984 impl.builder_->WriteAsmJsOffsetTable(*asm_offsets_buffer); 1984 impl.builder_->WriteAsmJsOffsetTable(*asm_offsets_buffer);
1985 return {module_buffer, asm_offsets_buffer, success}; 1985 return {module_buffer, asm_offsets_buffer, success};
1986 } 1986 }
1987 1987
1988 const char* AsmWasmBuilder::foreign_init_name = "__foreign_init__"; 1988 const char* AsmWasmBuilder::foreign_init_name = "__foreign_init__";
1989 const char* AsmWasmBuilder::single_function_name = "__single_function__"; 1989 const char* AsmWasmBuilder::single_function_name = "__single_function__";
1990 1990
1991 } // namespace wasm 1991 } // namespace wasm
1992 } // namespace internal 1992 } // namespace internal
1993 } // namespace v8 1993 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/ast/ast-numbering.h » ('j') | src/full-codegen/full-codegen.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698