mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
Add LuauVectorLiterals fast flag
This commit is contained in:
parent
d29890ee39
commit
abaef3f9c8
1 changed files with 6 additions and 1 deletions
|
@ -5,6 +5,8 @@
|
|||
|
||||
#include <math.h>
|
||||
|
||||
LUAU_FASTFLAGVARIABLE(LuauVectorLiterals, false)
|
||||
|
||||
namespace Luau
|
||||
{
|
||||
namespace Compile
|
||||
|
@ -470,7 +472,10 @@ Constant foldBuiltin(int bfid, const Constant* args, size_t count)
|
|||
break;
|
||||
|
||||
case LBF_VECTOR:
|
||||
if (count == 3 && args[0].type == Constant::Type_Number && args[1].type == Constant::Type_Number && args[2].type == Constant::Type_Number)
|
||||
if (FFlag::LuauVectorLiterals && count == 3 &&
|
||||
args[0].type == Constant::Type_Number &&
|
||||
args[1].type == Constant::Type_Number &&
|
||||
args[2].type == Constant::Type_Number)
|
||||
return cvector(args[0].valueNumber, args[1].valueNumber, args[2].valueNumber);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue