Skip to content
This repository has been archived by the owner on Jul 12, 2024. It is now read-only.

Reorganize the emitter to better match the JS backend. #123

Merged
merged 6 commits into from
May 10, 2024

Conversation

sjrd
Copy link
Collaborator

@sjrd sjrd commented May 9, 2024

No description provided.

sjrd added 6 commits May 8, 2024 12:02
…smBuilder.

This is in the context of making `WasmBuilder` closer to the JS
back-end `ClassEmitter` and `HelperFunctions` closer to `CoreJSLib`.
The former is responsible for the generation of everything that
relates to a given `LinkedClass`, while the latter is responsible
for generating everything that is more global.
We are going to give it the same kinds of responsibilities as
`CoreJSLib` for the JS back-end.
This corresponds to the JS backend, where all definitions that are
not related to any particular class are handled by `CoreJSLib`.
It now has the same responsibilities as the `ClassEmitter` in the
JS backend.
It has the same responsibilities as `Emitter` in the JS backend,
namely handling the macro-structure of the output files, but not
I/O operations.
This way, WasmContext is not responsible for emitting code anymore.
It only acts as a knowledge repository.
@sjrd sjrd requested a review from tanishiking May 9, 2024 11:15
@sjrd sjrd changed the title Reorganizer the emitter to better match the JS backend. Reorganize the emitter to better match the JS backend. May 9, 2024
@tanishiking tanishiking merged commit c9b8270 into tanishiking:main May 10, 2024
1 check passed
@sjrd sjrd deleted the reorg-emitter branch May 10, 2024 05:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants