-
c1cab0c3
by Sylvain Henry at 2025-09-26T10:36:30-04:00
Revert "Add necessary flag for js linking"
This reverts commit 84f68e2231b2eddb2e1dc4e90af394ef0f2e803f.
This commit didn't have the expected effect. See discussion in #26290.
Instead we export HEAP8 and HEAPU8 from rts/js/mem.js
-
0a434a80
by Sylvain Henry at 2025-09-26T10:36:30-04:00
JS: export HEAPU8 (#26290)
This is now required by newer Emscripten versions.
-
b10296a9
by Andreas Klebinger at 2025-09-26T10:37:11-04:00
sizeExpr: Improve Tick handling.
When determining if we scrutinize a function argument we
now properly look through ticks. Fixes #26444.
-
d9e2a9a7
by mniip at 2025-09-26T16:00:50-04:00
rts: Refactor parsing of -h flags
We have a nontrivial amount of heap profiling flags available in the
non-profiled runtime, so it makes sense to reuse the parsing code
between the profiled and the non-profiled runtime, only restricting
which flags are allowed.
-
089e45aa
by mniip at 2025-09-26T16:00:50-04:00
rts: Fix parsing of -h options with braces
When the "filter by" -h options were introduced in
bc210f7d267e8351ccb66972f4b3a650eb9338bb, the braces were mandatory.
Then in 3c22fb21fb18e27ce8d941069a6915fce584a526, the braces were made
optional. Then in d1ce35d2271ac8b79cb5e37677b1a989749e611c the brace
syntax stopped working, and no one seems to have noticed.
-
423f1472
by mniip at 2025-09-26T16:00:50-04:00
rts: add -hT<type> and -hi<table id> heap filtering options (#26361)
They are available in non-profiled builds.
Along the way fixed a bug where combining -he<era> and -hr<retainer>
would ignore whether the retainer matches or not.
-
4cda4785
by mniip at 2025-09-26T16:00:50-04:00
docs: Document -hT<type> and -hi<addr>
-
982ad30f
by mniip at 2025-09-26T16:00:50-04:00
rts: Refactor dumping the heap census
Always do the printing of the total size right next to where the bucket
label is printed. This prevents accidentally printing a label without
the corresponding amount.
Fixed a bug where exactly this happened for -hi profile and the 0x0
(uncategorized) info table.
There is now also much more symmetry between fprintf(hp_file,...) and
the corresponding traceHeapProfSampleString.
-
8cbe006a
by Cheng Shao at 2025-09-26T16:01:34-04:00
hadrian: fix GHC.Platform.Host generation for cross stage1
This patch fixes incorrectly GHC.Platform.Host generation logic for
cross stage1 in hadrian (#26449). Also adds T26449 test case to
witness the fix.
Co-authored-by: Codex <codex@openai.com>
-
0ddd0fdc
by soulomoon at 2025-09-28T19:24:10-04:00
Remove hptAllInstances usage during upsweep
Previously, during the upsweep phase when
checking safe imports, we were loading the module
interface with runTcInteractive, which in turn calls
hptAllInstances. This accesses non-below modules
from the home package table.
Change the implementation of checkSafeImports
to use initTcWithGbl and loadSysInterface to load the
module interface, since we already have TcGblEnv at hand.
This eliminates the unnecessary use of runTcInteractive
and hptAllInstances during the upsweep phase.
-
e05c496c
by Ben Gamari at 2025-09-28T19:24:59-04:00
base: Update changelog to reflect timing of IOPort# removal
This change will make 9.14 afterall.
-
bdc9d130
by Cheng Shao at 2025-09-28T19:25:45-04:00
rts: fix wasm JSFFI initialization constructor code
This commit fixes wasm JSFFI initialization constructor code so that
the constructor is self-contained and avoids invoking a fake
__main_argc_argv function. The previous approach of reusing
__main_void logic in wasi-libc saves a tiny bit of code, at the
expense of link-time trouble whenever GHC links a wasm module without
-no-hs-main, in which case the driver-generated main function would
clash with the definition here, resulting in a linker error. It's
simply better to avoid messing with the main function, and it would
additionally allow linking wasm32-wasi command modules that does make
use of synchronous JSFFI.
-
5d59fc8f
by Cheng Shao at 2025-09-28T19:26:27-04:00
rts: provide stub implementations of ExecPage functions for wasm
This patch provides stub implementations of ExecPage functions for
wasm. They are never actually invoked at runtime for any non-TNTC
platform, yet they can cause link-time errors of missing symbols when
the GHCi.InfoTable module gets linked into the final wasm module (e.g.
a GHC API program).
-
a4d664c7
by Cheng Shao at 2025-09-29T17:29:22+02:00
compiler/ghci: replace the LoadDLL message with LoadDLLs
As a part of #25407, this commit changes the LoadDLL message to
LoadDLLs, which takes a list of DLL paths to load and returns the list
of remote pointer handles. The wasm dyld is refactored to take
advantage of LoadDLLs and harvest background parallelism. On other
platforms, LoadDLLs is based on a fallback codepath that does
sequential loading.
The driver is not actually emitting singular LoadDLLs message with
multiple DLLs yet, this is left in subsequent commits.
Co-authored-by: Codex <codex@openai.com>
-
c7fc4bae
by Cheng Shao at 2025-09-29T17:29:22+02:00
driver: separate downsweep/upsweep phase in loadPackages'
This commit refactors GHC.Linker.Loader.loadPackages' to be separated
into downsweep/upsweep phases:
- The downsweep phase performs dependency analysis and generates a
list of topologically sorted packages to load
- The upsweep phase sequentially loads these packages by calling
loadPackage
This is a necessary refactoring to make it possible to make loading of
DLLs concurrent.
-
ab180104
by Cheng Shao at 2025-09-29T17:57:19+02:00
driver: emit single LoadDLLs message to load multiple DLLs
This commit refactors the driver so that it emits a single LoadDLLs
message to load multiple DLLs in GHC.Linker.Loader.loadPackages'.
Closes #25407.
-------------------------
Metric Increase:
MultiLayerModulesTH_OneShot
TcPlugin_RewritePerf
-------------------------
Co-authored-by: Codex <codex@openai.com>
-
9c304ec0
by Sean D. Gillespie at 2025-09-29T19:57:07-04:00
Fix SIZED_BIN_OP_TY_INT casts in RTS interpreter
Correct `SIZED_BIN_OP_TY_INT` cast to integer. Previously, it cast
its second operand as its parameter `ty`. This does not currently
cause any issues, since we are only using it for bit shifts.
Fixes #26287
-
aa700203
by Richard Eisenberg at 2025-09-30T23:20:04+01:00
Move some fundep solving to new spot
Work in progress...[skip ci]
This completes moving dict fundeps to the main loop
We need wanted/wanted fundeps too
...and some other refactors
Wibbles
Make FunDeps into a new module
Solve new_eqs rather than adding them to WantedConstraints
Wibble
Import wibbles
Comments only [skip ci]
WIP on FunDeps [skip ci]
Work in progress [skip ci]
More WIP
Wibbles to fundeps [skip ci]
Kill off kickOutAfterUnification
More wibbles
Need to remove the unification-count stuff entirely
and do more tidying up -- this commit is mainly for CI
Wibbles solver
Iterate the simples more often than plugins
Start to extend to equalities
Whitespace only
Small improvements
Wibbles
-
439986e4
by Simon Peyton Jones at 2025-09-30T23:20:04+01:00
Improved error messages from fundep changes
-
bbaacd31
by Simon Peyton Jones at 2025-09-30T23:20:05+01:00
Wibbles
-
97283b9d
by Simon Peyton Jones at 2025-09-30T23:20:05+01:00
Fix typo
-
2035ad15
by Simon Peyton Jones at 2025-09-30T23:20:05+01:00
Wibbles
-
159ebba4
by Simon Peyton Jones at 2025-09-30T23:20:05+01:00
Nuke FunDepOrigin1 and 2
-
8b3fd33f
by Simon Peyton Jones at 2025-09-30T23:20:05+01:00
Wibble
-
835bf72f
by Simon Peyton Jones at 2025-09-30T23:20:05+01:00
More refactoring
-
59c3742a
by Simon Peyton Jones at 2025-09-30T23:20:05+01:00
More tidying up
-
a2128ccf
by Simon Peyton Jones at 2025-09-30T23:20:05+01:00
Yet more
-
054ff493
by Simon Peyton Jones at 2025-09-30T23:20:05+01:00
Wibbles
-
8ad73e02
by Simon Peyton Jones at 2025-09-30T23:20:05+01:00
Wibbles [skip ci]
-
8ac877f2
by Simon Peyton Jones at 2025-09-30T23:20:05+01:00
Naming and comments only [skip ci]
-
7c60ffbf
by Simon Peyton Jones at 2025-09-30T23:20:05+01:00
Progress [skip ci]x
-
5d56a823
by Simon Peyton Jones at 2025-09-30T23:20:05+01:00
Make it compile
.. with now story on WhatUnifications
-
fc3c820c
by Simon Peyton Jones at 2025-09-30T23:20:05+01:00
Stop putting QLInstVar into the tc_lvl environment [skip ci]
This is really a bug! See (TCAPP2)
Not done yet
-
32295d2a
by Simon Peyton Jones at 2025-09-30T23:20:05+01:00
Now it compiles
-
e8c68ec1
by Simon Peyton Jones at 2025-09-30T23:20:05+01:00
Accept error message changes
Plus compile time improvement
Metrics: compile_time/bytes allocated
Baseline
Test value New value Change
---------------------- --------------------------------------
T5030(normal) 173,839,232 148,115,248 -14.8% GOOD
hard_hole_fits(normal) 286,768,048 284,015,416 -1.0%
geo. mean -0.2%
minimum -14.8%
maximum +0.3%
Metric Decrease:
T5030
-
cb488d28
by Simon Peyton Jones at 2025-09-30T23:20:05+01:00
QuickLook's tcInstFun should make instantiation variables directly
tcInstFun must make "instantiation variables", not regular
unification variables, when instantiating function types. That was
previously implemented by a hack: set the /ambient/ level to QLInstTyVar.
But the hack finally bit me, when I was refactoring WhatUnifications.
And it was always wrong: see the now-expunged (TCAPP2) note.
This commit does it right, by making tcInstFun call its own
instantiation functions. That entails a small bit of duplication,
but the result is much, much cleaner.
-
ea7aff67
by Simon Peyton Jones at 2025-09-30T23:20:05+01:00
Wibbles
-
4b56a09f
by Simon Peyton Jones at 2025-09-30T23:20:05+01:00
Fix
-
9fd83f21
by Simon Peyton Jones at 2025-09-30T23:20:05+01:00
Wibble Notes
-
3184c6a4
by Simon Peyton Jones at 2025-09-30T23:20:05+01:00
Wibbles
-
9a4138e1
by Simon Peyton Jones at 2025-09-30T23:20:05+01:00
Wibble
-
887202a7
by Simon Peyton Jones at 2025-09-30T23:20:05+01:00
Build implicaiton for constraints from (static e)
This commit addresses #26466, by buiding an implication for the
constraints arising from a (static e) form. The implication has
a special ic_info field of StaticFormSkol, which tells the constraint
solver to use an empty set of Givens.
See (SF3) in Note [Grand plan for static forms]
in GHC.Iface.Tidy.StaticPtrTable
This commit also reinstates an `assert` in GHC.Tc.Solver.Equality.
The test `StaticPtrTypeFamily` was failing with an assertion failure,
but it now works.