mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
fix Luau::Codegen::hasTypedParameters static function duplication
This commit is contained in:
parent
2173938eb0
commit
87a9840c69
3 changed files with 20 additions and 11 deletions
|
@ -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];
|
||||
|
|
|
@ -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));
|
||||
|
|
18
CodeGen/src/IrProtoUtils.h
Normal file
18
CodeGen/src/IrProtoUtils.h
Normal 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
|
Loading…
Add table
Reference in a new issue