Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Roblox
GitHub Repository: Roblox/luau
Path: blob/master/CodeGen/src/CodeGenUtils.h
2725 views
1
// This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details
2
#pragma once
3
4
#include "lobject.h"
5
6
namespace Luau
7
{
8
namespace CodeGen
9
{
10
11
bool forgLoopTableIter(lua_State* L, LuaTable* h, int index, TValue* ra);
12
bool forgLoopNodeIter(lua_State* L, LuaTable* h, int index, TValue* ra);
13
bool forgLoopNonTableFallback(lua_State* L, int insnA, int aux);
14
15
void forgPrepXnextFallback(lua_State* L, TValue* ra, int pc);
16
17
Closure* callProlog(lua_State* L, TValue* ra, StkId argtop, int nresults);
18
void callEpilogC(lua_State* L, int nresults, int n);
19
20
Udata* newUserdata(lua_State* L, size_t s, int tag);
21
void getImport(lua_State* L, StkId res, unsigned id, unsigned pc);
22
23
#define CALL_FALLBACK_YIELD 1
24
25
Closure* callFallback(lua_State* L, StkId ra, StkId argtop, int nresults);
26
27
const Instruction* executeGETGLOBAL(lua_State* L, const Instruction* pc, StkId base, TValue* k);
28
const Instruction* executeSETGLOBAL(lua_State* L, const Instruction* pc, StkId base, TValue* k);
29
const Instruction* executeGETTABLEKS(lua_State* L, const Instruction* pc, StkId base, TValue* k);
30
const Instruction* executeSETTABLEKS(lua_State* L, const Instruction* pc, StkId base, TValue* k);
31
const Instruction* executeNAMECALL(lua_State* L, const Instruction* pc, StkId base, TValue* k);
32
const Instruction* executeSETLIST(lua_State* L, const Instruction* pc, StkId base, TValue* k);
33
const Instruction* executeFORGPREP(lua_State* L, const Instruction* pc, StkId base, TValue* k);
34
void executeGETVARARGSMultRet(lua_State* L, const Instruction* pc, StkId base, int rai);
35
void executeGETVARARGSConst(lua_State* L, StkId base, int rai, int b);
36
const Instruction* executeDUPCLOSURE(lua_State* L, const Instruction* pc, StkId base, TValue* k);
37
const Instruction* executePREPVARARGS(lua_State* L, const Instruction* pc, StkId base, TValue* k);
38
39
} // namespace CodeGen
40
} // namespace Luau
41
42