on master help sign in
JS codegen: handle more LTrunc cases
commitf0b13faf6ea84c59eb9ee4d4ab8a3d950ba36152 authorJacob Mitchell <jmitchell@member.fsf.org> dateWed 8 Mar 2017, 10:52 (10 years ago) parent9fdbb72
1 file changed+3−3
src/IRTS/CodegenJavaScript.hs+3−3
src/IRTS/CodegenJavaScript.hs+3−3
@@ -757,19 +757,19 @@ jsOP _ reg op args = JSAssign (translateReg reg) jsOP'
757757 )
758758 ]
759759
760− | (LTrunc (ITFixed IT16) (ITFixed IT8)) <- op
760+ | (LTrunc (ITFixed _from) (ITFixed IT8)) <- op
761761 , (arg:_) <- args =
762762 jsPackUBits8 (
763763 JSBinOp "&" (jsUnPackBits $ translateReg arg) (JSNum (JSInt 0xFF))
764764 )
765765
766− | (LTrunc (ITFixed IT32) (ITFixed IT16)) <- op
766+ | (LTrunc (ITFixed _from) (ITFixed IT16)) <- op
767767 , (arg:_) <- args =
768768 jsPackUBits16 (
769769 JSBinOp "&" (jsUnPackBits $ translateReg arg) (JSNum (JSInt 0xFFFF))
770770 )
771771
772− | (LTrunc (ITFixed IT64) (ITFixed IT32)) <- op
772+ | (LTrunc (ITFixed _from) (ITFixed IT32)) <- op
773773 , (arg:_) <- args =
774774 jsPackUBits32 (
775775 jsMeth (jsMeth (translateReg arg) "and" [