fix Luau::Codegen::hasTypedParameters static function duplication

This commit is contained in:
UtoECat 2023-12-15 06:33:13 +03:00
parent 2173938eb0
commit 87a9840c69
3 changed files with 20 additions and 11 deletions

View file

@ -5,18 +5,13 @@
#include "Luau/IrData.h"
#include "Luau/IrUtils.h"
#include "lobject.h"
#include "IrProtoUtils.h"
namespace Luau
{
namespace CodeGen
{
static bool hasTypedParameters(Proto* proto)
{
return proto->typeinfo && proto->numparams != 0;
}
static uint8_t getBytecodeConstantTag(Proto* proto, unsigned ki)
{
TValue protok = proto->k[ki];

View file

@ -8,6 +8,7 @@
#include "Luau/IrUtils.h"
#include "IrTranslation.h"
#include "IrProtoUtils.h"
#include "lapi.h"
@ -27,11 +28,6 @@ IrBuilder::IrBuilder()
{
}
static bool hasTypedParameters(Proto* proto)
{
return proto->typeinfo && proto->numparams != 0;
}
static void buildArgumentTypeChecks(IrBuilder& build, Proto* proto)
{
LUAU_ASSERT(hasTypedParameters(proto));

View file

@ -0,0 +1,18 @@
// 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"
#include <stdint.h>
namespace Luau
{
namespace CodeGen
{
static bool hasTypedParameters(Proto* proto)
{
return proto->typeinfo && proto->numparams != 0;
}
} // namespace CodeGen
} // namespace Luau