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

Getting closer to the Scala.js linker architecture. #122

Merged
merged 8 commits into from
May 8, 2024

Conversation

sjrd
Copy link
Collaborator

@sjrd sjrd commented May 7, 2024

No description provided.

sjrd added 8 commits May 7, 2024 11:06
This removes all the knowledge of the IR from `wasm4s.Names`.

The name `VarGen` is the same as the corresponding logic in the
JS backend.
Wasm does not have such a thing, even in the text format.
We extract the Wasm-only parts into new classes `ModuleBuilder`
and `FunctionBuilder`. The parts that interact with the IR and/or
contain "decision-making" related to our back-end stay in
`WasmContext` and `WasmFunctionContext` and are moved to `ir2wasm`.

We make `WasmModule` fully immutable in the process, since the
mutable aspects are moved to `ModuleBuilder`.
Use `VarGen.genTypeName` instead.
@sjrd sjrd requested a review from tanishiking May 7, 2024 14:55
Copy link
Owner

@tanishiking tanishiking left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM from my side, thanks!

@tanishiking tanishiking merged commit 878e8cd into tanishiking:main May 8, 2024
1 check passed
@sjrd sjrd deleted the adapt-to-scala-js-core-structure branch May 8, 2024 04:37
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