Revert bytecode version to 4 unless LuaVectorLiterals flag is enabled

This commit is contained in:
Petri Häkkinen 2023-11-10 15:56:57 +02:00
parent abc856d7e8
commit 91b50ff729
2 changed files with 3 additions and 2 deletions

View file

@ -427,7 +427,7 @@ enum LuauBytecodeTag
// Bytecode version; runtime supports [MIN, MAX], compiler emits TARGET by default but may emit a higher version when flags are enabled // Bytecode version; runtime supports [MIN, MAX], compiler emits TARGET by default but may emit a higher version when flags are enabled
LBC_VERSION_MIN = 3, LBC_VERSION_MIN = 3,
LBC_VERSION_MAX = 5, LBC_VERSION_MAX = 5,
LBC_VERSION_TARGET = 5, LBC_VERSION_TARGET = 4,
// Type encoding version // Type encoding version
LBC_TYPE_VERSION = 1, LBC_TYPE_VERSION = 1,
// Types of constant table entries // Types of constant table entries

View file

@ -8,6 +8,7 @@
#include <string.h> #include <string.h>
LUAU_FASTFLAG(LuauFloorDivision) LUAU_FASTFLAG(LuauFloorDivision)
LUAU_FASTFLAG(LuauVectorLiterals)
namespace Luau namespace Luau
{ {
@ -1113,7 +1114,7 @@ std::string BytecodeBuilder::getError(const std::string& message)
uint8_t BytecodeBuilder::getVersion() uint8_t BytecodeBuilder::getVersion()
{ {
// This function usually returns LBC_VERSION_TARGET but may sometimes return a higher number (within LBC_VERSION_MIN/MAX) under fast flags // This function usually returns LBC_VERSION_TARGET but may sometimes return a higher number (within LBC_VERSION_MIN/MAX) under fast flags
return LBC_VERSION_TARGET; return (FFlag::LuauVectorLiterals ? 5 : LBC_VERSION_TARGET);
} }
uint8_t BytecodeBuilder::getTypeEncodingVersion() uint8_t BytecodeBuilder::getTypeEncodingVersion()