[Git][ghc/ghc][wip/js-staging] use exit code 134 for JS prim bounds checks

Josh Meredith (@JoshMeredith) gitlab at gitlab.haskell.org
Mon Oct 10 07:04:08 UTC 2022



Josh Meredith pushed to branch wip/js-staging at Glasgow Haskell Compiler / GHC


Commits:
b82f6e7b by Josh Meredith at 2022-10-10T07:03:58+00:00
use exit code 134 for JS prim bounds checks

- - - - -


1 changed file:

- compiler/GHC/StgToJS/Prim.hs


Changes:

=====================================
compiler/GHC/StgToJS/Prim.hs
=====================================
@@ -1476,7 +1476,7 @@ boundsChecked False _ _ r = r
 boundsChecked True  xs i r =
   ifS ((i .<. xs .^ "length") .&&. (i .>=. zero_))
     r
-    (returnS $ app "h$throwJSException" [ValExpr $ JStr "Array out of bounds"])
+    (returnS $ app "h$exitProcess" [Int 134])
 
 -- e|0 (32 bit signed integer truncation) required because of JS numbers. e|0
 -- converts e to an Int32. Note that e|0 _is still a Double_ because JavaScript.



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b82f6e7b7a7acee4bce84a728a5ae8cd539b04ec

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b82f6e7b7a7acee4bce84a728a5ae8cd539b04ec
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/20221010/3f182e95/attachment.html>


More information about the ghc-commits mailing list