Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
004d88f
Sync to upstream/release/711 (#2280)
aatxe Mar 6, 2026
ea931e0
Fix being able to write to a read-only field in a compound assignment…
PhoenixWhitefire Mar 12, 2026
9e2984f
Sync to upstream/release/712 (#2296)
andyfriesen Mar 13, 2026
b37af21
Sync to upstream/release/713 (#2308)
hgoldstein Mar 20, 2026
3634cb4
Fix `type(x) == "vector"` always refining `x` to `never` (#2291)
PhoenixWhitefire Mar 26, 2026
2771874
Sync to upstream/release/714 (#2314)
vrn-sn Mar 27, 2026
b57f54d
Read-only/Write-only extern properties, Read-only `vector` properties…
PhoenixWhitefire Mar 31, 2026
40d4815
Sync to upstream/release/715 (#2325)
skberkeley Apr 3, 2026
4ca11db
Sync to upstream/release/716 (#2339)
annieetang Apr 10, 2026
6f2978e
Sync to upstream/release/717 (#2350)
hgoldstein Apr 20, 2026
231a59c
Sync to upstream/release/718 (#2359)
SPY Apr 24, 2026
26f346c
Avoid a redundant MOVE on some string interpolation setups (#2324)
9382 Apr 27, 2026
08b3df5
Add null-check for NavigationContext.getAlias result (#2330)
JohnnyMorganz Apr 27, 2026
54426c4
Sync to upstream/release/719 (#2370)
vegorov-rbx May 1, 2026
a56f602
Bump jinja2 from 3.1.5 to 3.1.6 in /tools/fuzz (#1713)
dependabot[bot] May 4, 2026
0c6cea0
Sync to upstream/release/720 (#2383)
aatxe May 8, 2026
c8cf286
Sync to upstream/release/721 (#2394)
andyfriesen May 15, 2026
90ca62a
Add missing <algorithm> include in OptimizeDeadStore.cpp (#2396)
bytexenon May 19, 2026
0e5d391
Preserve module names for overload detail errors (#2398)
haziscool May 19, 2026
81ac7c3
Parameterize CI jobs on compiler (#2405)
hgoldstein May 20, 2026
32d52d1
Sync to upstream/release/722 (#2411)
hgoldstein May 22, 2026
e7500c9
Sync to upstream/release/723 (#2419)
vrn-sn May 29, 2026
8157350
Fix missing `prettyPrint` overloads in header and implementation (#2209)
ActualMasterOogway Jun 3, 2026
87276f7
Implement RFC `type:issubtypeof` (#2133)
PhoenixWhitefire Jun 4, 2026
8f33df9
Sync to upstream/release/724 (#2425)
skberkeley Jun 6, 2026
51e0862
Reflags embedded type method definitions (#2432)
skberkeley Jun 8, 2026
d751dca
Fix CFG dump printing type guards backwards (#2438)
7Duser Jun 11, 2026
91caa73
Sync to upstream/release/725 (#2443)
annieetang Jun 12, 2026
550e128
Make the CLI try to find the provided file name with a .luau or .lua …
gaymeowing Jun 16, 2026
2e54214
Add DOCTEST_CONFIG_USE_STD_HEADERS to build system to fix MSVC compil…
annieetang Jun 17, 2026
86d2a9d
Sync to upstream/release/726 (#2453)
Vighnesh-V Jun 19, 2026
e97ea14
Fix AutoComplete providing incomplete results (#2429)
haziscool Jun 24, 2026
f1f121d
Sync to upstream/release/727 (#2465)
SPY Jun 26, 2026
ddcea05
Sync to upstream/release/728 (#2486)
vegorov-rbx Jul 2, 2026
a3d2b0d
Fix `@deprecated` attribute not propagating on anonymous functions in…
JohnnyMorganz Jul 9, 2026
c535597
Track the local binding that a prefixed type reference is linked to (…
JohnnyMorganz Jul 9, 2026
91eb532
fix: add missing `AstExprConstantInteger` visitor to `AstJsonEncoder`…
spxnso Jul 10, 2026
da76666
Document luau-compile -t flag in the help message (#2455)
ssobkowski Jul 10, 2026
ec6b8a5
Parser: reject duplicated binary prefixes (#2461)
bytexenon Jul 10, 2026
39b43ad
Correct `types.singleton` using `lua_typename` instead of `luaL_typen…
PhoenixWhitefire Jul 10, 2026
28c081f
Add a `luaL_checkudatatagged` and `lua_getuserdataname` (#2483)
PhoenixWhitefire Jul 10, 2026
af6afdd
Added `__tostring` for `type` (#2525)
PhoenixWhitefire Jul 10, 2026
5e93da2
Fixup flag checks for luaL_checkudatatagged (#2536)
vegorov-rbx Jul 10, 2026
6e9b580
Sync to upstream/release/729 (#2537)
hgoldstein Jul 10, 2026
812b327
Fix line endings in lapi.cpp and laux.cpp (#2555)
vegorov-rbx Jul 14, 2026
01c8a54
Propagate deprecated attribute information on functions to Autocomple…
JohnnyMorganz Jul 14, 2026
5e76a0a
Add Frontend::clearModules() for selective module removal (#2331)
JohnnyMorganz Jul 14, 2026
e8ae48c
Sync to upstream/release/730 (#2566)
andyfriesen Jul 17, 2026
5bc7f4b
Clip this assert. (#2568)
andyfriesen Jul 17, 2026
f8ca77a
Sync to upstream/release/731 (#2584)
hgoldstein Jul 24, 2026
0899149
Merge tag '0.712' into merge_to_latest
HaroldCindy Jul 28, 2026
9ac2a51
Merge tag '0.713' into merge_to_latest
HaroldCindy Jul 28, 2026
7e6ddb0
Merge tag '0.714' into merge_to_latest
HaroldCindy Jul 28, 2026
e64b99d
Merge tag '0.715' into merge_to_latest
HaroldCindy Jul 30, 2026
3cce518
Merge tag '0.716' into merge_to_latest
HaroldCindy Jul 31, 2026
71987ea
Merge tag '0.717' into merge_to_latest
HaroldCindy Jul 31, 2026
671c545
Fix 64-bit int dumping
HaroldCindy Jul 31, 2026
ab6af45
Merge tag '0.718' into merge_to_latest
HaroldCindy Jul 31, 2026
ad229d3
Merge tag '0.719' into merge_to_latest
HaroldCindy Jul 31, 2026
c4f4638
Merge tag '0.720' into merge_to_latest
HaroldCindy Jul 31, 2026
03dbbf0
Merge tag '0.721' into merge_to_latest
HaroldCindy Jul 31, 2026
0042536
Merge tag '0.722' into merge_to_latest
HaroldCindy Jul 31, 2026
f206ee9
Merge tag '0.723' into merge_to_latest
HaroldCindy Jul 31, 2026
faf1888
Merge tag '0.724' into merge_to_latest
HaroldCindy Jul 31, 2026
7b1452a
Merge tag '0.725' into merge_to_latest
HaroldCindy Jul 31, 2026
decb2d0
Sync to upstream/release/732 (#2605)
annieetang Jul 31, 2026
82fdda0
Merge tag '0.726' into merge_to_latest
HaroldCindy Aug 1, 2026
266a50d
Merge tag '0.727' into merge_to_latest
HaroldCindy Aug 1, 2026
0e64270
Merge tag '0.728' into merge_to_latest
HaroldCindy Aug 1, 2026
14bbed2
Merge tag '0.729' into merge_to_latest
HaroldCindy Aug 1, 2026
b4c0839
Merge tag '0.730' into merge_to_latest
HaroldCindy Aug 1, 2026
ca10016
Merge tag '0.731' into merge_to_latest
HaroldCindy Aug 1, 2026
d730b24
Merge tag '0.732' into merge_to_latest
HaroldCindy Aug 1, 2026
a83d3db
Make classes and objects traversable by our various traversers.
HaroldCindy Aug 1, 2026
0bd0e3e
Clean up iterorder codegen
HaroldCindy Aug 1, 2026
f08f8bb
Correctly handle more yieldable call instrunctions
HaroldCindy Aug 1, 2026
ff8cd67
Remove Ares tags' dependency on VM type tag values
HaroldCindy Aug 2, 2026
862db36
Fix build.yml
HaroldCindy Aug 2, 2026
7f93a17
Update builtins.txt
HaroldCindy Aug 2, 2026
9289333
Handle new CallInfo->errfunc construct in Ares
HaroldCindy Aug 2, 2026
5f6e093
Re-add our HARDSTACKTESTS fix to lua_vertex()
HaroldCindy Aug 3, 2026
158013c
Work around upstream bugs with FFlag::LuauAutoStack under HARDSTACKTESTS
HaroldCindy Aug 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,12 @@ jobs:
shell: bash # necessary for fail-fast
run: |
RelWithDebInfo/Luau.Conformance.exe -O2
# ServerLua: Some of these disabled due to extremely long runtime
# RelWithDebInfo/Luau.Conformance.exe -O2 --fflags=true
# RelWithDebInfo/Luau.Conformance.exe --codegen
# ServerLua: Some of these disabled due to extremely long runtime
# RelWithDebInfo/Luau.Conformance.exe -O2 --fflags=true
# RelWithDebInfo/Luau.Conformance.exe --codegen
RelWithDebInfo/Luau.Conformance.exe --codegen --fflags=true
# RelWithDebInfo/Luau.Conformance.exe --codegen -O2
# RelWithDebInfo/Luau.Conformance.exe --codegen -O2 --fflags=true
# RelWithDebInfo/Luau.Conformance.exe --codegen -O2
# RelWithDebInfo/Luau.Conformance.exe --codegen -O2 --fflags=true
- name: cmake cli
shell: bash # necessary for fail-fast
run: |
Expand Down
190 changes: 86 additions & 104 deletions ARES.bt
Original file line number Diff line number Diff line change
Expand Up @@ -33,63 +33,47 @@ const uchar UTAG_LLTIMERS = 30;
const uchar UTAG_STRBUF = 31;
const uchar UTAG_OPAQUE_BUFFER = 32;

#define LUA_TNONE (-1)

#define LUA_TNIL 0
#define LUA_TBOOLEAN 1
#define LUA_TLIGHTUSERDATA 2
#define LUA_TNUMBER 3
#define LUA_TVECTOR 4
#define LUA_TSTRING 5
#define LUA_TTABLE 6
#define LUA_TFUNCTION 7
#define LUA_TUSERDATA 8
#define LUA_TTHREAD 9
#define LUA_TBUFFER 10
#define LUA_NUMTAGS 11

#define LUA_TPROTO LUA_NUMTAGS
#define LUA_TUPVAL (LUA_NUMTAGS+1)
#define LUA_TDEADKEY (LUA_NUMTAGS+2)

/*
** number of all possible tags (including LUA_TNONE but excluding DEADKEY)
*/
#define LUA_TOTALTAGS (LUA_TUPVAL+1)

#define ERIS_PERMANENT (LUA_TOTALTAGS + 1)
#define ERIS_REFERENCE (ERIS_PERMANENT + 1)

/* Mirrors enum AresType in VM/src/ares.cpp. These are wire values and are
* assigned explicitly there - do not derive them from Luau's lua_Type. */
typedef enum <uint8_t> {
ET_NIL = LUA_TNIL,
ET_BOOLEAN = LUA_TBOOLEAN,
ET_LIGHTUSERDATA = LUA_TLIGHTUSERDATA,
ET_NUMBER = LUA_TNUMBER,
ET_VECTOR = LUA_TVECTOR,
ET_STRING = LUA_TSTRING,
ET_TABLE = LUA_TTABLE,
ET_FUNCTION = LUA_TFUNCTION,
ET_USERDATA = LUA_TUSERDATA,
ET_THREAD = LUA_TTHREAD,
ET_BUFFER = LUA_TBUFFER,
ET_PROTO = LUA_TPROTO,
ET_UPVAL = LUA_TUPVAL,
ET_TDEADKEY = LUA_TDEADKEY,
ET_PERMANENT = ERIS_PERMANENT,
ET_REFERENCE = ERIS_REFERENCE,
} ErisType;

// thread status; 0 is OK
ARES_T_NIL = 0,
ARES_T_BOOLEAN = 1,
ARES_T_LIGHTUSERDATA = 2,
ARES_T_NUMBER = 3,
ARES_T_INTEGER = 4,
ARES_T_VECTOR = 5,

ARES_T_STRING = 16,
ARES_T_TABLE = 17,
ARES_T_FUNCTION = 18,
ARES_T_USERDATA = 19,
ARES_T_THREAD = 20,
ARES_T_BUFFER = 21,
ARES_T_CLASS = 22,
ARES_T_OBJECT = 23,
ARES_T_VECTORD = 24,

ARES_T_DEADKEY = 40,
ARES_T_PROTO = 41,
ARES_T_UPVAL = 42,

ARES_T_PERMANENT = 64,
ARES_T_REFERENCE = 65,
} AresType;

/* Mirrors enum AresStatus in VM/src/ares.cpp. Like the type tags these are
* wire values, not Luau's lua_Status. */
typedef enum <uint8_t>
{
LUA_OK = 0,
LUA_YIELD,
LUA_ERRRUN,
LUA_ERRSYNTAX,
LUA_ERRMEM,
LUA_ERRERR,
LUA_BREAK, // yielded for a debug breakpoint
} lua_Status;
ARES_S_OK = 0,
ARES_S_YIELD = 1,
ARES_S_ERRRUN = 2,
ARES_S_ERRSYNTAX = 3,
ARES_S_ERRMEM = 4,
ARES_S_ERRERR = 5,
ARES_S_BREAK = 6, // yielded for a debug breakpoint
ARES_S_ERRKILL = 7, // uncatchable script termination error
} AresStatus;

typedef enum <uint8_t> eris_CIKind {
ERIS_CI_KIND_NONE = 0,
Expand All @@ -104,15 +88,6 @@ typedef enum <uint8_t> eris_CIKind {
#define LUA_CALLINFO_HANDLE (1 << 1) // should the error thrown during execution get handled by continuation from this callinfo? func must be C
#define LUA_CALLINFO_NATIVE (1 << 2) // should this function be executed using execution callback for native code

/* thread status */
#define LUA_OK 0
#define LUA_YIELD 1
#define LUA_ERRRUN 2
#define LUA_ERRSYNTAX 3
#define LUA_ERRMEM 4
#define LUA_ERRGCMM 5
#define LUA_ERRERR 6

struct Header;
struct Object;
struct String;
Expand Down Expand Up @@ -529,6 +504,9 @@ typedef struct {
char sig[4] <bgcolor=0x33aaff>; /* Header signature for rudimentary validation */
Assert(sig == "ARES");
uint32_t version;
/* Version 4 moved the type tags off of lua_Type and onto AresType, so
* older blobs cannot be parsed with this template. */
Assert(version >= 4);
uint8_t sizeof_number; /* sizeof(lua_Number) to check type compatibility */
lua_Number test; /* -1.234567890 to check representation compatibility */
uint8_t sizeof_int; /* sizeof(int) in persisted data */
Expand All @@ -542,11 +520,17 @@ typedef struct {
// Define this up here so structs can reference the version
Header header; /* The header used for basic validation. */

// GC object header with memcat.
// Declarations leak into the calling struct.
void ParseGCHeader() {
uint8_t memcat <bgcolor=cLtYellow>;
}

string ReadObject(Object &o) {
// ref should be non-zero if present
if (o.ourRef) {
// ET_REFERENCE refNums are references _to_ something
if (o.type == ET_REFERENCE) {
// ARES_T_REFERENCE refNums are references _to_ something
if (o.type == ARES_T_REFERENCE) {
return Str("%s -> #%d @%d", EnumToString(o.type), o.ourRef, refPositions[o.ourRef]);
}
return Str("%s #%d", EnumToString(o.type), o.ourRef);
Expand All @@ -558,58 +542,66 @@ typedef struct {
// What the logical reference number of this object will be, note that this is
// implicit and based on parse order of `Object`s!
local int ourRef = 0;
ErisType type <bgcolor=cLtBlue>;
AresType type <bgcolor=cLtBlue>;
switch(type) {
// some kinds of things don't need reference to them stored, though
// storing references would be a waste because they're so small.
case ET_NIL:
case ET_BOOLEAN:
case ET_LIGHTUSERDATA:
case ET_NUMBER:
case ET_VECTOR:
case ARES_T_NIL:
case ARES_T_BOOLEAN:
case ARES_T_LIGHTUSERDATA:
case ARES_T_NUMBER:
case ARES_T_INTEGER:
case ARES_T_VECTOR:
// storing a reference to a reference? no.
case ET_REFERENCE:
case ARES_T_REFERENCE:
// permanent never writes to the ref table, what would be the point?
case ET_PERMANENT:
case ARES_T_PERMANENT:
break;
default: {
ourRef = ++refNum;
// track where we saw this so we can show the address of what's
// being referenced in ET_REFERENCEs
// being referenced in ARES_T_REFERENCEs
refPositions[refNum] = startof(this);
}
}

switch(type) {
case ET_NIL:
case ARES_T_NIL:
break;
case ET_BOOLEAN:
case ARES_T_BOOLEAN:
int32_t val; break;
case ET_LIGHTUSERDATA:
case ARES_T_LIGHTUSERDATA:
LightUserdata val; break;
case ET_NUMBER:
case ARES_T_NUMBER:
Number val; break;
case ET_VECTOR:
case ARES_T_INTEGER:
int64_t val; break;
case ARES_T_VECTOR:
float val[3]; break;
case ET_STRING:
/* Reserved but never emitted; p_vector refuses to write f64 vectors
* until they go through the GC object path. */
case ARES_T_VECTORD:
ParseGCHeader();
double val[3]; break;
case ARES_T_STRING:
String val; break;
case ET_TABLE:
case ARES_T_TABLE:
Table val; break;
case ET_FUNCTION:
case ARES_T_FUNCTION:
Closure val; break;
case ET_USERDATA:
case ARES_T_USERDATA:
Userdata val; break;
case ET_THREAD:
case ARES_T_THREAD:
Thread val; break;
case ET_BUFFER:
case ARES_T_BUFFER:
Buffer val; break;
case ET_PROTO:
case ARES_T_PROTO:
Proto val; break;
case ET_UPVAL:
case ARES_T_UPVAL:
UpVal val; break;
case ET_PERMANENT:
case ARES_T_PERMANENT:
PermKey val; break;
case ET_REFERENCE:
case ARES_T_REFERENCE:
/* If the object is not primitive (see list above) we remember it and
* increment the reference counter, and point any future occurrences of
* it to this one via a reference (see above, Reference r). */
Expand All @@ -624,14 +616,6 @@ typedef struct {
}
} Object<optimize=false, bgcolor=cLtPurple, read=ReadObject>;

// GC object header with memcat (version >= 2).
// Declarations leak into the calling struct.
void ParseGCHeader() {
if (header.version >= 2) {
uint8_t memcat <bgcolor=cLtYellow>;
}
}

typedef struct {
ParseGCHeader();
size_t length; /* The length of the string */
Expand Down Expand Up @@ -803,12 +787,10 @@ struct Thread {
size_t top; /* top = L->top - L->stack; */
Object stack[top]; /* All stack values, bottom up */

lua_Status status; /* current thread status (ok, yield) */
// version >= 2 writes activememcat
if (header.version >= 2) {
uint8_t activememcat <bgcolor=cLtYellow>;
}
AresStatus status; /* current thread status (ok, yield) */
uint8_t activememcat <bgcolor=cLtYellow>;
size_t errfunc; /* NOT USED current error handling function (stack index) */
Object namecall; /* The pending namecall string, nil for none */

int32_t num_cis; /* number of callinfo frames */
/* The CallInfo stack, starting with base_ci */
Expand All @@ -835,7 +817,7 @@ struct Thread {
}
} ci[num_cis] <bgcolor=cLtAqua, optimize=false>;

if (status == LUA_YIELD) {
if (status == ARES_S_YIELD) {
// size_t extra; /* value of thread->ci->extra, which is the original
// * value of thread->ci->func */
}
Expand All @@ -852,7 +834,7 @@ struct Thread {
};

struct PermKey {
ErisType type; /* The actual LUA_TXXX of the original value. */
AresType type; /* The actual tag of the original value. */
Object key; /* The value to use as a key when unpersisting. */
/* Note that we store the type of the original value (replaced by the
* permanent table value used as a key when unpersisting) to ensure the
Expand Down
13 changes: 13 additions & 0 deletions Analysis/include/Luau/AstUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,22 @@
#include "Luau/NotNull.h"
#include "Luau/TypeFwd.h"

#include <optional>
#include <string>
#include <vector>

namespace Luau
{

struct TypeGuard
{
bool isTypeof;
AstExpr* target;
std::string type;
};

std::optional<TypeGuard> matchTypeGuard(AstExprBinary::Op op, AstExpr* left, AstExpr* right);

// Search through the expression 'expr' for typeArguments that are known to represent
// uniquely held references. Append these typeArguments to 'uniqueTypes'.
void findUniqueTypes(NotNull<DenseHashSet<TypeId>> uniqueTypes, AstExpr* expr, NotNull<const DenseHashMap<const AstExpr*, TypeId>> astTypes);
Expand Down
13 changes: 12 additions & 1 deletion Analysis/include/Luau/BuiltinDefinitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@ struct TypeChecker;
struct TypeArena;
struct Subtyping;

struct MagicRequire final : MagicFunction
{
std::optional<WithPredicate<TypePackId>> handleOldSolver(
struct TypeChecker&,
const std::shared_ptr<struct Scope>&,
const class AstExprCall&,
WithPredicate<TypePackId>
) override;
bool infer(const MagicFunctionCallContext& context) override;
};

void registerBuiltinGlobals(Frontend& frontend, GlobalTypes& globals, bool typeCheckForAutocomplete = false);
TypeId makeUnion(TypeArena& arena, std::vector<TypeId>&& types);
TypeId makeIntersection(TypeArena& arena, std::vector<TypeId>&& types);
Expand Down Expand Up @@ -65,7 +76,7 @@ TypeId makeFunction( // Polymorphic
bool checked = false
);

void attachMagicFunction(TypeId ty, std::shared_ptr<MagicFunction> fn);
void attachMagicFunction(TypeId ty, std::shared_ptr<MagicFunction> magic);
Property makeProperty(TypeId ty, std::optional<std::string> documentationSymbol = std::nullopt);
void assignPropDocumentationSymbols(TableType::Props& props, const std::string& baseName);

Expand Down
2 changes: 2 additions & 0 deletions Analysis/include/Luau/BuiltinTypeFunctions.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ struct BuiltinTypeFunctions
TypeFunction setmetatableFunc;
TypeFunction getmetatableFunc;

TypeFunction objectofFunc;

TypeFunction weakoptionalFunc;

void addToScope(NotNull<TypeArena> arena, NotNull<Scope> scope) const;
Expand Down
2 changes: 1 addition & 1 deletion Analysis/include/Luau/Clone.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ TypePackId shallowClone(TypePackId tp, TypeArena& dest, CloneState& cloneState,
TypeId shallowClone(TypeId typeId, TypeArena& dest, CloneState& cloneState, bool clonePersistentTypes);

TypePackId clone(TypePackId tp, TypeArena& dest, CloneState& cloneState);
TypeId clone(TypeId tp, TypeArena& dest, CloneState& cloneState);
TypeId clone(TypeId typeId, TypeArena& dest, CloneState& cloneState);
TypeFun clone(const TypeFun& typeFun, TypeArena& dest, CloneState& cloneState);
Binding clone(const Binding& binding, TypeArena& dest, CloneState& cloneState);

Expand Down
Loading
Loading