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

Side by Side Diff: test/mjsunit/wasm/asm-wasm.js

Issue 1731603002: Allow bitwise operators to convert from intish to int in heap ops. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 4 years, 10 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 | « src/typing-asm.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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: --expose-wasm 5 // Flags: --expose-wasm
6 6
7 function EmptyTest() { 7 function EmptyTest() {
8 "use asm"; 8 "use asm";
9 function caller() { 9 function caller() {
10 empty(); 10 empty();
(...skipping 1505 matching lines...) Expand 10 before | Expand all | Expand 10 after
1516 var y = 2.0; 1516 var y = 2.0;
1517 return (x & y) | 0; 1517 return (x & y) | 0;
1518 } 1518 }
1519 return {func: func}; 1519 return {func: func};
1520 } 1520 }
1521 1521
1522 assertThrows(function() { 1522 assertThrows(function() {
1523 _WASMEXP_.instantiateModuleFromAsm(Module.toString()); 1523 _WASMEXP_.instantiateModuleFromAsm(Module.toString());
1524 }); 1524 });
1525 })(); 1525 })();
1526
1527
1528 (function TestAndIntAndHeapValue() {
1529 function Module(stdlib, foreign, buffer) {
1530 "use asm";
1531 var HEAP32 = new stdlib.Int32Array(buffer);
1532 function func() {
1533 var x = 0;
1534 x = HEAP32[0] & -1;
1535 return x | 0;
1536 }
1537 return {func: func};
1538 }
1539
1540 var m = _WASMEXP_.instantiateModuleFromAsm(Module.toString());
1541 assertEquals(0, m.func());
1542 })();
OLDNEW
« no previous file with comments | « src/typing-asm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698