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

Side by Side Diff: test/mjsunit/wasm/wasm-constants.js

Issue 2421453002: [wasm] Implement {Compile,Runtime}Error; fix traps from start function (Closed)
Patch Set: Fix merge artefact 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 unified diff | Download patch
« no previous file with comments | « test/mjsunit/wasm/table.js ('k') | test/mjsunit/wasm/wasm-module-builder.js » ('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 // Flags: --expose-wasm 5 // Flags: --expose-wasm
6 6
7 function bytes() { 7 function bytes() {
8 var buffer = new ArrayBuffer(arguments.length); 8 var buffer = new ArrayBuffer(arguments.length);
9 var view = new Uint8Array(buffer); 9 var view = new Uint8Array(buffer);
10 for (var i = 0; i < arguments.length; i++) { 10 for (var i = 0; i < arguments.length; i++) {
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 // Useful signatures 92 // Useful signatures
93 var kSig_i_i = makeSig([kAstI32], [kAstI32]); 93 var kSig_i_i = makeSig([kAstI32], [kAstI32]);
94 var kSig_i_l = makeSig([kAstI64], [kAstI32]); 94 var kSig_i_l = makeSig([kAstI64], [kAstI32]);
95 var kSig_i_ii = makeSig([kAstI32, kAstI32], [kAstI32]); 95 var kSig_i_ii = makeSig([kAstI32, kAstI32], [kAstI32]);
96 var kSig_i_iii = makeSig([kAstI32, kAstI32, kAstI32], [kAstI32]); 96 var kSig_i_iii = makeSig([kAstI32, kAstI32, kAstI32], [kAstI32]);
97 var kSig_d_dd = makeSig([kAstF64, kAstF64], [kAstF64]); 97 var kSig_d_dd = makeSig([kAstF64, kAstF64], [kAstF64]);
98 var kSig_l_ll = makeSig([kAstI64, kAstI64], [kAstI64]); 98 var kSig_l_ll = makeSig([kAstI64, kAstI64], [kAstI64]);
99 var kSig_i_dd = makeSig([kAstF64, kAstF64], [kAstI32]); 99 var kSig_i_dd = makeSig([kAstF64, kAstF64], [kAstI32]);
100 var kSig_v_v = makeSig([], []); 100 var kSig_v_v = makeSig([], []);
101 var kSig_i_v = makeSig([], [kAstI32]); 101 var kSig_i_v = makeSig([], [kAstI32]);
102 var kSig_l_v = makeSig([], [kAstI64]);
102 var kSig_f_v = makeSig([], [kAstF64]); 103 var kSig_f_v = makeSig([], [kAstF64]);
103 var kSig_d_v = makeSig([], [kAstF64]); 104 var kSig_d_v = makeSig([], [kAstF64]);
104 var kSig_v_i = makeSig([kAstI32], []); 105 var kSig_v_i = makeSig([kAstI32], []);
105 var kSig_v_ii = makeSig([kAstI32, kAstI32], []); 106 var kSig_v_ii = makeSig([kAstI32, kAstI32], []);
106 var kSig_v_iii = makeSig([kAstI32, kAstI32, kAstI32], []); 107 var kSig_v_iii = makeSig([kAstI32, kAstI32, kAstI32], []);
108 var kSig_v_l = makeSig([kAstI64], []);
107 var kSig_v_d = makeSig([kAstF64], []); 109 var kSig_v_d = makeSig([kAstF64], []);
108 var kSig_v_dd = makeSig([kAstF64, kAstF64], []); 110 var kSig_v_dd = makeSig([kAstF64, kAstF64], []);
109 var kSig_v_ddi = makeSig([kAstF64, kAstF64, kAstI32], []); 111 var kSig_v_ddi = makeSig([kAstF64, kAstF64, kAstI32], []);
110 var kSig_s_v = makeSig([], [kAstS128]); 112 var kSig_s_v = makeSig([], [kAstS128]);
111 113
112 function makeSig(params, results) { 114 function makeSig(params, results) {
113 return {params: params, results: results}; 115 return {params: params, results: results};
114 } 116 }
115 117
116 function makeSig_v_x(x) { 118 function makeSig_v_x(x) {
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 eval(code); 366 eval(code);
365 } 367 }
366 } catch (e) { 368 } catch (e) {
367 assertEquals("number", typeof e); 369 assertEquals("number", typeof e);
368 assertEquals(value, e); 370 assertEquals(value, e);
369 // Success. 371 // Success.
370 return; 372 return;
371 } 373 }
372 throw new MjsUnitAssertionError("Did not throw at all, expected: " + value); 374 throw new MjsUnitAssertionError("Did not throw at all, expected: " + value);
373 } 375 }
OLDNEW
« no previous file with comments | « test/mjsunit/wasm/table.js ('k') | test/mjsunit/wasm/wasm-module-builder.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698