2022-10-14 20:48:41 +01:00
|
|
|
// This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
2022-10-21 18:54:01 +01:00
|
|
|
#include "ltm.h"
|
|
|
|
|
2022-10-14 20:48:41 +01:00
|
|
|
typedef uint32_t Instruction;
|
|
|
|
typedef struct lua_TValue TValue;
|
|
|
|
|
|
|
|
namespace Luau
|
|
|
|
{
|
|
|
|
namespace CodeGen
|
|
|
|
{
|
|
|
|
|
|
|
|
struct Label;
|
2022-10-28 11:37:29 +01:00
|
|
|
struct ModuleHelpers;
|
2022-10-14 20:48:41 +01:00
|
|
|
|
2023-03-03 20:21:14 +00:00
|
|
|
namespace X64
|
|
|
|
{
|
|
|
|
|
|
|
|
class AssemblyBuilderX64;
|
|
|
|
|
2023-01-13 22:10:01 +00:00
|
|
|
void emitInstNameCall(AssemblyBuilderX64& build, const Instruction* pc, int pcpos, const TValue* k, Label& next, Label& fallback);
|
2022-12-09 19:57:01 +00:00
|
|
|
void emitInstCall(AssemblyBuilderX64& build, ModuleHelpers& helpers, const Instruction* pc, int pcpos);
|
|
|
|
void emitInstReturn(AssemblyBuilderX64& build, ModuleHelpers& helpers, const Instruction* pc, int pcpos);
|
|
|
|
void emitInstSetList(AssemblyBuilderX64& build, const Instruction* pc, Label& next);
|
2023-03-03 20:21:14 +00:00
|
|
|
void emitinstForGLoop(AssemblyBuilderX64& build, int ra, int aux, Label& loopRepeat, Label& loopExit);
|
|
|
|
void emitinstForGLoopFallback(AssemblyBuilderX64& build, int pcpos, int ra, int aux, Label& loopRepeat);
|
|
|
|
void emitInstForGPrepXnextFallback(AssemblyBuilderX64& build, int pcpos, int ra, Label& target);
|
2022-10-14 20:48:41 +01:00
|
|
|
void emitInstAnd(AssemblyBuilderX64& build, const Instruction* pc);
|
|
|
|
void emitInstAndK(AssemblyBuilderX64& build, const Instruction* pc);
|
|
|
|
void emitInstOr(AssemblyBuilderX64& build, const Instruction* pc);
|
|
|
|
void emitInstOrK(AssemblyBuilderX64& build, const Instruction* pc);
|
2022-12-09 19:57:01 +00:00
|
|
|
void emitInstGetImportFallback(AssemblyBuilderX64& build, int ra, uint32_t aux);
|
2023-01-13 22:10:01 +00:00
|
|
|
void emitInstCoverage(AssemblyBuilderX64& build, int pcpos);
|
2022-10-14 20:48:41 +01:00
|
|
|
|
2023-03-03 20:21:14 +00:00
|
|
|
} // namespace X64
|
2022-10-14 20:48:41 +01:00
|
|
|
} // namespace CodeGen
|
|
|
|
} // namespace Luau
|