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

Side by Side Diff: test/mjsunit/wasm/embenchen/zlib.js

Issue 1770383002: [wasm] Rename _WASMEXP_ object to Wasm. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « test/mjsunit/wasm/embenchen/primes.js ('k') | test/mjsunit/wasm/test-wasm-module-builder.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 = 'sizes: 100000,25906\nok.\n'; 4 var EXPECTED_OUTPUT = 'sizes: 100000,25906\nok.\n';
5 var Module = { 5 var Module = {
6 arguments: [1], 6 arguments: [1],
7 print: function(x) {Module.printBuffer += x + '\n';}, 7 print: function(x) {Module.printBuffer += x + '\n';},
8 preRun: [function() {Module.printBuffer = ''}], 8 preRun: [function() {Module.printBuffer = ''}],
9 postRun: [function() { 9 postRun: [function() {
10 assertEquals(EXPECTED_OUTPUT, Module.printBuffer); 10 assertEquals(EXPECTED_OUTPUT, Module.printBuffer);
(...skipping 5669 matching lines...) Expand 10 before | Expand all | Expand 10 after
5680 } 5680 }
5681 } 5681 }
5682 5682
5683 function asmPrintInt(x, y) { 5683 function asmPrintInt(x, y) {
5684 Module.print('int ' + x + ',' + y);// + ' ' + new Error().stack); 5684 Module.print('int ' + x + ',' + y);// + ' ' + new Error().stack);
5685 } 5685 }
5686 function asmPrintFloat(x, y) { 5686 function asmPrintFloat(x, y) {
5687 Module.print('float ' + x + ',' + y);// + ' ' + new Error().stack); 5687 Module.print('float ' + x + ',' + y);// + ' ' + new Error().stack);
5688 } 5688 }
5689 // EMSCRIPTEN_START_ASM 5689 // EMSCRIPTEN_START_ASM
5690 var asm = _WASMEXP_.instantiateModuleFromAsm((function Module(global, env, buffe r) { 5690 var asm = Wasm.instantiateModuleFromAsm((function Module(global, env, buffer) {
5691 'use asm'; 5691 'use asm';
5692 var HEAP8 = new global.Int8Array(buffer); 5692 var HEAP8 = new global.Int8Array(buffer);
5693 var HEAP16 = new global.Int16Array(buffer); 5693 var HEAP16 = new global.Int16Array(buffer);
5694 var HEAP32 = new global.Int32Array(buffer); 5694 var HEAP32 = new global.Int32Array(buffer);
5695 var HEAPU8 = new global.Uint8Array(buffer); 5695 var HEAPU8 = new global.Uint8Array(buffer);
5696 var HEAPU16 = new global.Uint16Array(buffer); 5696 var HEAPU16 = new global.Uint16Array(buffer);
5697 var HEAPU32 = new global.Uint32Array(buffer); 5697 var HEAPU32 = new global.Uint32Array(buffer);
5698 var HEAPF32 = new global.Float32Array(buffer); 5698 var HEAPF32 = new global.Float32Array(buffer);
5699 var HEAPF64 = new global.Float64Array(buffer); 5699 var HEAPF64 = new global.Float64Array(buffer);
5700 5700
(...skipping 9045 matching lines...) Expand 10 before | Expand all | Expand 10 after
14746 } 14746 }
14747 14747
14748 // shouldRunNow refers to calling main(), not run(). 14748 // shouldRunNow refers to calling main(), not run().
14749 var shouldRunNow = true; 14749 var shouldRunNow = true;
14750 if (Module['noInitialRun']) { 14750 if (Module['noInitialRun']) {
14751 shouldRunNow = false; 14751 shouldRunNow = false;
14752 } 14752 }
14753 14753
14754 14754
14755 run([].concat(Module["arguments"])); 14755 run([].concat(Module["arguments"]));
OLDNEW
« no previous file with comments | « test/mjsunit/wasm/embenchen/primes.js ('k') | test/mjsunit/wasm/test-wasm-module-builder.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698