Home
About
Blog
Products
Forum
Support
Contact
Sunbelt Computer Software
PL/B Language Development and Support
Home
About
Blog
Products
Forum
Support
Contact
lua/lcode.h at master · 0Nera/lua · GitHub
Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
View all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
0Nera
/
lua
Public
forked from
lua/lua
Notifications
You must be signed in to change notification settings
Fork
0
Star
1
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Files
Expand file tree
master
Breadcrumbs
lua
/
lcode.h
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
105 lines (85 loc) · 3.81 KB
master
Breadcrumbs
lua
/
lcode.h
Copy path
Top
File metadata and controls
Code
Blame
105 lines (85 loc) · 3.81 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
/*
** $Id: lcode.h $
** Code generator for Lua
** See Copyright Notice in lua.h
*/
#ifndef
lcode_h
#define
lcode_h
#include
"llex.h"
#include
"lobject.h"
#include
"lopcodes.h"
#include
"lparser.h"
/*
** Marks the end of a patch list. It is an invalid value both as an absolute
** address, and as a list link (would link an element to itself).
*/
#define
NO_JUMP
(-1)
/*
** grep "ORDER OPR" if you change these enums (ORDER OP)
*/
typedef
enum
BinOpr
{
/* arithmetic operators */
OPR_ADD
,
OPR_SUB
,
OPR_MUL
,
OPR_MOD
,
OPR_POW
,
OPR_DIV
,
OPR_IDIV
,
/* bitwise operators */
OPR_BAND
,
OPR_BOR
,
OPR_BXOR
,
OPR_SHL
,
OPR_SHR
,
/* string operator */
OPR_CONCAT
,
/* comparison operators */
OPR_EQ
,
OPR_LT
,
OPR_LE
,
OPR_NE
,
OPR_GT
,
OPR_GE
,
/* logical operators */
OPR_AND
,
OPR_OR
,
OPR_NOBINOPR
}
BinOpr
;
/* true if operation is foldable (that is, it is arithmetic or bitwise) */
#define
foldbinop
(
op
) ((op) <= OPR_SHR)
#define
luaK_codeABC
(
fs
,
o
,
a
,
b
,
c
) luaK_codeABCk(fs,o,a,b,c,0)
typedef
enum
UnOpr
{
OPR_MINUS
,
OPR_BNOT
,
OPR_NOT
,
OPR_LEN
,
OPR_NOUNOPR
}
UnOpr
;
/* get (pointer to) instruction of given 'expdesc' */
#define
getinstruction
(
fs
,
e
) ((fs)->f->code[(e)->u.info])
#define
luaK_setmultret
(
fs
,
e
) luaK_setreturns(fs, e, LUA_MULTRET)
#define
luaK_jumpto
(
fs
,
t
) luaK_patchlist(fs, luaK_jump(fs), t)
LUAI_FUNC
int
luaK_code
(
FuncState
*
fs
,
Instruction
i
);
LUAI_FUNC
int
luaK_codeABx
(
FuncState
*
fs
,
OpCode
o
,
int
A
,
int
Bx
);
LUAI_FUNC
int
luaK_codeABCk
(
FuncState
*
fs
,
OpCode
o
,
int
A
,
int
B
,
int
C
,
int
k
);
LUAI_FUNC
int
luaK_codevABCk
(
FuncState
*
fs
,
OpCode
o
,
int
A
,
int
B
,
int
C
,
int
k
);
LUAI_FUNC
int
luaK_exp2const
(
FuncState
*
fs
,
const
expdesc
*
e
,
TValue
*
v
);
LUAI_FUNC
void
luaK_fixline
(
FuncState
*
fs
,
int
line
);
LUAI_FUNC
void
luaK_nil
(
FuncState
*
fs
,
int
from
,
int
n
);
LUAI_FUNC
void
luaK_codecheckglobal
(
FuncState
*
fs
,
expdesc
*
var
,
int
k
,
int
line
);
LUAI_FUNC
void
luaK_reserveregs
(
FuncState
*
fs
,
int
n
);
LUAI_FUNC
void
luaK_checkstack
(
FuncState
*
fs
,
int
n
);
LUAI_FUNC
void
luaK_int
(
FuncState
*
fs
,
int
reg
,
lua_Integer
n
);
LUAI_FUNC
void
luaK_vapar2local
(
FuncState
*
fs
,
expdesc
*
var
);
LUAI_FUNC
void
luaK_dischargevars
(
FuncState
*
fs
,
expdesc
*
e
);
LUAI_FUNC
int
luaK_exp2anyreg
(
FuncState
*
fs
,
expdesc
*
e
);
LUAI_FUNC
void
luaK_exp2anyregup
(
FuncState
*
fs
,
expdesc
*
e
);
LUAI_FUNC
void
luaK_exp2nextreg
(
FuncState
*
fs
,
expdesc
*
e
);
LUAI_FUNC
void
luaK_exp2val
(
FuncState
*
fs
,
expdesc
*
e
);
LUAI_FUNC
void
luaK_self
(
FuncState
*
fs
,
expdesc
*
e
,
expdesc
*
key
);
LUAI_FUNC
void
luaK_indexed
(
FuncState
*
fs
,
expdesc
*
t
,
expdesc
*
k
);
LUAI_FUNC
void
luaK_goiftrue
(
FuncState
*
fs
,
expdesc
*
e
);
LUAI_FUNC
void
luaK_storevar
(
FuncState
*
fs
,
expdesc
*
var
,
expdesc
*
e
);
LUAI_FUNC
void
luaK_setreturns
(
FuncState
*
fs
,
expdesc
*
e
,
int
nresults
);
LUAI_FUNC
void
luaK_setoneret
(
FuncState
*
fs
,
expdesc
*
e
);
LUAI_FUNC
int
luaK_jump
(
FuncState
*
fs
);
LUAI_FUNC
void
luaK_ret
(
FuncState
*
fs
,
int
first
,
int
nret
);
LUAI_FUNC
void
luaK_patchlist
(
FuncState
*
fs
,
int
list
,
int
target
);
LUAI_FUNC
void
luaK_patchtohere
(
FuncState
*
fs
,
int
list
);
LUAI_FUNC
void
luaK_concat
(
FuncState
*
fs
,
int
*
l1
,
int
l2
);
LUAI_FUNC
int
luaK_getlabel
(
FuncState
*
fs
);
LUAI_FUNC
void
luaK_prefix
(
FuncState
*
fs
,
UnOpr
op
,
expdesc
*
v
,
int
line
);
LUAI_FUNC
void
luaK_infix
(
FuncState
*
fs
,
BinOpr
op
,
expdesc
*
v
);
LUAI_FUNC
void
luaK_posfix
(
FuncState
*
fs
,
BinOpr
op
,
expdesc
*
v1
,
expdesc
*
v2
,
int
line
);
LUAI_FUNC
void
luaK_settablesize
(
FuncState
*
fs
,
int
pc
,
int
ra
,
int
asize
,
int
hsize
);
LUAI_FUNC
void
luaK_setlist
(
FuncState
*
fs
,
int
base
,
int
nelems
,
int
tostore
);
LUAI_FUNC
void
luaK_finish
(
FuncState
*
fs
);
LUAI_FUNC
l_noret
luaK_semerror
(
LexState
*
ls
,
const
char
*
fmt
, ...);
#endif
You can’t perform that action at this time.