on master help sign in
javascript backend: fix logical right shifts

mostly fixes #4550

commitf5085b9ade4aeb8f5c50ff6d480e9e2338e69500 authorImuli <i@imu.li> dateTue 4 Sep 2018, 22:24 (8 years ago) parent8b1efd4
1 file changed+4−4
src/IRTS/JavaScript/PrimOp.hs+4−4
src/IRTS/JavaScript/PrimOp.hs+4−4
@@ -103,10 +103,10 @@ primDB =
103103 , item (LSHL (ITFixed IT64)) True PTAny $
104104 \[l, r] -> JsForeign "%0.shiftLeft(%1).and(new $JSRTS.jsbn.BigInteger(%2))" [l,r, JsStr $ show 0xFFFFFFFFFFFFFFFF]
105105 , item (LSHL ITBig) True PTAny $ method "shiftLeft"
106− , item (LLSHR ITNative) False PTAny $ JsForeign "%0 >> %1 |0"
107− , item (LLSHR (ITFixed IT8)) False PTAny $ JsForeign "%0 >> %1"
108− , item (LLSHR (ITFixed IT16)) False PTAny $ JsForeign "%0 >> %1"
109− , item (LLSHR (ITFixed IT32)) False PTAny $ JsForeign "%0 >> %1|0"
106+ , item (LLSHR ITNative) False PTAny $ JsForeign "%0 >>> %1 |0"
107+ , item (LLSHR (ITFixed IT8)) False PTAny $ JsForeign "%0 >>> %1"
108+ , item (LLSHR (ITFixed IT16)) False PTAny $ JsForeign "%0 >>> %1"
109+ , item (LLSHR (ITFixed IT32)) False PTAny $ JsForeign "%0 >>> %1|0"
110110 , item (LLSHR (ITFixed IT64)) True PTAny $ JsForeign "%0.shiftRight(%1)"
111111 , item (LASHR ITNative) False PTAny $ JsForeign "%0 >> %1 |0"
112112 , item (LASHR (ITFixed IT8)) False PTAny $ JsForeign "%0 >> %1"