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

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

Issue 2398023002: [wasm] asm.js - Parse and convert asm.js to wasm a function at a time. (Closed)
Patch Set: fix Created 4 years, 1 month 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/wasm-module-builder.h ('k') | test/cctest/asmjs/test-asm-typer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/wasm-module-builder.cc
diff --git a/src/wasm/wasm-module-builder.cc b/src/wasm/wasm-module-builder.cc
index 7e1002bb4365992602d2293f08bcc044b804b178..4bc569a68ca7d2f8045304944a02fddbe17dc673 100644
--- a/src/wasm/wasm-module-builder.cc
+++ b/src/wasm/wasm-module-builder.cc
@@ -271,8 +271,15 @@ uint32_t WasmModuleBuilder::AddSignature(FunctionSig* sig) {
}
}
-void WasmModuleBuilder::AddIndirectFunction(uint32_t index) {
- indirect_functions_.push_back(index);
+uint32_t WasmModuleBuilder::AllocateIndirectFunctions(uint32_t count) {
+ uint32_t ret = static_cast<uint32_t>(indirect_functions_.size());
+ indirect_functions_.resize(indirect_functions_.size() + count);
+ return ret;
+}
+
+void WasmModuleBuilder::SetIndirectFunction(uint32_t indirect,
+ uint32_t direct) {
+ indirect_functions_[indirect] = direct;
}
uint32_t WasmModuleBuilder::AddImport(const char* name, int name_length,
« no previous file with comments | « src/wasm/wasm-module-builder.h ('k') | test/cctest/asmjs/test-asm-typer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698