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

InterpStringMid appears to be impossible to create #744

Closed
Kampfkarren opened this issue Nov 11, 2022 · 0 comments · Fixed by #853
Closed

InterpStringMid appears to be impossible to create #744

Kampfkarren opened this issue Nov 11, 2022 · 0 comments · Fixed by #853
Assignees
Labels
bug Something isn't working

Comments

@Kampfkarren
Copy link
Contributor

Kampfkarren commented Nov 11, 2022

https://github.com/Roblox/luau/blob/816e41a8f2eae7ca2d9d9fb4d2f847e33c087650/Ast/src/Lexer.cpp#L605

This method takes formatType and endType. It is meant to be that formatType is what is used if there is formatting, and endType is used if there is not.

The two consumers of this are:

https://github.com/Roblox/luau/blob/816e41a8f2eae7ca2d9d9fb4d2f847e33c087650/Ast/src/Lexer.cpp#L778

(which would theoretically create InterpStringMid), and:

https://github.com/Roblox/luau/blob/816e41a8f2eae7ca2d9d9fb4d2f847e33c087650/Ast/src/Lexer.cpp#L602

However, formatType is completely unused, instead using a fixed InterpStringBegin:

https://github.com/Roblox/luau/blob/816e41a8f2eae7ca2d9d9fb4d2f847e33c087650/Ast/src/Lexer.cpp#L645

I don't know what implications this has considering conformance tests pass, I think it breaks whatever code is going to convert the Ast to a string.

@Kampfkarren Kampfkarren added the bug Something isn't working label Nov 11, 2022
@zeux zeux self-assigned this Feb 15, 2023
vegorov-rbx added a commit that referenced this issue Mar 3, 2023
* Fixed incorrect lexeme generated for string parts in the middle of an
interpolated string (Fixes #744)
* DeprecatedApi lint can report some issues without type inference
information
* Fixed performance of autocomplete requests when suggestions have large
intersection types (Solves
#847)
* Marked `table.getn`/`foreach`/`foreachi` as deprecated ([RFC:
Deprecate
table.getn/foreach/foreachi](https://github.com/Roblox/luau/blob/master/rfcs/deprecate-table-getn-foreach.md))
* With -O2 optimization level, we now optimize builtin calls based on
known argument/return count.
Note that this change can be observable if `getfenv/setfenv` is used to
substitute a builtin, especially if arity is different.
Fastcall heavy tests show a 1-2% improvement.
* Luau can now be built with clang-cl (Fixes
#736)

We also made many improvements to our experimental components.

For our new type solver:
* Overhauled data flow analysis system, fixed issues with 'repeat'
loops, global variables and type annotations
* Type refinements now work on generic table indexing with a string
literal
* Type refinements will properly track potentially 'nil' values (like
t[x] for a missing key) and their further refinements
* Internal top table type is now isomorphic to `{}` which fixes issues
when `typeof(v) == 'table'` type refinement is handled
* References to non-existent types in type annotations no longer resolve
to 'error' type like in old solver
* Improved handling of class unions in property access expressions
* Fixed default type packs
* Unsealed tables can now have metatables
* Restored expected types for function arguments

And for native code generation:
* Added min and max IR instructions mapping to vminsd/vmaxsd on x64
* We now speculatively extract direct execution fast-paths based on
expected types of expressions which provides better optimization
opportunities inside a single basic block
* Translated existing math fastcalls to IR form to improve tag guard
removal and constant propagation
RomanKhafizianov pushed a commit to RomanKhafizianov/luau that referenced this issue Nov 27, 2023
* Fixed incorrect lexeme generated for string parts in the middle of an
interpolated string (Fixes luau-lang/luau#744)
* DeprecatedApi lint can report some issues without type inference
information
* Fixed performance of autocomplete requests when suggestions have large
intersection types (Solves
luau-lang/luau#847)
* Marked `table.getn`/`foreach`/`foreachi` as deprecated ([RFC:
Deprecate
table.getn/foreach/foreachi](https://github.com/Roblox/luau/blob/master/rfcs/deprecate-table-getn-foreach.md))
* With -O2 optimization level, we now optimize builtin calls based on
known argument/return count.
Note that this change can be observable if `getfenv/setfenv` is used to
substitute a builtin, especially if arity is different.
Fastcall heavy tests show a 1-2% improvement.
* Luau can now be built with clang-cl (Fixes
luau-lang/luau#736)

We also made many improvements to our experimental components.

For our new type solver:
* Overhauled data flow analysis system, fixed issues with 'repeat'
loops, global variables and type annotations
* Type refinements now work on generic table indexing with a string
literal
* Type refinements will properly track potentially 'nil' values (like
t[x] for a missing key) and their further refinements
* Internal top table type is now isomorphic to `{}` which fixes issues
when `typeof(v) == 'table'` type refinement is handled
* References to non-existent types in type annotations no longer resolve
to 'error' type like in old solver
* Improved handling of class unions in property access expressions
* Fixed default type packs
* Unsealed tables can now have metatables
* Restored expected types for function arguments

And for native code generation:
* Added min and max IR instructions mapping to vminsd/vmaxsd on x64
* We now speculatively extract direct execution fast-paths based on
expected types of expressions which provides better optimization
opportunities inside a single basic block
* Translated existing math fastcalls to IR form to improve tag guard
removal and constant propagation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

2 participants