Commit Graph

232 Commits

Author SHA1 Message Date
Roberto Ierusalimschy
33e3774f44 keep more opcode arguments byte-aligned 2018-01-09 09:24:12 -02:00
Roberto Ierusalimschy
4676f6599e new macros 'isOT'/'isIT'
(plus exchanged parameters of OP_VARARG to make it similar to other
'isOT' instructions)
2017-12-22 12:16:46 -02:00
Roberto Ierusalimschy
d388c165ef new opcodes 'FORLOOP1'/'FORPREP1' for "basic for" (integer variable
with increment of 1)
2017-12-18 15:53:50 -02:00
Roberto Ierusalimschy
f8c1c1469a some cleaning on signed opcode parameters 2017-12-15 16:53:48 -02:00
Roberto Ierusalimschy
4b6928e7f5 (1 << 31) with signed integer has undefined behavior in C 2017-12-15 16:35:22 -02:00
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.)
2017-12-13 16:32:09 -02:00
Roberto Ierusalimschy
c7ee7fe026 new opcodes OP_SHLI/OP_SHRI 2017-12-04 15:41:30 -02:00
Roberto Ierusalimschy
bdc751ce23 details (comments) 2017-11-30 11:16:43 -02:00
Roberto Ierusalimschy
19c6b375c3 detail (spacing) 2017-11-30 10:03:00 -02:00
Roberto Ierusalimschy
745eb41993 new opcodes OP_RETURN0/OP_RETURN1 2017-11-29 14:57:36 -02:00
Roberto Ierusalimschy
ff5fe51044 using register 'k' for conditions in tests (we only need one bit there) 2017-11-28 10:58:18 -02:00
Roberto Ierusalimschy
093c16b67b new opcodes 'OP_LTI' and 'OP_LEI' 2017-11-27 15:44:31 -02:00
Roberto Ierusalimschy
3c230cc825 using 'A' for register instead of 'B' in relational opcodes
('R(A)' is already created by default for all instructions.)
2017-11-22 17:15:44 -02:00
Roberto Ierusalimschy
41f2936d8f new opcode 'OP_EQI' for equality with immediate numbers 2017-11-22 16:41:20 -02:00
Roberto Ierusalimschy
4c0e36a46e new instruction 'OP_EQK' (for equality with constants) 2017-11-16 10:59:14 -02:00
Roberto Ierusalimschy
c3e5946fb2 new format for JUMP instructions (to allow larger offsets) 2017-11-07 15:20:42 -02:00
Roberto Ierusalimschy
a1ef58b3a5 eplicit 1-bit opcode operand 'k' 2017-10-04 18:56:32 -03:00
Roberto Ierusalimschy
8fbe9e3470 new opcodes with immediate integer operand for all arithmetic operations 2017-10-04 12:49:24 -03:00
Roberto Ierusalimschy
940472c75c opcode size increased to 7 bits 2017-10-02 19:51:32 -03:00
Roberto Ierusalimschy
bc1b0733b8 avoid the use of bit 'Bk' ('B' will lose this bit soon) 2017-10-01 16:13:43 -03:00
Roberto Ierusalimschy
722bdbe17d no more 'getBMode'-'getCMode' (imprecise + we will need more space
for op mode) + better control of op modes
2017-09-28 13:53:29 -03:00
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)
2017-09-26 15:14:45 -03:00
Roberto Ierusalimschy
abb17cf19b new opcode OP_LOADF (load immediate float) 2017-09-19 15:38:14 -03:00
Roberto Ierusalimschy
e0c0e2ee14 comments (documentation about instruction formats) 2017-09-18 13:07:54 -03:00
Roberto Ierusalimschy
022e4427cf detail (keep OP_LOADK and OP_LOADKX together) 2017-09-15 11:19:06 -03:00
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)
2017-09-13 16:50:08 -03:00
Roberto Ierusalimschy
ac65bab25f jumps in 'for' loops don't need to be signed 2017-08-14 15:33:14 -03:00
Roberto Ierusalimschy
07db10813c 'OP_VARARG' has the vararg parameter as an operand 2017-06-29 12:38:41 -03:00
Roberto Ierusalimschy
ab5a650029 details (direct access to 'Ck' bit in instructions) 2017-05-08 13:08:01 -03:00
Roberto Ierusalimschy
502a1d1108 new opcodes for table access with constant keys (strings and integers) 2017-04-28 17:57:45 -03:00
Roberto Ierusalimschy
173e41b2eb new opcode OP_ADDI (for immediate integer operand) (Experimental) 2017-04-26 14:46:52 -03:00
Roberto Ierusalimschy
cb3d5dce30 opcodes 'OP_GETTABUP'/'OP_SETTABUP' operate only with string keys,
so they can use fast-track table access
2017-04-24 17:26:39 -03:00
Roberto Ierusalimschy
6a98aa0bb0 new opcode LOADI (for loading immediate integers) 2017-04-20 16:53:55 -03:00
Roberto Ierusalimschy
0d1c6f4188 MAXINDEXRK can be redefined (for debugging, to force most values to
go through registers)
2016-07-19 14:12:21 -03:00
Roberto Ierusalimschy
bdf566a8a3 `name' in comments changed to 'name' 2014-10-25 09:50:46 -02:00
Roberto Ierusalimschy
b8d412aa07 error in comment 2014-10-20 16:29:55 -02:00
Roberto Ierusalimschy
1ea2d20f74 first implementation of '<<', '>>', and '~' (bitwise not) 2013-12-30 18:47:58 -02:00
Roberto Ierusalimschy
c0edab0f6d first implementation of bitwise operators '&' (band), '|' (bor),
and '~' (bxor)
2013-12-18 12:12:03 -02:00
Roberto Ierusalimschy
a948054a19 new order for binary operations (grouping them by type of result) 2013-12-16 17:06:52 -02:00
Roberto Ierusalimschy
a2f5c28a80 new operation '//' (integer division) 2013-04-26 10:08:29 -03:00
Roberto Ierusalimschy
32a12e2f3f detail (cleaned whitespaces at end of lines) 2011-07-15 09:50:29 -03:00
Roberto Ierusalimschy
4758113043 change in opcode OP_LOADNIL: B is used as a counter instead of a
register. (Avoids an assignment to R(B), not present in any other
instruction.)
2011-04-19 13:22:13 -03:00
Roberto Ierusalimschy
427ee519db new instruction OP_LOADKX (to replace OP_LOADK with extra argument) 2011-04-07 15:14:12 -03:00
Roberto Ierusalimschy
f8d677f94c no more 'OP_CLOSE' instructions (use jumps to close upvalues) 2011-02-07 10:28:27 -02:00
Roberto Ierusalimschy
dd547c55c8 new scheme to close upvalues in 'break'; jump instructions may
do the close, avoiding the need for a OP_CLOSE instruction
2011-02-01 16:03:10 -02:00
Roberto Ierusalimschy
d72ec210c7 POS_A replaced by POS_Ax (which is more "precise") 2010-10-25 10:24:55 -02:00
Roberto Ierusalimschy
f3026c36c2 details in opcode list 2010-10-13 13:45:54 -03:00
Roberto Ierusalimschy
25c557ec63 first version of _ENV; no more global variables 2010-03-12 16:14:06 -03:00
Roberto Ierusalimschy
0fe2576a39 new instructions to optimize indexing on upvalues 2010-02-26 17:40:29 -03:00
Roberto Ierusalimschy
062e809e54 new macros 'LUAI_DDEC'/'LUAI_DDEF' to better control declarations and
definitions of non-static variables
2009-11-19 17:06:52 -02:00
Roberto Ierusalimschy
77077b39d5 comment explaining OP_VARARG was wrong (and corresponding code was not
very clear)
2009-10-28 10:20:07 -02:00
Roberto Ierusalimschy
5938212748 information about upvalues (where they come from) kept in Proto structure,
instead of sequence of pseudo-opcodes after OP_CLOSURE
2009-09-28 13:32:50 -03:00
Roberto Ierusalimschy
fcc46467fa limit of constants per function changed to 2^26 using extra arguments
to opcodes LOADK, GETGLOBAL, and SETGLOBAL
2009-09-23 17:33:05 -03:00
Roberto Ierusalimschy
f9d015523e better notes about some opcodes (comments only) 2009-03-09 12:27:56 -03:00
Roberto Ierusalimschy
84b3daebbd generic for coded as two dedicated instructions to simplify resumption 2008-10-30 13:39:30 -02:00
Roberto Ierusalimschy
a4d3080fe3 SETLIST extra argument now is an "instruction" (OP_EXTRAARG) 2008-04-02 14:38:54 -03:00
Roberto Ierusalimschy
a7c9e45c64 avoid trailing white spaces 2006-09-11 11:07:24 -03:00
Roberto Ierusalimschy
ae76307847 comment 2006-03-14 16:04:44 -03:00
Roberto Ierusalimschy
f26b85c5b7 small detail 2005-12-02 16:42:08 -02:00
Roberto Ierusalimschy
502d8f9a06 comments 2005-10-23 15:37:55 -02:00
Roberto Ierusalimschy
3b19af44b0 new method to handle tests without values (negative values) 2005-08-29 17:49:21 -03:00
Roberto Ierusalimschy
d987cf1f81 new mark LUAI_DATA for extern data 2005-06-06 10:30:25 -03:00
Roberto Ierusalimschy
f21e9c172f details 2005-05-20 12:53:42 -03:00
Roberto Ierusalimschy
65f4a0f636 no more compatibility code for traversing tables 2005-05-04 17:42:28 -03:00
Roberto Ierusalimschy
04bbd01171 new operation *t (for size of t) (may yet be removed...) 2005-03-16 13:59:21 -03:00
Roberto Ierusalimschy
370d31a559 luac´ -> luai' (to avoid confusion with other luac stuff) 2005-03-09 13:28:07 -03:00
Roberto Ierusalimschy
f8df21bd20 `luaconf.h´ exports all its definitions always (so all of them
must have a lua/LUA prefix).
2005-03-08 17:10:05 -03:00
Roberto Ierusalimschy
7d57ea70bc new mod' (%') operator 2005-03-08 15:00:16 -03:00
Roberto Ierusalimschy
e1c2fb6eed details 2004-12-02 10:59:10 -02:00
Roberto Ierusalimschy
652f885c30 detail 2004-10-04 16:07:42 -03:00
Roberto Ierusalimschy
5ee87acd6b small optimization for boolean constants + new format for SETLIST opcode 2004-10-04 16:01:53 -03:00
Roberto Ierusalimschy
6bddbbde7a details (opcode may not be the first field) 2004-08-04 17:18:13 -03:00
Roberto Ierusalimschy
02a2c01ccd new way to code RK values 2004-06-29 15:49:02 -03:00
Roberto Ierusalimschy
616438fe9a new way to use vararg' parameters (with ...') 2004-05-31 15:51:50 -03:00
Roberto Ierusalimschy
c61bb89dba details 2004-05-17 09:34:00 -03:00
Roberto Ierusalimschy
b4cd38ba6c new scheme for configuration through `luaconf.h' 2004-04-30 17:13:38 -03:00
Roberto Ierusalimschy
b10bfd4934 comments 2003-05-15 16:46:03 -03:00
Roberto Ierusalimschy
9ec9a012e7 details 2003-05-14 18:09:53 -03:00
Roberto Ierusalimschy
c116dcb92b better information about instruction behavior (use of arguments) 2003-05-14 09:09:12 -03:00
Roberto Ierusalimschy
6d268b0b00 new semantics for "for" local variables 2003-05-13 17:15:59 -03:00
Roberto Ierusalimschy
fbc23d0245 details 2002-08-21 15:56:33 -03:00
Roberto Ierusalimschy
6c283b2f4f new simetric format for ABC instructions, to avoid exchanging operands
for `commutative' operators
2002-08-20 17:03:05 -03:00
Roberto Ierusalimschy
9fb80bde3c tailcall is executed together with call 2002-08-05 11:46:43 -03:00
Roberto Ierusalimschy
eeab473fc8 new fallback __le (less equal), for partial order 2002-06-12 11:56:22 -03:00
Roberto Ierusalimschy
000d081fd0 warnings from other compilers 2002-06-06 15:17:33 -03:00
Roberto Ierusalimschy
af19d55635 generic for also coded to make test at the end of the loop 2002-05-13 10:09:00 -03:00
Roberto Ierusalimschy
0dbf0c5953 new format for test intructions (handle NaN correctly) 2002-05-06 12:51:41 -03:00
Roberto Ierusalimschy
9b38a696d5 avoid names that differ only in capitalization 2002-04-24 17:07:46 -03:00
Roberto Ierusalimschy
7b65328c8e new semantics for `generic for' (with state) 2002-04-09 16:47:44 -03:00
Roberto Ierusalimschy
801aaf37b1 simpler implementation for line information 2002-03-25 14:47:14 -03:00
Roberto Ierusalimschy
e9ef7ed2d3 first implementation for tail call 2002-03-21 17:32:22 -03:00
Roberto Ierusalimschy
58badbab99 special treatment for 'global in nil' 2002-03-18 11:49:46 -03:00
Roberto Ierusalimschy
bd8b9c94b3 generic for (with any number of control variables) 2002-03-08 16:10:32 -03:00
Roberto Ierusalimschy
1c423d2661 LFIELDS_PER_FLUSH is an opcode detail 2002-02-14 19:43:01 -02:00
Roberto Ierusalimschy
38b0e6128d simpler implementation for `for' loops 2002-02-05 20:39:12 -02:00
Roberto Ierusalimschy
74907fb71e OP_LOADINT can be done by OP_LOADK 2002-01-25 19:50:39 -02:00
Roberto Ierusalimschy
7ab7703b53 cleaner semantics for test instructions (skips) 2002-01-16 20:03:57 -02:00
Roberto Ierusalimschy
f083812c02 first implementation of coroutines 2002-01-09 20:02:47 -02:00
Roberto Ierusalimschy
9aff171f3b new type `boolean' 2001-12-11 20:48:44 -02:00
Roberto Ierusalimschy
72659a0605 no more explicit support for wide-chars; too much troble... 2001-11-28 18:13:13 -02:00