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

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

Issue 2384623003: [wasm] [asm.js] Track direct function indices and fixup. (Closed)
Patch Set: fix Created 4 years, 2 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/asmjs/asm-wasm-builder.cc ('k') | src/wasm/wasm-module-builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/wasm-module-builder.h
diff --git a/src/wasm/wasm-module-builder.h b/src/wasm/wasm-module-builder.h
index 915de43383bc0d05c51be49a769a37bfef0cee46..dcaf6c8e86c5bdfc8ff3a9ca11179b5c4796ac15 100644
--- a/src/wasm/wasm-module-builder.h
+++ b/src/wasm/wasm-module-builder.h
@@ -126,6 +126,7 @@ class V8_EXPORT_PRIVATE WasmFunctionBuilder : public ZoneObject {
void EmitWithU8(WasmOpcode opcode, const byte immediate);
void EmitWithU8U8(WasmOpcode opcode, const byte imm1, const byte imm2);
void EmitWithVarInt(WasmOpcode opcode, uint32_t immediate);
+ void EmitDirectCallIndex(uint32_t index);
void SetExported();
void SetName(const char* name, int name_length);
@@ -141,6 +142,12 @@ class V8_EXPORT_PRIVATE WasmFunctionBuilder : public ZoneObject {
explicit WasmFunctionBuilder(WasmModuleBuilder* builder);
friend class WasmModuleBuilder;
friend class WasmTemporary;
+
+ struct DirectCallIndex {
+ size_t offset;
+ uint32_t direct_index;
+ };
+
WasmModuleBuilder* builder_;
LocalDeclEncoder locals_;
uint32_t signature_index_;
@@ -152,6 +159,7 @@ class V8_EXPORT_PRIVATE WasmFunctionBuilder : public ZoneObject {
ZoneVector<uint32_t> i64_temps_;
ZoneVector<uint32_t> f32_temps_;
ZoneVector<uint32_t> f64_temps_;
+ ZoneVector<DirectCallIndex> direct_calls_;
};
class WasmTemporary {
« no previous file with comments | « src/asmjs/asm-wasm-builder.cc ('k') | src/wasm/wasm-module-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698