OLD | NEW |
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: --validate-asm --allow-natives-syntax | 5 // Flags: --validate-asm --allow-natives-syntax |
6 | 6 |
7 // /v8/test/mjsunit/regress/regress-crbug-431602.js | 7 // /v8/test/mjsunit/regress/regress-crbug-431602.js |
8 // /v8/test/mjsunit/lazy-load.js | 8 // /v8/test/mjsunit/lazy-load.js |
9 // /v8/test/mjsunit/wasm/asm-wasm.js | 9 // /v8/test/mjsunit/wasm/asm-wasm.js |
10 // /v8/test/mjsunit/debug-toggle-mirror-cache.js | 10 // /v8/test/mjsunit/debug-toggle-mirror-cache.js |
11 // /v8/test/mjsunit/debug-stack-check-position.js | 11 // /v8/test/mjsunit/debug-stack-check-position.js |
12 | 12 |
13 // Begin stripped down and modified version of mjsunit.js for easy minimization
in CF. | 13 // Begin stripped down and modified version of mjsunit.js for easy minimization
in CF. |
14 var Wasm = { | 14 var Wasm = { |
15 instantiateModuleFromAsm: function(text, stdlib, ffi, heap) { | 15 instantiateModuleFromAsm: function(text, stdlib, ffi, heap) { |
16 var module_decl = eval('(' + text + ')'); | 16 var module_decl = eval('(' + text + ')'); |
17 if (%IsNotAsmWasmCode(module_decl)) { | 17 if (!%IsAsmWasmCode(module_decl)) { |
18 throw "validate failure"; | 18 throw "validate failure"; |
19 } | 19 } |
20 var ret = module_decl(stdlib, ffi, heap); | 20 var ret = module_decl(stdlib, ffi, heap); |
21 if (%IsNotAsmWasmCode(module_decl)) { | 21 if (!%IsAsmWasmCode(module_decl)) { |
22 throw "bad module args"; | 22 throw "bad module args"; |
23 } | 23 } |
24 return ret; | 24 return ret; |
25 }, | 25 }, |
26 }; | 26 }; |
27 function MjsUnitAssertionError(message) {} | 27 function MjsUnitAssertionError(message) {} |
28 MjsUnitAssertionError.prototype.toString = function () { return this.message; }; | 28 MjsUnitAssertionError.prototype.toString = function () { return this.message; }; |
29 var assertSame; | 29 var assertSame; |
30 var assertEquals; | 30 var assertEquals; |
31 var assertEqualsDelta; | 31 var assertEqualsDelta; |
(...skipping 1429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1461 function __f_113() { | 1461 function __f_113() { |
1462 return 1; | 1462 return 1; |
1463 } | 1463 } |
1464 try { | 1464 try { |
1465 Debug.setListener(__f_112); | 1465 Debug.setListener(__f_112); |
1466 nop(); | 1466 nop(); |
1467 __f_113(); | 1467 __f_113(); |
1468 Debug.setListener(null); | 1468 Debug.setListener(null); |
1469 assertNull(__v_112); | 1469 assertNull(__v_112); |
1470 } catch(e) { print("Caught: " + e); } | 1470 } catch(e) { print("Caught: " + e); } |
OLD | NEW |