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

Unified Diff: test/mjsunit/wasm/asm-wasm.js

Issue 1720773002: Allow bitwise-or aside from type annotations in asm->wasm conversion. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/wasm/asm-wasm-builder.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/wasm/asm-wasm.js
diff --git a/test/mjsunit/wasm/asm-wasm.js b/test/mjsunit/wasm/asm-wasm.js
index 31a1dc5b84e70ee86e8ceb0b414e28ba2f829654..91766eca5343143a00de9db31662a3a770be1c77 100644
--- a/test/mjsunit/wasm/asm-wasm.js
+++ b/test/mjsunit/wasm/asm-wasm.js
@@ -1265,3 +1265,51 @@ TestForeignVariables();
assertEquals(123, m.ifunc(456.7, 123));
assertEquals(123.4, m.dfunc(456, 123.4));
})();
+
+
+(function TestOr() {
+ function Module() {
+ "use asm";
+ function func() {
+ var x = 1;
+ var y = 2;
+ return (x | y) | 0;
+ }
+ return {func: func};
+ }
+
+ var m = _WASMEXP_.instantiateModuleFromAsm(Module.toString());
+ assertEquals(3, m.func());
+})();
+
+
+(function TestAnd() {
+ function Module() {
+ "use asm";
+ function func() {
+ var x = 3;
+ var y = 2;
+ return (x & y) | 0;
+ }
+ return {func: func};
+ }
+
+ var m = _WASMEXP_.instantiateModuleFromAsm(Module.toString());
+ assertEquals(2, m.func());
+})();
+
+
+(function TestXor() {
+ function Module() {
+ "use asm";
+ function func() {
+ var x = 3;
+ var y = 2;
+ return (x ^ y) | 0;
+ }
+ return {func: func};
+ }
+
+ var m = _WASMEXP_.instantiateModuleFromAsm(Module.toString());
+ assertEquals(1, m.func());
+})();
« no previous file with comments | « src/wasm/asm-wasm-builder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698