Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC
Commits:
-
156f09b8
by Simon Jakobi at 2026-05-25T08:30:50-04:00
-
6a76e7aa
by Cheng Shao at 2026-05-25T08:30:50-04:00
3 changed files:
Changes:
| 1 | +section: wasm-backend
|
|
| 2 | +synopsis: Ensure post-linker output is synchronous ESM and fix loading in ServiceWorker
|
|
| 3 | +issues: #27257
|
|
| 4 | +mrs: !16093 |
| ... | ... | @@ -60,12 +60,13 @@ getNth xs n = assertPpr (xs `lengthExceeds` n) (ppr n $$ ppr xs) $ |
| 60 | 60 | --
|
| 61 | 61 | -- Uses a set internally to record duplicates. This makes it slightly slower for
|
| 62 | 62 | -- very small lists but avoids quadratic behaviour for large lists.
|
| 63 | -unionListsOrd :: (HasDebugCallStack, Outputable a, Ord a) => [a] -> [a] -> [a]
|
|
| 63 | +unionListsOrd :: Ord a => [a] -> [a] -> [a]
|
|
| 64 | 64 | unionListsOrd xs ys
|
| 65 | - -- Since both arguments don't have internal duplicates we can just take all of xs
|
|
| 66 | - -- and every element of ys that's not already in xs.
|
|
| 65 | + -- Since both arguments don't have internal duplicates we can just take all of ys
|
|
| 66 | + -- and every element of xs that's not already in ys.
|
|
| 67 | 67 | = let set_ys = S.fromList ys
|
| 68 | 68 | in (filter (\e -> not $ S.member e set_ys) xs) ++ ys
|
| 69 | +{-# INLINABLE unionListsOrd #-} -- Ensure the function can be specialized.
|
|
| 69 | 70 | |
| 70 | 71 | -- | Assumes that the arguments contain no duplicates
|
| 71 | 72 | unionLists :: (HasDebugCallStack, Outputable a, Eq a) => [a] -> [a] -> [a]
|
| ... | ... | @@ -108,6 +109,7 @@ minusList xs [y] = filter (/= y) xs |
| 108 | 109 | minusList xs ys = filter (`S.notMember` yss) xs
|
| 109 | 110 | where
|
| 110 | 111 | yss = S.fromList ys
|
| 112 | +{-# INLINABLE minusList #-} -- Ensure the function can be specialized.
|
|
| 111 | 113 | |
| 112 | 114 | {-
|
| 113 | 115 | ************************************************************************
|
| ... | ... | @@ -39,19 +39,13 @@ export class JSValManager { |
| 39 | 39 | // To benchmark different setImmediate() implementations in the
|
| 40 | 40 | // browser, use https://github.com/jphpsf/setImmediate-shim-demo as a
|
| 41 | 41 | // starting point.
|
| 42 | -export const setImmediate = await (async () => {
|
|
| 43 | - // node, bun, or other scripts might have set this up in the browser
|
|
| 42 | +export const setImmediate = (() => {
|
|
| 43 | + // node, deno, bun, or other scripts might have set this up in the
|
|
| 44 | + // browser
|
|
| 44 | 45 | if (globalThis.setImmediate) {
|
| 45 | 46 | return globalThis.setImmediate;
|
| 46 | 47 | }
|
| 47 | 48 | |
| 48 | - // deno
|
|
| 49 | - if (globalThis.Deno) {
|
|
| 50 | - try {
|
|
| 51 | - return (await import("node:timers")).setImmediate;
|
|
| 52 | - } catch {}
|
|
| 53 | - }
|
|
| 54 | - |
|
| 55 | 49 | // https://developer.mozilla.org/en-US/docs/Web/API/Scheduler/postTask
|
| 56 | 50 | if (globalThis.scheduler) {
|
| 57 | 51 | return (cb, ...args) => scheduler.postTask(() => cb(...args));
|