Roberto Ierusalimschy
|
51280ef2ad
|
call hooks for Lua functions called by 'luaV_execute'
|
7 years ago |
Roberto Ierusalimschy
|
dc0ab1e8ca
|
warnings in VS (implicit casts from ptrdiff_t to int)
|
7 years ago |
Roberto Ierusalimschy
|
5bd8d388de
|
OP_CONCAT does not move its result (to simplify its execution)
|
7 years ago |
Roberto Ierusalimschy
|
d2fb34ac88
|
'OP_TAILCALL' calling C functions finishes the call and returns
(instead of waiting for following 'OP_RETURN')
|
7 years ago |
Roberto Ierusalimschy
|
ab0a851db4
|
'luaD_tryfuncTM' can ensure it does not change the stack
|
7 years ago |
Roberto Ierusalimschy
|
ad960095bf
|
avoid jumping into a variable scope (C++ does not allow that)
|
7 years ago |
Roberto Ierusalimschy
|
a9295a2b8e
|
typos in comments
|
7 years ago |
Roberto Ierusalimschy
|
cf7eff45f3
|
keep control of stack top in Lua functions concentrated in 'luaV_execute'
|
7 years ago |
Roberto Ierusalimschy
|
4676f6599e
|
new macros 'isOT'/'isIT'
(plus exchanged parameters of OP_VARARG to make it similar to other
'isOT' instructions)
|
7 years ago |
Roberto Ierusalimschy
|
1d5b885437
|
when running Lua code, there is no need to keep 'L->top' "correct";
set it only when needed.
|
7 years ago |
Roberto Ierusalimschy
|
3153a41e33
|
no need to save 'pc' in case of allocation errors
(allocation errors do not call message handlers)
|
7 years ago |
Roberto Ierusalimschy
|
d388c165ef
|
new opcodes 'FORLOOP1'/'FORPREP1' for "basic for" (integer variable
with increment of 1)
|
7 years ago |
Roberto Ierusalimschy
|
86431a2f1c
|
new opcodes BANDK/BORK/BXORK. (They do not use immediate operands
because, too often, masks in bitwise operations are integers larger
than one byte.)
|
7 years ago |
Roberto Ierusalimschy
|
c7ee7fe026
|
new opcodes OP_SHLI/OP_SHRI
|
7 years ago |
Roberto Ierusalimschy
|
10b8c99bbb
|
small peephole optimizations
|
7 years ago |
Roberto Ierusalimschy
|
745eb41993
|
new opcodes OP_RETURN0/OP_RETURN1
|
7 years ago |
Roberto Ierusalimschy
|
c766e4103d
|
'luaV_execute' gets call info as extra argument (it is always
available on call sites)
|
7 years ago |
Roberto Ierusalimschy
|
1a5e8c1014
|
conditional jumps unified in label "condjump' + new variable 'vra'
to avoid excessive use of macro 's2v'
|
7 years ago |
Roberto Ierusalimschy
|
ff5fe51044
|
using register 'k' for conditions in tests (we only need one bit there)
|
7 years ago |
Roberto Ierusalimschy
|
093c16b67b
|
new opcodes 'OP_LTI' and 'OP_LEI'
|
7 years ago |
Roberto Ierusalimschy
|
73abfde2ef
|
small simplifications around 'luaT_callorderTM'
|
7 years ago |
Roberto Ierusalimschy
|
196c87c9ce
|
no more 'stackless' implementation; 'luaV_execute' calls itself
recursively to execute function calls. 'unroll' continues all
executions suspended by an yield (through a long jump)
|
7 years ago |
Roberto Ierusalimschy
|
3c230cc825
|
using 'A' for register instead of 'B' in relational opcodes
('R(A)' is already created by default for all instructions.)
|
7 years ago |
Roberto Ierusalimschy
|
41f2936d8f
|
new opcode 'OP_EQI' for equality with immediate numbers
|
7 years ago |
Roberto Ierusalimschy
|
14c3aa12b5
|
more direct implementation for tail calls.
|
7 years ago |
Roberto Ierusalimschy
|
f3ca52bfa9
|
in order comparison opcodes, fast track for floats too
|
7 years ago |
Roberto Ierusalimschy
|
4c0e36a46e
|
new instruction 'OP_EQK' (for equality with constants)
|
7 years ago |
Roberto Ierusalimschy
|
5440b42f43
|
using 'trap' to stop 'luaV_execute' when necessary (tracing and
to update its copy of 'base' when the stack is reallocated)
|
7 years ago |
Roberto Ierusalimschy
|
32fef60743
|
detail ('Protect' defined as an expression)
|
7 years ago |
Roberto Ierusalimschy
|
26679ea35b
|
new function 'luaV_flttointeger' to convert floats to integers (without
string coercions) + string operands to bitwise operations handled
by string metamethods
|
7 years ago |
Roberto Ierusalimschy
|
c3e5946fb2
|
new format for JUMP instructions (to allow larger offsets)
|
7 years ago |
Roberto Ierusalimschy
|
ad0704e40c
|
back to 'CallInfo' (no gains with its removal)
|
7 years ago |
Roberto Ierusalimschy
|
93fd67b793
|
no more 'CallInfo' structure
|
7 years ago |
Roberto Ierusalimschy
|
7612f7735d
|
removing uses of 'CallInfo'
|
7 years ago |
Roberto Ierusalimschy
|
472c560705
|
no more useful fields in CallInfo
|
7 years ago |
Roberto Ierusalimschy
|
54eb35a8aa
|
more fields moved out of 'CallInfo'
|
7 years ago |
Roberto Ierusalimschy
|
b9e76be8a6
|
using 'L->func' when possible
|
7 years ago |
Roberto Ierusalimschy
|
c5482468fd
|
baby steps to remove 'CallInfo': keeping 'L->func' correct
|
7 years ago |
Roberto Ierusalimschy
|
a1ef58b3a5
|
eplicit 1-bit opcode operand 'k'
|
7 years ago |
Roberto Ierusalimschy
|
8fbe9e3470
|
new opcodes with immediate integer operand for all arithmetic operations
|
7 years ago |
Roberto Ierusalimschy
|
bc1b0733b8
|
avoid the use of bit 'Bk' ('B' will lose this bit soon)
|
7 years ago |
Roberto Ierusalimschy
|
722bdbe17d
|
no more 'getBMode'-'getCMode' (imprecise + we will need more space
for op mode) + better control of op modes
|
7 years ago |
Roberto Ierusalimschy
|
1b10033583
|
new function 'luaT_trybiniTM'
to handle tag methods for instructions with immediate integer arguments
|
7 years ago |
Roberto Ierusalimschy
|
00e728af88
|
binary operators use R instead of RK
faster + nobody uses RK(B), so B can be smaller (freeing one bit
for more opcodes, soon)
|
7 years ago |
Roberto Ierusalimschy
|
abb17cf19b
|
new opcode OP_LOADF (load immediate float)
|
7 years ago |
Roberto Ierusalimschy
|
80d9b09f35
|
jumps do not close upvalues (to be faster and simpler);
explicit instruction to close upvalues; command 'break' not
handled like a 'goto' (to optimize removal of uneeded 'close'
instructions)
|
7 years ago |
Roberto Ierusalimschy
|
ac65bab25f
|
jumps in 'for' loops don't need to be signed
|
7 years ago |
Roberto Ierusalimschy
|
4dff277255
|
coercion string->number in arithmetic operations moved to string
library
|
7 years ago |
Roberto Ierusalimschy
|
07db10813c
|
'OP_VARARG' has the vararg parameter as an operand
|
7 years ago |
Roberto Ierusalimschy
|
f96497397a
|
new type 'StackValue' for stack elements
(we may want to put extra info there in the future)
|
7 years ago |