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

Side by Side Diff: test/mjsunit/wasm/embenchen/memops.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/lua_binarytrees.js ('k') | test/mjsunit/wasm/embenchen/primes.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 = 'final: 840.\n'; 4 var EXPECTED_OUTPUT = 'final: 840.\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 5595 matching lines...) Expand 10 before | Expand all | Expand 10 after
5606 5606
5607 5607
5608 var Math_min = Math.min; 5608 var Math_min = Math.min;
5609 function asmPrintInt(x, y) { 5609 function asmPrintInt(x, y) {
5610 Module.print('int ' + x + ',' + y);// + ' ' + new Error().stack); 5610 Module.print('int ' + x + ',' + y);// + ' ' + new Error().stack);
5611 } 5611 }
5612 function asmPrintFloat(x, y) { 5612 function asmPrintFloat(x, y) {
5613 Module.print('float ' + x + ',' + y);// + ' ' + new Error().stack); 5613 Module.print('float ' + x + ',' + y);// + ' ' + new Error().stack);
5614 } 5614 }
5615 // EMSCRIPTEN_START_ASM 5615 // EMSCRIPTEN_START_ASM
5616 var asm = _WASMEXP_.instantiateModuleFromAsm((function Module(global, env, buffe r) { 5616 var asm = Wasm.instantiateModuleFromAsm((function Module(global, env, buffer) {
5617 'use asm'; 5617 'use asm';
5618 var HEAP8 = new global.Int8Array(buffer); 5618 var HEAP8 = new global.Int8Array(buffer);
5619 var HEAP16 = new global.Int16Array(buffer); 5619 var HEAP16 = new global.Int16Array(buffer);
5620 var HEAP32 = new global.Int32Array(buffer); 5620 var HEAP32 = new global.Int32Array(buffer);
5621 var HEAPU8 = new global.Uint8Array(buffer); 5621 var HEAPU8 = new global.Uint8Array(buffer);
5622 var HEAPU16 = new global.Uint16Array(buffer); 5622 var HEAPU16 = new global.Uint16Array(buffer);
5623 var HEAPU32 = new global.Uint32Array(buffer); 5623 var HEAPU32 = new global.Uint32Array(buffer);
5624 var HEAPF32 = new global.Float32Array(buffer); 5624 var HEAPF32 = new global.Float32Array(buffer);
5625 var HEAPF64 = new global.Float64Array(buffer); 5625 var HEAPF64 = new global.Float64Array(buffer);
5626 5626
(...skipping 2454 matching lines...) Expand 10 before | Expand all | Expand 10 after
8081 } 8081 }
8082 8082
8083 // shouldRunNow refers to calling main(), not run(). 8083 // shouldRunNow refers to calling main(), not run().
8084 var shouldRunNow = true; 8084 var shouldRunNow = true;
8085 if (Module['noInitialRun']) { 8085 if (Module['noInitialRun']) {
8086 shouldRunNow = false; 8086 shouldRunNow = false;
8087 } 8087 }
8088 8088
8089 8089
8090 run([].concat(Module["arguments"])); 8090 run([].concat(Module["arguments"]));
OLDNEW
« no previous file with comments | « test/mjsunit/wasm/embenchen/lua_binarytrees.js ('k') | test/mjsunit/wasm/embenchen/primes.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698