From 61c95595176e0d6cc9c8ceef19bf20710efaad56 Mon Sep 17 00:00:00 2001 From: SnorlaxAssist <57375992+SnorlaxAssist@users.noreply.github.com> Date: Mon, 27 May 2024 21:41:53 -0400 Subject: [PATCH 1/3] Update luau --- tests/luau | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/luau b/tests/luau index fe0a819..c8fe77c 160000 --- a/tests/luau +++ b/tests/luau @@ -1 +1 @@ -Subproject commit fe0a8194722e3c508c30b8f266a215a99d52dafe +Subproject commit c8fe77c268cb7887d4bddcbc6e04183a289ec9af From 1b0eb7b06b5524ee6866ae3ca51e4442557f8d20 Mon Sep 17 00:00:00 2001 From: Will Date: Sun, 30 Jun 2024 22:27:06 +0100 Subject: [PATCH 2/3] Updated to Luau 0.631 & Bytecode V6 --- Source.lua | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Source.lua b/Source.lua index b81fa82..5a8c6da 100644 --- a/Source.lua +++ b/Source.lua @@ -119,7 +119,7 @@ local opList = { { "FORNLOOP", 4, 0, false }, { "FORGLOOP", 4, 8, true }, { "FORGPREP_INEXT", 4, 0, false }, - { "DEP_FORGLOOP_INEXT", 0, 0, false }, + { "FASTCALL3", 3, 1, true }, { "FORGPREP_NEXT", 4, 0, false }, { "DEP_FORGLOOP_NEXT", 0, 0, false }, { "GETVARARGS", 2, 0, false }, @@ -239,7 +239,7 @@ local function luau_deserialize(bytecode, luau_settings) local typesVersion = 0 if luauVersion == 0 then error("the provided bytecode is an error message",0) - elseif luauVersion < 3 or luauVersion > 5 then + elseif luauVersion < 3 or luauVersion > 6 then error("the version of the provided bytecode is unsupported",0) elseif luauVersion >= 4 then typesVersion = readByte() @@ -497,6 +497,8 @@ local function luau_deserialize(bytecode, luau_settings) bytecodeid = bytecodeid; } end + + _ = readVarInt() -- TODO: figure out wtf this is local protoCount = readVarInt() local protoList = table_create(protoCount) @@ -1052,6 +1054,9 @@ local function luau_load(module, env, luau_settings) end pc += inst.D + elseif op == 60 then --[[ FASTCALL3 ]] + --[[ Skipped ]] + pc += 1 --// adjust for aux elseif op == 61 then --[[ FORGPREP_NEXT ]] if not ttisfunction(stack[inst.A]) then error(string_format("attempt to iterate over a %s value", type(stack[inst.A]))) -- FORGPREP_NEXT encountered non-function value @@ -1272,4 +1277,4 @@ return { luau_validatesettings = luau_validatesettings, luau_deserialize = luau_deserialize, luau_load = luau_load, -} +} \ No newline at end of file From 295d1015112c8d6e94ca2d057aa21d3eabdf81bd Mon Sep 17 00:00:00 2001 From: Will Date: Mon, 1 Jul 2024 14:39:59 +0100 Subject: [PATCH 3/3] userdataRemapping read --- Source.lua | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Source.lua b/Source.lua index 5a8c6da..8e6d48a 100644 --- a/Source.lua +++ b/Source.lua @@ -498,7 +498,16 @@ local function luau_deserialize(bytecode, luau_settings) } end - _ = readVarInt() -- TODO: figure out wtf this is + -- userdataRemapping (not used in VM, left unused) + if typesVersion == 3 then + local index = readByte() + + while index ~= 0 do + readString() + + index = readByte() + end + end local protoCount = readVarInt() local protoList = table_create(protoCount)