OLD | NEW |
1 // Modified embenchen to direct to asm-wasm. | 1 // Modified embenchen to direct to asm-wasm. |
2 // Flags: --expose-wasm | 2 // Flags: --expose-wasm |
3 | 3 |
4 var EXPECTED_OUTPUT = | 4 var EXPECTED_OUTPUT = |
5 '123456789\n' + | 5 '123456789\n' + |
6 '213456789\n' + | 6 '213456789\n' + |
7 '231456789\n' + | 7 '231456789\n' + |
8 '321456789\n' + | 8 '321456789\n' + |
9 '312456789\n' + | 9 '312456789\n' + |
10 '132456789\n' + | 10 '132456789\n' + |
(...skipping 5648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5659 | 5659 |
5660 | 5660 |
5661 var Math_min = Math.min; | 5661 var Math_min = Math.min; |
5662 function asmPrintInt(x, y) { | 5662 function asmPrintInt(x, y) { |
5663 Module.print('int ' + x + ',' + y);// + ' ' + new Error().stack); | 5663 Module.print('int ' + x + ',' + y);// + ' ' + new Error().stack); |
5664 } | 5664 } |
5665 function asmPrintFloat(x, y) { | 5665 function asmPrintFloat(x, y) { |
5666 Module.print('float ' + x + ',' + y);// + ' ' + new Error().stack); | 5666 Module.print('float ' + x + ',' + y);// + ' ' + new Error().stack); |
5667 } | 5667 } |
5668 // EMSCRIPTEN_START_ASM | 5668 // EMSCRIPTEN_START_ASM |
5669 var asm = _WASMEXP_.instantiateModuleFromAsm((function Module(global, env, buffe
r) { | 5669 var asm = Wasm.instantiateModuleFromAsm((function Module(global, env, buffer) { |
5670 'use asm'; | 5670 'use asm'; |
5671 var HEAP8 = new global.Int8Array(buffer); | 5671 var HEAP8 = new global.Int8Array(buffer); |
5672 var HEAP16 = new global.Int16Array(buffer); | 5672 var HEAP16 = new global.Int16Array(buffer); |
5673 var HEAP32 = new global.Int32Array(buffer); | 5673 var HEAP32 = new global.Int32Array(buffer); |
5674 var HEAPU8 = new global.Uint8Array(buffer); | 5674 var HEAPU8 = new global.Uint8Array(buffer); |
5675 var HEAPU16 = new global.Uint16Array(buffer); | 5675 var HEAPU16 = new global.Uint16Array(buffer); |
5676 var HEAPU32 = new global.Uint32Array(buffer); | 5676 var HEAPU32 = new global.Uint32Array(buffer); |
5677 var HEAPF32 = new global.Float32Array(buffer); | 5677 var HEAPF32 = new global.Float32Array(buffer); |
5678 var HEAPF64 = new global.Float64Array(buffer); | 5678 var HEAPF64 = new global.Float64Array(buffer); |
5679 | 5679 |
(...skipping 2749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8429 } | 8429 } |
8430 | 8430 |
8431 // shouldRunNow refers to calling main(), not run(). | 8431 // shouldRunNow refers to calling main(), not run(). |
8432 var shouldRunNow = true; | 8432 var shouldRunNow = true; |
8433 if (Module['noInitialRun']) { | 8433 if (Module['noInitialRun']) { |
8434 shouldRunNow = false; | 8434 shouldRunNow = false; |
8435 } | 8435 } |
8436 | 8436 |
8437 | 8437 |
8438 run([].concat(Module["arguments"])); | 8438 run([].concat(Module["arguments"])); |
OLD | NEW |