From ce951e04269a849ed17bab3c01d6dc424ade2917 Mon Sep 17 00:00:00 2001 From: UtoECat Date: Sat, 16 Dec 2023 03:47:34 +0300 Subject: [PATCH] The hasTypedParameters function has been moved to BytecodeAnalysis.h --- CodeGen/include/Luau/BytecodeAnalysis.h | 8 +++++++- CodeGen/src/BytecodeAnalysis.cpp | 2 -- CodeGen/src/IrBuilder.cpp | 1 - CodeGen/src/IrProtoUtils.h | 17 ----------------- 4 files changed, 7 insertions(+), 21 deletions(-) delete mode 100644 CodeGen/src/IrProtoUtils.h diff --git a/CodeGen/include/Luau/BytecodeAnalysis.h b/CodeGen/include/Luau/BytecodeAnalysis.h index c75dc935..1047ff70 100644 --- a/CodeGen/include/Luau/BytecodeAnalysis.h +++ b/CodeGen/include/Luau/BytecodeAnalysis.h @@ -4,9 +4,10 @@ #include "Luau/Common.h" #include - #include +#include "lobject.h" + namespace Luau { namespace CodeGen @@ -17,5 +18,10 @@ struct IrFunction; void buildBytecodeBlocks(IrFunction& function, const std::vector& jumpTargets); void analyzeBytecodeTypes(IrFunction& function); +static bool hasTypedParameters(Proto* proto) +{ + return proto->typeinfo && proto->numparams != 0; +} + } // namespace CodeGen } // namespace Luau diff --git a/CodeGen/src/BytecodeAnalysis.cpp b/CodeGen/src/BytecodeAnalysis.cpp index 9ef7ecbc..88e3a2b3 100644 --- a/CodeGen/src/BytecodeAnalysis.cpp +++ b/CodeGen/src/BytecodeAnalysis.cpp @@ -5,8 +5,6 @@ #include "Luau/IrData.h" #include "Luau/IrUtils.h" -#include "IrProtoUtils.h" - namespace Luau { namespace CodeGen diff --git a/CodeGen/src/IrBuilder.cpp b/CodeGen/src/IrBuilder.cpp index f00b70c6..8f50adba 100644 --- a/CodeGen/src/IrBuilder.cpp +++ b/CodeGen/src/IrBuilder.cpp @@ -8,7 +8,6 @@ #include "Luau/IrUtils.h" #include "IrTranslation.h" -#include "IrProtoUtils.h" #include "lapi.h" diff --git a/CodeGen/src/IrProtoUtils.h b/CodeGen/src/IrProtoUtils.h deleted file mode 100644 index 8c988729..00000000 --- a/CodeGen/src/IrProtoUtils.h +++ /dev/null @@ -1,17 +0,0 @@ -// This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details -#pragma once - -#include "lobject.h" - -namespace Luau -{ -namespace CodeGen -{ - -static bool hasTypedParameters(Proto* proto) -{ - return proto->typeinfo && proto->numparams != 0; -} - -} // namespace CodeGen -} // namespace Luau