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

Side by Side Diff: test/mjsunit/wasm/indirect-tables.js

Issue 2551323003: [wasm] Names of exported functions should be the stringified function index. (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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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 load("test/mjsunit/wasm/wasm-constants.js"); 7 load("test/mjsunit/wasm/wasm-constants.js");
8 load("test/mjsunit/wasm/wasm-module-builder.js"); 8 load("test/mjsunit/wasm/wasm-module-builder.js");
9 9
10 function AddFunctions(builder) { 10 function AddFunctions(builder) {
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 74
75 print(" mul=" + mul); 75 print(" mul=" + mul);
76 print(" add=" + add); 76 print(" add=" + add);
77 print(" sub=" + sub); 77 print(" sub=" + sub);
78 assertEquals("function", typeof mul); 78 assertEquals("function", typeof mul);
79 assertEquals("function", typeof add); 79 assertEquals("function", typeof add);
80 assertEquals("function", typeof sub); 80 assertEquals("function", typeof sub);
81 assertEquals(2, mul.length); 81 assertEquals(2, mul.length);
82 assertEquals(2, add.length); 82 assertEquals(2, add.length);
83 assertEquals(2, sub.length); 83 assertEquals(2, sub.length);
84 assertEquals("blarg", add.name); 84 assertEquals(String(f.add.index), add.name);
85 85
86 let exp_div = table.get(i+3); 86 let exp_div = table.get(i+3);
87 assertEquals("function", typeof exp_div); 87 assertEquals("function", typeof exp_div);
88 print(" js_div=" + exp_div); 88 print(" js_div=" + exp_div);
89 // Should have a new, wrapped version of the import. 89 // Should have a new, wrapped version of the import.
90 assertFalse(js_div == exp_div); 90 assertFalse(js_div == exp_div);
91 91
92 92
93 for (let j = i + 4; j < 10; j++) { 93 for (let j = i + 4; j < 10; j++) {
94 assertSame(null, table.get(j)); 94 assertSame(null, table.get(j));
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 var i2 = new WebAssembly.Instance(m2, ffi); 368 var i2 = new WebAssembly.Instance(m2, ffi);
369 } else { 369 } else {
370 assertThrows(() => new WebAssembly.Instance(m2, ffi)); 370 assertThrows(() => new WebAssembly.Instance(m2, ffi));
371 } 371 }
372 } 372 }
373 } 373 }
374 374
375 375
376 376
377 })(); 377 })();
OLDNEW
« src/wasm/wasm-objects.cc ('K') | « test/mjsunit/wasm/function-prototype.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698