Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Roblox
GitHub Repository: Roblox/luau
Path: blob/master/VM/src/ldebug.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
// This code is based on Lua 5.x implementation licensed under MIT License; see lua_LICENSE.txt for details
3
#pragma once
4
5
#include "lstate.h"
6
7
#define pcRel(pc, p) ((pc) && (pc) != (p)->code ? cast_to(int, (pc) - (p)->code) - 1 : 0)
8
9
#define luaG_typeerror(L, o, opname) luaG_typeerrorL(L, o, opname)
10
#define luaG_forerror(L, o, what) luaG_forerrorL(L, o, what)
11
#define luaG_runerror(L, fmt, ...) luaG_runerrorL(L, fmt, ##__VA_ARGS__)
12
13
#define LUA_MEMERRMSG "not enough memory"
14
#define LUA_ERRERRMSG "error in error handling"
15
16
LUAI_FUNC l_noret luaG_typeerrorL(lua_State* L, const TValue* o, const char* opname);
17
LUAI_FUNC l_noret luaG_forerrorL(lua_State* L, const TValue* o, const char* what);
18
LUAI_FUNC l_noret luaG_concaterror(lua_State* L, StkId p1, StkId p2);
19
LUAI_FUNC l_noret luaG_aritherror(lua_State* L, const TValue* p1, const TValue* p2, TMS op);
20
LUAI_FUNC l_noret luaG_ordererror(lua_State* L, const TValue* p1, const TValue* p2, TMS op);
21
LUAI_FUNC l_noret luaG_indexerror(lua_State* L, const TValue* p1, const TValue* p2);
22
LUAI_FUNC l_noret luaG_methoderror(lua_State* L, const TValue* p1, const TString* p2);
23
LUAI_FUNC l_noret luaG_readonlyerror(lua_State* L);
24
25
LUAI_FUNC LUA_PRINTF_ATTR(2, 3) l_noret luaG_runerrorL(lua_State* L, const char* fmt, ...);
26
LUAI_FUNC void luaG_pusherror(lua_State* L, const char* error);
27
28
LUAI_FUNC void luaG_breakpoint(lua_State* L, Proto* p, int line, bool enable);
29
LUAI_FUNC bool luaG_onbreak(lua_State* L);
30
31
LUAI_FUNC int luaG_getline(Proto* p, int pc);
32
33
LUAI_FUNC int luaG_isnative(lua_State* L, int level);
34
LUAI_FUNC int luaG_hasnative(lua_State* L, int level);
35
36