[Git][ghc/ghc][wip/js-staging] Primops: remove dv_s_u8
doyougnu (@doyougnu)
gitlab at gitlab.haskell.org
Wed Sep 7 13:32:02 UTC 2022
doyougnu pushed to branch wip/js-staging at Glasgow Haskell Compiler / GHC
Commits:
83a8317a by doyougnu at 2022-09-07T09:30:29-04:00
Primops: remove dv_s_u8
This function is non-sensical. Due to the infelicities of JS as a
platform we must use Int8 and friends to write, then coerce to a word,
thus dv_s_iN are the only legal calls for a write, and dv_s_uN legal for
Index and Reads.
- - - - -
1 changed file:
- compiler/GHC/StgToJS/Prim.hs
Changes:
=====================================
compiler/GHC/StgToJS/Prim.hs
=====================================
@@ -1277,9 +1277,8 @@ u1_ a i = IdxExpr (a .^ "u1") i
-- of the index @i@, the new value to set (in the case of a setter) @v@, and a
-- Boolean flag indicating whether the type in question is stored in
-- little-endian (True) or big-endian (False) format.
-dv_s_i8, dv_s_u8, dv_s_i16, dv_s_u16, dv_s_i32, dv_s_u32, dv_s_f32, dv_s_f64 :: JExpr -> JExpr -> JExpr -> JStat
+dv_s_i8, dv_s_i16, dv_s_u16, dv_s_i32, dv_s_u32, dv_s_f32, dv_s_f64 :: JExpr -> JExpr -> JExpr -> JStat
dv_s_i8 a i v = ApplStat (a .^ "dv" .^ "setInt8" ) [i, v, true_]
-dv_s_u8 a i v = ApplStat (a .^ "dv" .^ "setUInt8" ) [i, v, true_]
dv_s_u16 a i v = ApplStat (a .^ "dv" .^ "setUint16" ) [i, v, true_]
dv_s_i16 a i v = ApplStat (a .^ "dv" .^ "setInt16" ) [i, v, true_]
dv_s_i32 a i v = ApplStat (a .^ "dv" .^ "setInt32" ) [i, v, true_]
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/83a8317af6db422b15b5bd9d763b909b5333e684
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/83a8317af6db422b15b5bd9d763b909b5333e684
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20220907/e7bef09b/attachment-0001.html>
More information about the ghc-commits
mailing list