mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
Drop Autocomplete improvements and extend compiler optimization section
In the cross-post to Roblox developer forum, Autocomplete section will be restored, while compiler optimization section can be optionally removed (although it might interest some developers)
This commit is contained in:
parent
1ef901c5e4
commit
56c7fb507d
1 changed files with 7 additions and 12 deletions
|
@ -67,16 +67,6 @@ function foo<T>(x: T, y) end
|
|||
|
||||
We have also fixed various issues that have caused crashes, with many of them coming from your bug reports.
|
||||
|
||||
## Autocomplete improvements
|
||||
|
||||
Studio autocomplete has received a few improvements:
|
||||
|
||||
* Function argument names have been added to the function signature display
|
||||
* `Instance:GetAttribute` and `Instance:SetAttribute` will now suggest attribute names if instance can be resolved
|
||||
* Inside the new if-then-else expression, incorrect suggestions following `else` have been fixed
|
||||
* Deprecated lowercase `Color3:toHSV` so it's no longer suggested
|
||||
* Deprecated lowercase `Instance:findFirstChild`, `Instance:clone`, `Instance:remove`, `Instance:getChildren` and old alias called `Instance:children`.
|
||||
|
||||
## Linter improvements
|
||||
|
||||
`global-used-as-local` lint warning has been extended to notice when global variable writes always happen before their use in a local scope, suggesting that they can be replaced with a local variable:
|
||||
|
@ -96,5 +86,10 @@ end
|
|||
|
||||
Garbage collection CPU utilization has been tuned to further reduce frame time spikes of individual collection steps and to bring different GC stages to the same level of CPU utilization.
|
||||
|
||||
In open-source release of Luau, when optimization level 2 is enabled, compiler will now perform function inlining.
|
||||
Loop unrolling in optimization level 2 has also been improved to handle all language constructs inside the loop body.
|
||||
### Function inlining and loop unrolling
|
||||
|
||||
In open-source release of Luau, when optimization level 2 is enabled, compiler will now perform function inlining and loop unrolling.
|
||||
|
||||
Only loops with loop bounds known at compile time, such as `for i=1,4 do`, can be unrolled. The loop body must be simple enough for the optimization to be profitable; compiler uses heuristics to estimate the performance benefit and automatically decide if unrolling should be performed.
|
||||
|
||||
Only local functions (defined either as `local function foo` or `local foo = function`) can be inlined. The function body must be simple enough for the optimization to be profitable; compiler uses heuristics to estimate the performance benefit and automatically decide if each call to the function should be inlined instead. Additionally recursive invocations of a function can't be inlined at this time, and inlining is completely disabled for modules that use `getfenv`/`setfenv` functions.
|
||||
|
|
Loading…
Add table
Reference in a new issue