Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify and simplify source code generation #240

Open
adam-enko opened this issue Jul 9, 2024 · 0 comments
Open

Unify and simplify source code generation #240

adam-enko opened this issue Jul 9, 2024 · 0 comments

Comments

@adam-enko
Copy link
Member

adam-enko commented Jul 9, 2024

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.

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

No branches or pull requests

1 participant