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

Unified Diff: src/wasm/wasm-module.h

Issue 2008043006: [wasm] separate snapshot-able stages (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@refactoring
Patch Set: 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/compiler/wasm-compiler.cc ('k') | src/wasm/wasm-module.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/wasm-module.h
diff --git a/src/wasm/wasm-module.h b/src/wasm/wasm-module.h
index cc527dfb9ab7c82e64dcf6c0cfd390a7eb17ded4..4a9faf0b000f63efbdabf051d0afbd4ee7a789d6 100644
--- a/src/wasm/wasm-module.h
+++ b/src/wasm/wasm-module.h
@@ -231,7 +231,11 @@ struct WasmModuleInstance {
byte* globals_start; // start of the globals area.
explicit WasmModuleInstance(const WasmModule* m)
- : module(m), mem_start(nullptr), mem_size(0), globals_start(nullptr) {}
+ : module(m),
+ function_code(m->functions.size()),
+ mem_start(nullptr),
+ mem_size(0),
+ globals_start(nullptr) {}
};
// forward declaration.
@@ -248,7 +252,7 @@ struct ModuleEnv {
bool IsValidGlobal(uint32_t index) {
return module && index < module->globals.size();
}
- bool IsValidFunction(uint32_t index) {
+ bool IsValidFunction(uint32_t index) const {
return module && index < module->functions.size();
}
bool IsValidSignature(uint32_t index) {
@@ -279,7 +283,7 @@ struct ModuleEnv {
bool asm_js() { return origin == kAsmJsOrigin; }
- Handle<Code> GetFunctionCode(uint32_t index);
+ Handle<Code> GetCodeOrPlaceholder(uint32_t index) const;
Handle<Code> GetImportCode(uint32_t index);
Handle<FixedArray> GetFunctionTable();
« no previous file with comments | « src/compiler/wasm-compiler.cc ('k') | src/wasm/wasm-module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698