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

Unified Diff: src/wasm/module-decoder.cc

Issue 1974933002: [wasm] Remove the use of the "external" bit on OldFunctions section. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove unused variable. Created 4 years, 7 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 | « src/wasm/encoder.cc ('k') | src/wasm/wasm-module.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/module-decoder.cc
diff --git a/src/wasm/module-decoder.cc b/src/wasm/module-decoder.cc
index 56984463840bb20d0eea18e02c4ed8d40af7d99f..a95a13b961acc90255a63d8dda1ffa7f8c3e4dad 100644
--- a/src/wasm/module-decoder.cc
+++ b/src/wasm/module-decoder.cc
@@ -176,8 +176,7 @@ class ModuleDecoder : public Decoder {
0, // local_i64_count
0, // local_f32_count
0, // local_f64_count
- false, // exported
- false}); // external
+ false}); // exported
WasmFunction* function = &module->functions.back();
function->sig_index = consume_sig_index(module, &function->sig);
}
@@ -235,8 +234,7 @@ class ModuleDecoder : public Decoder {
0, // local_i64_count
0, // local_f32_count
0, // local_f64_count
- false, // exported
- false}); // external
+ false}); // exported
WasmFunction* function = &module->functions.back();
DecodeFunctionInModule(module, function, false);
}
@@ -244,10 +242,9 @@ class ModuleDecoder : public Decoder {
for (uint32_t i = 0; i < functions_count; i++) {
if (failed()) break;
WasmFunction* function = &module->functions[i];
- if (!function->external) {
- VerifyFunctionBody(i, &menv, function);
- if (result_.failed())
- error(result_.error_pc, result_.error_msg.get());
+ VerifyFunctionBody(i, &menv, function);
+ if (result_.failed()) {
+ error(result_.error_pc, result_.error_msg.get());
}
}
}
@@ -474,7 +471,6 @@ class ModuleDecoder : public Decoder {
function->code_start_offset = off(pc_); // ---- code start
function->code_end_offset = off(limit_); // ---- code end
function->exported = false; // ---- exported
- function->external = false; // ---- external
if (ok()) VerifyFunctionBody(0, module_env, function);
@@ -523,13 +519,11 @@ class ModuleDecoder : public Decoder {
function->sig = module->signatures[function->sig_index];
}
- TRACE(" +%d <function attributes:%s%s%s%s%s>\n",
+ TRACE(" +%d <function attributes:%s%s%s>\n",
static_cast<int>(pc_ - start_),
decl_bits & kDeclFunctionName ? " name" : "",
- decl_bits & kDeclFunctionImport ? " imported" : "",
decl_bits & kDeclFunctionLocals ? " locals" : "",
- decl_bits & kDeclFunctionExport ? " exported" : "",
- (decl_bits & kDeclFunctionImport) == 0 ? " body" : "");
+ decl_bits & kDeclFunctionExport ? " exported" : "");
function->exported = decl_bits & kDeclFunctionExport;
@@ -538,12 +532,6 @@ class ModuleDecoder : public Decoder {
consume_string(&function->name_length, function->exported);
}
- // Imported functions have no locals or body.
- if (decl_bits & kDeclFunctionImport) {
- function->external = true;
- return;
- }
-
if (decl_bits & kDeclFunctionLocals) {
function->local_i32_count = consume_u16("i32 count");
function->local_i64_count = consume_u16("i64 count");
« no previous file with comments | « src/wasm/encoder.cc ('k') | src/wasm/wasm-module.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698