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

Unified Diff: src/compiler/wasm-compiler.cc

Issue 1763433002: [wasm] Rework encoding of local declarations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/wasm/ast-decoder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/wasm-compiler.cc
diff --git a/src/compiler/wasm-compiler.cc b/src/compiler/wasm-compiler.cc
index 1f3da085790fa6df896b975307c63f1a577a7f0c..4daa7cba1eda77f15543f21047df9c76c57977f7 100644
--- a/src/compiler/wasm-compiler.cc
+++ b/src/compiler/wasm-compiler.cc
@@ -2409,15 +2409,6 @@ Handle<Code> CompileWasmFunction(wasm::ErrorThrower& thrower, Isolate* isolate,
<< wasm::WasmFunctionName(&function, module_env) << std::endl;
os << std::endl;
}
- // Initialize the function environment for decoding.
- wasm::FunctionEnv env;
- env.module = module_env;
- env.sig = function.sig;
- env.local_i32_count = function.local_i32_count;
- env.local_i64_count = function.local_i64_count;
- env.local_f32_count = function.local_f32_count;
- env.local_f64_count = function.local_f64_count;
- env.SumLocals();
// Create a TF graph during decoding.
Zone zone;
@@ -2428,11 +2419,11 @@ Handle<Code> CompileWasmFunction(wasm::ErrorThrower& thrower, Isolate* isolate,
InstructionSelector::SupportedMachineOperatorFlags());
JSGraph jsgraph(isolate, &graph, &common, nullptr, nullptr, &machine);
WasmGraphBuilder builder(&zone, &jsgraph, function.sig);
- wasm::TreeResult result = wasm::BuildTFGraph(
- &builder, &env, // --
- module_env->module->module_start, // --
- module_env->module->module_start + function.code_start_offset, // --
- module_env->module->module_start + function.code_end_offset); // --
+ wasm::FunctionBody body = {
+ module_env, function.sig, module_env->module->module_start,
+ module_env->module->module_start + function.code_start_offset,
+ module_env->module->module_start + function.code_end_offset};
+ wasm::TreeResult result = wasm::BuildTFGraph(&builder, body);
if (result.failed()) {
if (FLAG_trace_wasm_compiler) {
« no previous file with comments | « no previous file | src/wasm/ast-decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698