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

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

Issue 2472103002: [wasm] Store the function_index in the js-to-wasm wrapper instead of the export index (Closed)
Patch Set: Rename variables 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 unified diff | Download patch
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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 let kExternalFunction = 0; 87 let kExternalFunction = 0;
88 let kExternalTable = 1; 88 let kExternalTable = 1;
89 let kExternalMemory = 2; 89 let kExternalMemory = 2;
90 let kExternalGlobal = 3; 90 let kExternalGlobal = 3;
91 91
92 let kTableZero = 0; 92 let kTableZero = 0;
93 let kMemoryZero = 0; 93 let kMemoryZero = 0;
94 94
95 // Useful signatures 95 // Useful signatures
96 let kSig_i_i = makeSig([kAstI32], [kAstI32]); 96 let kSig_i_i = makeSig([kAstI32], [kAstI32]);
97 let kSig_l_l = makeSig([kAstI64], [kAstI64]);
97 let kSig_i_l = makeSig([kAstI64], [kAstI32]); 98 let kSig_i_l = makeSig([kAstI64], [kAstI32]);
98 let kSig_i_ii = makeSig([kAstI32, kAstI32], [kAstI32]); 99 let kSig_i_ii = makeSig([kAstI32, kAstI32], [kAstI32]);
99 let kSig_i_iii = makeSig([kAstI32, kAstI32, kAstI32], [kAstI32]); 100 let kSig_i_iii = makeSig([kAstI32, kAstI32, kAstI32], [kAstI32]);
100 let kSig_d_dd = makeSig([kAstF64, kAstF64], [kAstF64]); 101 let kSig_d_dd = makeSig([kAstF64, kAstF64], [kAstF64]);
101 let kSig_l_ll = makeSig([kAstI64, kAstI64], [kAstI64]); 102 let kSig_l_ll = makeSig([kAstI64, kAstI64], [kAstI64]);
102 let kSig_i_dd = makeSig([kAstF64, kAstF64], [kAstI32]); 103 let kSig_i_dd = makeSig([kAstF64, kAstF64], [kAstI32]);
103 let kSig_v_v = makeSig([], []); 104 let kSig_v_v = makeSig([], []);
104 let kSig_i_v = makeSig([], [kAstI32]); 105 let kSig_i_v = makeSig([], [kAstI32]);
105 let kSig_l_v = makeSig([], [kAstI64]); 106 let kSig_l_v = makeSig([], [kAstI64]);
106 let kSig_f_v = makeSig([], [kAstF64]); 107 let kSig_f_v = makeSig([], [kAstF64]);
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 eval(code); 366 eval(code);
366 } 367 }
367 } catch (e) { 368 } catch (e) {
368 assertEquals("number", typeof e); 369 assertEquals("number", typeof e);
369 assertEquals(value, e); 370 assertEquals(value, e);
370 // Success. 371 // Success.
371 return; 372 return;
372 } 373 }
373 throw new MjsUnitAssertionError("Did not throw at all, expected: " + value); 374 throw new MjsUnitAssertionError("Did not throw at all, expected: " + value);
374 } 375 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698