Skip to content

Unify and simplify source code generation #240

@adam-enko

Description

@adam-enko

Source code generation is very similar for Native, JS, and Wasm platforms.

This and GenerateWasmSourceWorker are almost identical. The only exceptions are useBenchmarkJs param and a platform supplied to SuiteSourceGenerator.

Perhaps, we can use a single set of classes (worker and parameters) instead?

Originally posted by @fzhinkin in #235 (comment)

This could most likely be simplified.

If the workers were merged, then it would make sense merge all of the Native/JS/Wasm generation into a single worker and task. They don't differ significantly: Native uses KlibResolver.Native and JS/Wasm uses KlibResolver.JS, and this can be controlled with a Platform input property.

It's a bit delicate to do such refactoring at the moment because the Native worker is in the public API, but will be easier once the visibility of workers is limited #211.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions