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

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

Issue 2591903003: [wasm] Use Param and Return methods consistently (Closed)
Patch Set: Created 4 years 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 | « no previous file | src/compiler/wasm-compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/wasm-compiler.h
diff --git a/src/compiler/wasm-compiler.h b/src/compiler/wasm-compiler.h
index 654491214fa4f977453769a1ea2af3e20fd7a3bf..c7e69a8e7dfb8f9fe1b4db18b5db97f0767576ab 100644
--- a/src/compiler/wasm-compiler.h
+++ b/src/compiler/wasm-compiler.h
@@ -127,7 +127,7 @@ class WasmGraphBuilder {
//-----------------------------------------------------------------------
Node* Error();
Node* Start(unsigned params);
- Node* Param(unsigned index, wasm::LocalType type);
+ Node* Param(unsigned index);
Node* Loop(Node* entry);
Node* Terminate(Node* effect, Node* control);
Node* Merge(unsigned count, Node** controls);
@@ -166,7 +166,12 @@ class WasmGraphBuilder {
Node* Switch(unsigned count, Node* key);
Node* IfValue(int32_t value, Node* sw);
Node* IfDefault(Node* sw);
- Node* Return(unsigned count, Node** vals);
+ Node* Return(unsigned count, Node** nodes);
+ template <typename... Nodes>
+ Node* Return(Node* fst, Nodes*... more) {
+ Node* arr[] = {fst, more...};
+ return Return(arraysize(arr), arr);
+ }
Node* ReturnVoid();
Node* Unreachable(wasm::WasmCodePosition position);
« no previous file with comments | « no previous file | src/compiler/wasm-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698