X Tutup
Skip to content

fixed vararg optimization logic#1046

Merged
Perryvw merged 1 commit intoTypeScriptToLua:masterfrom
tomblind:vararg-optimize-curry2
Jul 16, 2021
Merged

fixed vararg optimization logic#1046
Perryvw merged 1 commit intoTypeScriptToLua:masterfrom
tomblind:vararg-optimize-curry2

Conversation

@tomblind
Copy link
Collaborator

@tomblind tomblind commented Jul 14, 2021

The core flaw in how this was working is that any function types defined inside the scope would be flagged as "hoistable" and trigger deoptimization. But this would include things like parameters or local variable types.

I've changed this logic to explicitly only include actual hoistable functions (ex. function foo() {}) which seems to address all cases properly now. We should keep our eye out for other edge cases here, though.

Closes #1047

@Perryvw Perryvw merged commit f034d9f into TypeScriptToLua:master Jul 16, 2021
sanikoyes pushed a commit to sanikoyes/TypeScriptToLua that referenced this pull request Sep 24, 2021
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.

Unnessecary table.unpack when passing ... parameter to a function local variable

2 participants

X Tutup