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

Side by Side Diff: test/mjsunit/wasm/embenchen/primes.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/memops.js ('k') | test/mjsunit/wasm/embenchen/zlib.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 = 'lastprime: 387677.\n'; 4 var EXPECTED_OUTPUT = 'lastprime: 387677.\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 5436 matching lines...) Expand 10 before | Expand all | Expand 10 after
5447 5447
5448 5448
5449 var Math_min = Math.min; 5449 var Math_min = Math.min;
5450 function asmPrintInt(x, y) { 5450 function asmPrintInt(x, y) {
5451 Module.print('int ' + x + ',' + y);// + ' ' + new Error().stack); 5451 Module.print('int ' + x + ',' + y);// + ' ' + new Error().stack);
5452 } 5452 }
5453 function asmPrintFloat(x, y) { 5453 function asmPrintFloat(x, y) {
5454 Module.print('float ' + x + ',' + y);// + ' ' + new Error().stack); 5454 Module.print('float ' + x + ',' + y);// + ' ' + new Error().stack);
5455 } 5455 }
5456 // EMSCRIPTEN_START_ASM 5456 // EMSCRIPTEN_START_ASM
5457 var asm = _WASMEXP_.instantiateModuleFromAsm((function Module(global, env, buffe r) { 5457 var asm = Wasm.instantiateModuleFromAsm((function Module(global, env, buffer) {
5458 'use asm'; 5458 'use asm';
5459 var HEAP8 = new global.Int8Array(buffer); 5459 var HEAP8 = new global.Int8Array(buffer);
5460 var HEAP16 = new global.Int16Array(buffer); 5460 var HEAP16 = new global.Int16Array(buffer);
5461 var HEAP32 = new global.Int32Array(buffer); 5461 var HEAP32 = new global.Int32Array(buffer);
5462 var HEAPU8 = new global.Uint8Array(buffer); 5462 var HEAPU8 = new global.Uint8Array(buffer);
5463 var HEAPU16 = new global.Uint16Array(buffer); 5463 var HEAPU16 = new global.Uint16Array(buffer);
5464 var HEAPU32 = new global.Uint32Array(buffer); 5464 var HEAPU32 = new global.Uint32Array(buffer);
5465 var HEAPF32 = new global.Float32Array(buffer); 5465 var HEAPF32 = new global.Float32Array(buffer);
5466 var HEAPF64 = new global.Float64Array(buffer); 5466 var HEAPF64 = new global.Float64Array(buffer);
5467 5467
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
5978 } 5978 }
5979 5979
5980 // shouldRunNow refers to calling main(), not run(). 5980 // shouldRunNow refers to calling main(), not run().
5981 var shouldRunNow = true; 5981 var shouldRunNow = true;
5982 if (Module['noInitialRun']) { 5982 if (Module['noInitialRun']) {
5983 shouldRunNow = false; 5983 shouldRunNow = false;
5984 } 5984 }
5985 5985
5986 5986
5987 run([].concat(Module["arguments"])); 5987 run([].concat(Module["arguments"]));
OLDNEW
« no previous file with comments | « test/mjsunit/wasm/embenchen/memops.js ('k') | test/mjsunit/wasm/embenchen/zlib.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698