Skip to content

Conversation

JSMonk
Copy link
Member

@JSMonk JSMonk commented Jun 16, 2022

Add an query argument for adding dead code elimination step before IR to JS translating


fun convertToJsIr(project: Project): TranslationJSResult {
return convertJsWithConverter(project, kotlinToJSTranslator::doTranslateWithIr)
fun convertToJsIr(project: Project, shouldEliminateDeadCode: Boolean): TranslationJSResult {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please, fix the usages of the method or set a default value for "shouldEliminateDeadCode".
BaseExecutorTest will not pass due to the method's signature mismatch.

Copy link
Collaborator

Choose a reason for hiding this comment

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

also it;s good to have additional test for that feature

fun runJsIrWithDce(
code: String,
contains: String = "",
notContain: String = "",
Copy link
Collaborator

Choose a reason for hiding this comment

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

notContains mb?

@AlexanderPrendota
Copy link
Collaborator

@JSMonk do u need it?

@dkrasnoff dkrasnoff self-requested a review June 25, 2025 12:59
@dkrasnoff
Copy link
Collaborator

UPD: Artem said this PR is still relevant and will be updated.

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

Successfully merging this pull request may close these issues.

4 participants