2023-02-24 21:49:38 +00:00
|
|
|
// This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
namespace Luau
|
|
|
|
{
|
|
|
|
namespace CodeGen
|
|
|
|
{
|
|
|
|
|
|
|
|
struct IrBuilder;
|
|
|
|
struct IrOp;
|
|
|
|
|
|
|
|
enum class BuiltinImplType
|
|
|
|
{
|
|
|
|
None,
|
|
|
|
UsesFallback, // Uses fallback for unsupported cases
|
2023-07-14 19:08:53 +01:00
|
|
|
Full, // Is either implemented in full, or exits to VM
|
2023-02-24 21:49:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct BuiltinImplResult
|
|
|
|
{
|
|
|
|
BuiltinImplType type;
|
|
|
|
int actualResultCount;
|
|
|
|
};
|
|
|
|
|
2023-07-14 19:08:53 +01:00
|
|
|
BuiltinImplResult translateBuiltin(IrBuilder& build, int bfid, int ra, int arg, IrOp args, int nparams, int nresults, IrOp fallback, int pcpos);
|
2023-02-24 21:49:38 +00:00
|
|
|
|
|
|
|
} // namespace CodeGen
|
|
|
|
} // namespace Luau
|