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

Unified Diff: test/cctest/wasm/test-signatures.h

Issue 1616973004: [wasm] Add utilities to print out WASM ast directly from the bytes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix arm64, use AddIndirectFunctionTable() more. Created 4 years, 11 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 | « test/cctest/wasm/test-run-wasm.cc ('k') | test/cctest/wasm/wasm-run-utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/wasm/test-signatures.h
diff --git a/test/cctest/wasm/test-signatures.h b/test/cctest/wasm/test-signatures.h
index 30ea6053868049ced486059a239924342cdd3943..a5bc7b4f14b83d495d917fe3615452c13917259a 100644
--- a/test/cctest/wasm/test-signatures.h
+++ b/test/cctest/wasm/test-signatures.h
@@ -72,6 +72,15 @@ class TestSignatures {
FunctionSig* v_ii() { return &sig_v_ii; }
FunctionSig* v_iii() { return &sig_v_iii; }
+ FunctionSig* many(Zone* zone, LocalType ret, LocalType param, int count) {
+ FunctionSig::Builder builder(zone, ret == kAstStmt ? 0 : 1, count);
+ if (ret != kAstStmt) builder.AddReturn(ret);
+ for (int i = 0; i < count; i++) {
+ builder.AddParam(param);
+ }
+ return builder.Build();
+ }
+
private:
LocalType kIntTypes4[4];
LocalType kLongTypes4[4];
« no previous file with comments | « test/cctest/wasm/test-run-wasm.cc ('k') | test/cctest/wasm/wasm-run-utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698