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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef TEST_SIGNATURES_H 5 #ifndef TEST_SIGNATURES_H
6 #define TEST_SIGNATURES_H 6 #define TEST_SIGNATURES_H
7 7
8 #include "src/signature.h" 8 #include "src/signature.h"
9 #include "src/wasm/wasm-opcodes.h" 9 #include "src/wasm/wasm-opcodes.h"
10 10
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 FunctionSig* i_ll() { return &sig_i_ll; } 65 FunctionSig* i_ll() { return &sig_i_ll; }
66 66
67 FunctionSig* f_ff() { return &sig_f_ff; } 67 FunctionSig* f_ff() { return &sig_f_ff; }
68 FunctionSig* d_dd() { return &sig_d_dd; } 68 FunctionSig* d_dd() { return &sig_d_dd; }
69 69
70 FunctionSig* v_v() { return &sig_v_v; } 70 FunctionSig* v_v() { return &sig_v_v; }
71 FunctionSig* v_i() { return &sig_v_i; } 71 FunctionSig* v_i() { return &sig_v_i; }
72 FunctionSig* v_ii() { return &sig_v_ii; } 72 FunctionSig* v_ii() { return &sig_v_ii; }
73 FunctionSig* v_iii() { return &sig_v_iii; } 73 FunctionSig* v_iii() { return &sig_v_iii; }
74 74
75 FunctionSig* many(Zone* zone, LocalType ret, LocalType param, int count) {
76 FunctionSig::Builder builder(zone, ret == kAstStmt ? 0 : 1, count);
77 if (ret != kAstStmt) builder.AddReturn(ret);
78 for (int i = 0; i < count; i++) {
79 builder.AddParam(param);
80 }
81 return builder.Build();
82 }
83
75 private: 84 private:
76 LocalType kIntTypes4[4]; 85 LocalType kIntTypes4[4];
77 LocalType kLongTypes4[4]; 86 LocalType kLongTypes4[4];
78 LocalType kFloatTypes4[4]; 87 LocalType kFloatTypes4[4];
79 LocalType kDoubleTypes4[4]; 88 LocalType kDoubleTypes4[4];
80 LocalType kIntLongTypes4[4]; 89 LocalType kIntLongTypes4[4];
81 LocalType kIntFloatTypes4[4]; 90 LocalType kIntFloatTypes4[4];
82 LocalType kIntDoubleTypes4[4]; 91 LocalType kIntDoubleTypes4[4];
83 92
84 FunctionSig sig_i_v; 93 FunctionSig sig_i_v;
(...skipping 17 matching lines...) Expand all
102 FunctionSig sig_v_v; 111 FunctionSig sig_v_v;
103 FunctionSig sig_v_i; 112 FunctionSig sig_v_i;
104 FunctionSig sig_v_ii; 113 FunctionSig sig_v_ii;
105 FunctionSig sig_v_iii; 114 FunctionSig sig_v_iii;
106 }; 115 };
107 } // namespace wasm 116 } // namespace wasm
108 } // namespace internal 117 } // namespace internal
109 } // namespace v8 118 } // namespace v8
110 119
111 #endif // TEST_SIGNATURES_H 120 #endif // TEST_SIGNATURES_H
OLDNEW
« 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