-
Notifications
You must be signed in to change notification settings - Fork 73
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
feat: add an option to translate JS_IR with DCE. #501
base: master
Are you sure you want to change the base?
feat: add an option to translate JS_IR with DCE. #501
Conversation
@@ -51,8 +51,10 @@ class KotlinProjectExecutor( | |||
return convertJsWithConverter(project, kotlinToJSTranslator::doTranslate) | |||
} | |||
|
|||
fun convertToJsIr(project: Project): TranslationJSResult { | |||
return convertJsWithConverter(project, kotlinToJSTranslator::doTranslateWithIr) | |||
fun convertToJsIr(project: Project, shouldEliminateDeadCode: Boolean): TranslationJSResult { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 = "", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
notContains
mb?
@JSMonk do u need it? |
Add an query argument for adding dead code elimination step before IR to JS translating