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

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

Issue 1745863002: [wasm] Allocate WasmModule and WasmModuleInstance vectors inline. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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/compiler/wasm-compiler.cc ('k') | src/wasm/module-decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/ast-decoder.cc
diff --git a/src/wasm/ast-decoder.cc b/src/wasm/ast-decoder.cc
index c97c781c12eeab411b68b2fbc242dcf91c15adda..e6e9bb49f40430e7b9621610f6cd3d6335969392 100644
--- a/src/wasm/ast-decoder.cc
+++ b/src/wasm/ast-decoder.cc
@@ -146,8 +146,8 @@ class WasmDecoder : public Decoder {
inline bool Validate(const byte* pc, GlobalIndexOperand& operand) {
ModuleEnv* m = function_env_->module;
- if (m && m->module && operand.index < m->module->globals->size()) {
- operand.machine_type = m->module->globals->at(operand.index).type;
+ if (m && m->module && operand.index < m->module->globals.size()) {
+ operand.machine_type = m->module->globals[operand.index].type;
operand.type = WasmOpcodes::LocalTypeFor(operand.machine_type);
return true;
}
@@ -157,8 +157,8 @@ class WasmDecoder : public Decoder {
inline bool Validate(const byte* pc, FunctionIndexOperand& operand) {
ModuleEnv* m = function_env_->module;
- if (m && m->module && operand.index < m->module->functions->size()) {
- operand.sig = m->module->functions->at(operand.index).sig;
+ if (m && m->module && operand.index < m->module->functions.size()) {
+ operand.sig = m->module->functions[operand.index].sig;
return true;
}
error(pc, pc + 1, "invalid function index");
@@ -167,8 +167,8 @@ class WasmDecoder : public Decoder {
inline bool Validate(const byte* pc, SignatureIndexOperand& operand) {
ModuleEnv* m = function_env_->module;
- if (m && m->module && operand.index < m->module->signatures->size()) {
- operand.sig = m->module->signatures->at(operand.index);
+ if (m && m->module && operand.index < m->module->signatures.size()) {
+ operand.sig = m->module->signatures[operand.index];
return true;
}
error(pc, pc + 1, "invalid signature index");
@@ -177,8 +177,8 @@ class WasmDecoder : public Decoder {
inline bool Validate(const byte* pc, ImportIndexOperand& operand) {
ModuleEnv* m = function_env_->module;
- if (m && m->module && operand.index < m->module->import_table->size()) {
- operand.sig = m->module->import_table->at(operand.index).sig;
+ if (m && m->module && operand.index < m->module->import_table.size()) {
+ operand.sig = m->module->import_table[operand.index].sig;
return true;
}
error(pc, pc + 1, "invalid signature index");
« no previous file with comments | « src/compiler/wasm-compiler.cc ('k') | src/wasm/module-decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698