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

Sync to upstream/release/568 #865

Merged
merged 92 commits into from
Mar 17, 2023
Merged

Sync to upstream/release/568 #865

merged 92 commits into from
Mar 17, 2023

Conversation

vegorov-rbx
Copy link
Collaborator

@vegorov-rbx vegorov-rbx commented Mar 17, 2023

Some examples:

local function f(x: string?)
    if not x then return end

    -- x is 'string' here
end

Throwing calls like error or assert(false) instead of 'return' are also recognized.
Existing complex refinements like type/typeof and tagged union checks are expected to work, among others.

To enable this feature, LuauTinyControlFlowAnalysis exclusion has to be removed from ExperimentalFlags.h.
If will become enabled unconditionally in the near future.

  • Linter has been integrated into the typechecker analysis so that type-aware lint warnings can work in any mode
    Frontend::lint methods were deprecated, Frontend::check has to be used instead with runLintChecks option set.
    Resulting lint warning are located inside CheckResult.

  • Fixed large performance drop and increased memory consumption when array is filled at an offset (Fixes Filling array from offset can be slow #590)

  • Part of Type error suppression RFC was implemented making subtyping checks with any type transitive.


In our work on the new type-solver:

  • --!nocheck mode no longer reports type errors
  • New solver will not be used for --!nonstrict modules until all issues with strict mode typechecking are fixed
  • Added control-flow aware type refinements mentioned earlier

In native code generation:

  • LOP_NAMECALL has been translated to IR
  • type and typeof builtin fastcalls have been translated to IR/assembly
  • Additional steps were taken towards arm64 support

@vegorov-rbx vegorov-rbx merged commit 42a2805 into master Mar 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Filling array from offset can be slow if not x then return end should exclude falsy types after the block
4 participants