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

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

Issue 2049513003: [wasm] Support undefined indirect table entries, behind a flag. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: [wasm] Patching in the change to have only one runtime check, instead of two. Created 4 years, 6 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
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 // Flags: --wasm-jit-prototpe
bradn 2016/06/16 08:00:20 probably a separate file here too
6 7
7 load("test/mjsunit/wasm/wasm-constants.js"); 8 load("test/mjsunit/wasm/wasm-constants.js");
8 load("test/mjsunit/wasm/wasm-module-builder.js"); 9 load("test/mjsunit/wasm/wasm-module-builder.js");
9 10
10 var module = (function () { 11 var module = (function () {
11 var builder = new WasmModuleBuilder(); 12 var builder = new WasmModuleBuilder();
12 13
13 var sig_index = builder.addSignature(kSig_i_ii); 14 var sig_index = builder.addSignature(kSig_i_ii);
14 builder.addImport("add", sig_index); 15 builder.addImport("add", sig_index);
15 builder.addFunction("add", sig_index) 16 builder.addFunction("add", sig_index)
(...skipping 24 matching lines...) Expand all
40 assertFalse(module === null); 41 assertFalse(module === null);
41 assertFalse(module === 0); 42 assertFalse(module === 0);
42 assertEquals("object", typeof module.exports); 43 assertEquals("object", typeof module.exports);
43 assertEquals("function", typeof module.exports.main); 44 assertEquals("function", typeof module.exports.main);
44 45
45 assertEquals(5, module.exports.main(1, 12, 7)); 46 assertEquals(5, module.exports.main(1, 12, 7));
46 assertEquals(19, module.exports.main(0, 12, 7)); 47 assertEquals(19, module.exports.main(0, 12, 7));
47 48
48 assertTraps(kTrapFuncSigMismatch, "module.exports.main(2, 12, 33)"); 49 assertTraps(kTrapFuncSigMismatch, "module.exports.main(2, 12, 33)");
49 assertTraps(kTrapFuncInvalid, "module.exports.main(3, 12, 33)"); 50 assertTraps(kTrapFuncInvalid, "module.exports.main(3, 12, 33)");
OLDNEW
« test/mjsunit/wasm/default-func-call2.js ('K') | « test/mjsunit/wasm/default-func-call2.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698