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

Commits on May 8, 2024

  1. Move the generation of newDefault, clone and intf instance test to Wa…

    …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.
    sjrd committed May 8, 2024
    Configuration menu
    Copy the full SHA
    ec477e0 View commit details
    Browse the repository at this point in the history
  2. Rename HelperFunctions to CoreWasmLib.

    We are going to give it the same kinds of responsibilities as
    `CoreJSLib` for the JS back-end.
    sjrd committed May 8, 2024
    Configuration menu
    Copy the full SHA
    f67b518 View commit details
    Browse the repository at this point in the history

Commits on May 9, 2024

  1. Move all class-independent definitions to CoreWasmLib.

    This corresponds to the JS backend, where all definitions that are
    not related to any particular class are handled by `CoreJSLib`.
    sjrd committed May 9, 2024
    Configuration menu
    Copy the full SHA
    309b96d View commit details
    Browse the repository at this point in the history
  2. Rename WasmBuilder to ClassEmitter.

    It now has the same responsibilities as the `ClassEmitter` in the
    JS backend.
    sjrd committed May 9, 2024
    Configuration menu
    Copy the full SHA
    c209b19 View commit details
    Browse the repository at this point in the history
  3. Extract wasmemitter.Emitter our of WebAssemblyLinkerBackend.

    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.
    sjrd committed May 9, 2024
    Configuration menu
    Copy the full SHA
    f35e256 View commit details
    Browse the repository at this point in the history
  4. Move WasmContext.complete to Emitter.

    This way, WasmContext is not responsible for emitting code anymore.
    It only acts as a knowledge repository.
    sjrd committed May 9, 2024
    Configuration menu
    Copy the full SHA
    c16772a View commit details
    Browse the repository at this point in the history