[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 2 commits: JS: fake support for native adjustors (#25159)

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Mon Sep 9 11:47:56 UTC 2024



Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC


Commits:
699a5041 by Sylvain Henry at 2024-09-09T07:47:47-04:00
JS: fake support for native adjustors (#25159)

The JS backend doesn't support adjustors (I believe) and in any case if
it ever supports them it will be a native support, not one via libffi.

- - - - -
38b0927b by Sylvain Henry at 2024-09-09T07:47:50-04:00
JS: remove redundant h$lstat

It was introduced a second time by mistake in
27dceb42376c34b99a38e36a33b2abc346ed390f (cf #25190)

- - - - -


3 changed files:

- libraries/ghc-internal/jsbits/base.js
- m4/ghc_adjustors_method.m4
- utils/ghc-toolchain/exe/Main.hs


Changes:

=====================================
libraries/ghc-internal/jsbits/base.js
=====================================
@@ -367,23 +367,6 @@ function h$base_lstat(file, file_off, stat, stat_off, c) {
         h$unsupported(-1, c);
 }
 
-function h$lstat(file, file_off, stat, stat_off) {
-  TRACE_IO("lstat")
-#ifndef GHCJS_BROWSER
-  if(h$isNode()) {
-    try {
-      var fs = h$fs.lstatSync(h$decodeUtf8z(file, file_off));
-      h$base_fillStat(fs, stat, stat_off);
-      return 0;
-    } catch(e) {
-      h$setErrno(e);
-      return -1;
-    }
-  } else
-#endif
-    h$unsupported(-1);
-}
-
 function h$rmdir(file, file_off) {
   TRACE_IO("rmdir")
 #ifndef GHCJS_BROWSER


=====================================
m4/ghc_adjustors_method.m4
=====================================
@@ -4,7 +4,7 @@ dnl Use libffi for adjustors?
 AC_DEFUN([GHC_ADJUSTORS_METHOD],
 [
   case [$]{$1[Arch]} in
-      i386|x86_64)
+      i386|x86_64|javascript)
           # We have native adjustor support on these platforms
           HaveNativeAdjustor=yes
           ;;


=====================================
utils/ghc-toolchain/exe/Main.hs
=====================================
@@ -374,6 +374,7 @@ archHasNativeAdjustors :: Arch -> Bool
 archHasNativeAdjustors = \case
   ArchX86    -> True
   ArchX86_64 -> True
+  ArchJavaScript -> True
   _          -> False
 
 



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d569f2d5a13dd82d6108842fe521688d6eff198b...38b0927bd76f835abe3646450a2aa9116b5d5b9a

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/d569f2d5a13dd82d6108842fe521688d6eff198b...38b0927bd76f835abe3646450a2aa9116b5d5b9a
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/20240909/41beb987/attachment-0001.html>


More information about the ghc-commits mailing list