Skip to content

WIP: re-organize into lib/ dir - #2

Draft
samsonjs wants to merge 2 commits into
masterfrom
refactor-lib
Draft

WIP: re-organize into lib/ dir#2
samsonjs wants to merge 2 commits into
masterfrom
refactor-lib

Conversation

@samsonjs

Copy link
Copy Markdown
Owner

No description provided.

samsonjs added a commit that referenced this pull request Sep 9, 2026
Everything sat at the top level in a flat asm/ directory, with each file
requiring its neighbours by hand.  PR #2 aimed at this layout but forked
before the ELF writer existed and stubbed it out, so it is re-done here
against current master rather than revived.

The directory layout is now the namespace, which is what Zeitwerk needs:
lib/compiler/asm/x86/registers.rb is Compiler::ASM::X86::Registers.  That
forced the two files defining a second top-level constant to be split,
and the requires are all gone.

build.rb becomes Compiler::Build and bin/compile is the command line
entry point it used to carry.  The nasm template moves next to the
back-end that reads it, since the old path was relative to the repo root.
machowriter.rb is dropped: an orphaned fragment with a syntax error that
nothing required and standard could not parse.
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.

1 participant