Skip to content

RTStack consolidation. - #1312

Merged
jaykrell merged 1 commit into
modula3:masterfrom
jaykrell:one-source-1
Nov 22, 2026
Merged

jaykrell merged 1 commit into
modula3:masterfrom
jaykrell:one-source-1

Conversation

@jaykrell

@jaykrell jaykrell commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

AMD64_DARWIN, ARM64_DARWIN, AMD64_LINUX have the same RTStackC.c, except for comments.
Deduplicate them, taking the AMD64_LINUX one and moving into a "walker" directory, analogous to "no_walker".

There are then no more runtime/TARGET directories.

And the need for library("UNWIND") is realistically limited currently to AMD64_LINUX, since on Darwin it is "builtin", in libSystem.

Further note that stack backtrace is easy to provide via a libunwind facsimile over RtlVirtualUnwind, but CaptureStackBackTrace is a slightly better simpler more efficient fit. It doesn't require callers to have a full CONTEXT or loop.

@jaykrell
jaykrell marked this pull request as draft November 22, 2026 13:27
@jaykrell
jaykrell force-pushed the one-source-1 branch 15 times, most recently from db7f6bf to f7ce03f Compare November 22, 2026 14:29
@jaykrell
jaykrell marked this pull request as ready for review November 22, 2026 14:30
@jaykrell
jaykrell merged commit 160ab45 into modula3:master Nov 22, 2026
11 checks passed
@hosking

hosking commented Nov 22, 2026

Copy link
Copy Markdown
Member

Jay, thanks for splitting #1277 up so quickly, and the consolidation is a real improvement. One request on process: could you wait for CI to go green before merging, and leave runtime changes (m3core's runtime, threads, GC) open for a review? Yesterday's eight merges went in between 20 seconds and 9 minutes after opening, before any job finished. #1317 broke both Darwin builds until #1319, and with #1287 still intermittent on Windows, a red master makes it hard to tell a new break from the known crash. Pushing to a branch and letting CI run as you go is free. I'm happy to review quickly.

🤖 Generated with Claude Code

hosking pushed a commit that referenced this pull request Nov 23, 2026
Brings in #1302 (report an unhandled ex_stack exception), the RTStack
and RTMachine consolidation (#1312-#1319), #1307 (Copy_n's sub-byte
mask), #1309, #1323/#1324, #1331, #1332, #1334 and #1335.

Conflicts, all in favour of master's versions:
- RTException, RTExStack, RTExStackC.c: #1302 is the upstreamed form of
  msir's unhandled-exception report; master installs the terminate
  handler by an explicit call from RTExStack's body rather than a C++
  static initializer.
- runtime/common/m3makefile: RTStackCommon.c moved to separate
  Has_walker files (#1316).
- m3tests: keep master's p309 alongside msir's p303 and p304.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants