[Git][ghc/ghc][master] JS: Fix h$base_access implementation (issue 22576)
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Tue Apr 25 22:12:55 UTC 2023
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
8f656188 by Josh Meredith at 2023-04-25T18:12:38-04:00
JS: Fix h$base_access implementation (issue 22576)
- - - - -
5 changed files:
- hadrian/src/Settings/Builders/RunTest.hs
- libraries/base/jsbits/base.js
- testsuite/tests/ado/all.T
- testsuite/tests/rep-poly/all.T
- testsuite/tests/typecheck/should_fail/all.T
Changes:
=====================================
hadrian/src/Settings/Builders/RunTest.hs
=====================================
@@ -105,7 +105,11 @@ inTreeCompilerArgs stg = do
tables_next_to_code <- flag TablesNextToCode
targetWithSMP <- targetSupportsSMP
- let ghcStage = succStage stg
+ cross <- flag CrossCompiling
+
+ let ghcStage
+ | cross, Stage1 <- stg = Stage1
+ | otherwise = succStage stg
debugAssertions <- ghcDebugAssertions <$> flavour <*> pure ghcStage
debugged <- ghcDebugged <$> flavour <*> pure ghcStage
profiled <- ghcProfiled <$> flavour <*> pure ghcStage
=====================================
libraries/base/jsbits/base.js
=====================================
@@ -14,11 +14,11 @@ function h$base_access(file, file_off, mode, c) {
TRACE_IO("base_access")
#ifndef GHCJS_BROWSER
if(h$isNode()) {
- h$fs.stat(fd, function(err, fs) {
- if(err) {
+ h$fs.access(h$decodeUtf8z(file, file_off), mode, function(err) {
+ if (err) {
h$handleErrnoC(err, -1, 0, c);
} else {
- c(mode & fs.mode); // fixme is this ok?
+ c(0);
}
});
} else
=====================================
testsuite/tests/ado/all.T
=====================================
@@ -20,5 +20,5 @@ test('T15344', normal, compile_and_run, [''])
test('T16628', normal, compile_fail, [''])
test('T17835', normal, compile, [''])
test('T20540', normal, compile, [''])
-test('T16135', [when(compiler_debugged(),expect_broken(16135)), js_broken(22576)], compile_fail, [''])
+test('T16135', [when(compiler_debugged(),expect_broken(16135))], compile_fail, [''])
test('T22483', normal, compile, ['-Wall'])
=====================================
testsuite/tests/rep-poly/all.T
=====================================
@@ -85,7 +85,7 @@ test('RepPolyUnliftedNewtype', normal, compile,
['-fno-warn-partial-type-signatures -fno-warn-deprecated-flags'])
test('RepPolyWildcardPattern', normal, compile_fail, [''])
test('RepPolyWrappedVar', normal, compile_fail, [''])
-test('RepPolyWrappedVar2', js_broken(22576), compile, [''])
+test('RepPolyWrappedVar2', js_broken(23280), compile, [''])
test('UnliftedNewtypesCoerceFail', normal, compile_fail, [''])
test('UnliftedNewtypesLevityBinder', normal, compile_fail, [''])
=====================================
testsuite/tests/typecheck/should_fail/all.T
=====================================
@@ -328,7 +328,7 @@ test('T8262', normal, compile_fail, [''])
# TcCoercibleFail times out with the compiler is compiled with -DDEBUG.
# This is expected (see comment in source file).
-test('TcCoercibleFail', [when(compiler_debugged(), skip), js_broken(22576)], compile_fail, [''])
+test('TcCoercibleFail', [when(compiler_debugged(), skip)], compile_fail, [''])
test('TcCoercibleFail2', [], compile_fail, [''])
test('TcCoercibleFail3', [], compile_fail, [''])
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/8f656188e271fc55b31a50a1c2f3cf6ff9bbeeea
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/8f656188e271fc55b31a50a1c2f3cf6ff9bbeeea
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/20230425/a42ea00f/attachment-0001.html>
More information about the ghc-commits
mailing list