Roberto Ierusalimschy
|
34aa0c5bd7
|
new macros 'likely'/'unlikely' with hints for jump predictions
(used only in errors for now)
|
7 years ago |
Roberto Ierusalimschy
|
02ed0b2c30
|
in 'luaD_poscall', there is no need to compute 'firstResult' when 'nres==0'
|
7 years ago |
Roberto Ierusalimschy
|
e64e20ac81
|
minimizing the code ran by 'vmfetch' + no more 'vra'
(the code is simpler without 'vra' and conversion is a no-op)
|
7 years ago |
Roberto Ierusalimschy
|
03c6a05ec8
|
no more nil-in-table
|
7 years ago |
Roberto Ierusalimschy
|
3d0b5edfe4
|
using unsigned comparison in 'l_intfitsf' (avoids one comparison)
|
7 years ago |
Roberto Ierusalimschy
|
7b0b6b3b39
|
cannot use 'defined' inside a macro +
call to 'luaT_keydef' must be protected
|
7 years ago |
Roberto Ierusalimschy
|
4a1612ff9b
|
new experimental syntax using reserved word 'undef'
|
7 years ago |
Roberto Ierusalimschy
|
62a392ff46
|
using jump tables when available
|
7 years ago |
Roberto Ierusalimschy
|
ef8263f81f
|
better names for macros for tags and types.
rttype -> rawtt; ttyperaw -> withvariant; ttype -> ttypetag;
tnov -> ttype
|
7 years ago |
Roberto Ierusalimschy
|
9243c414d9
|
first version of empty entries in tables
(so that, in the future, tables can contain regular nil entries)
|
7 years ago |
Roberto Ierusalimschy
|
c72ac048b9
|
conditional jumps "deunified"
(if a jump table is used, the unification may harm jump prediction.)
|
7 years ago |
Roberto Ierusalimschy
|
212095a601
|
new opcodes OP_GTI/OP_GEI
|
7 years ago |
Roberto Ierusalimschy
|
06865aa01d
|
simpler implementation for 'LTintfloat'/'LEintfloat'
+ 'LTfloatint'/'LEfloatint'
|
7 years ago |
Roberto Ierusalimschy
|
465b474899
|
small reorganization of 'luaV_flttointeger'/'luaV_tointeger'
|
7 years ago |
Roberto Ierusalimschy
|
1afd5a152d
|
more generic way to handle 'gclist'
|
7 years ago |
Roberto Ierusalimschy
|
49dae52d08
|
correct way to check stack space for vararg functions
|
7 years ago |
Roberto Ierusalimschy
|
0682fe8169
|
some simplifications/optimizations in returns from Lua functions
|
7 years ago |
Roberto Ierusalimschy
|
b1379936cf
|
vararg back to '...' (but with another implementation)
new implementation should have zero overhead for non-vararg functions
|
7 years ago |
Roberto Ierusalimschy
|
318a9a5859
|
new opcode 'PREPVARARG'
(avoids test for vararg function in all function calls)
|
7 years ago |
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 |