summaryrefslogtreecommitdiff
path: root/lparser.h
Commit message (Collapse)AuthorAgeFilesLines
* DetailsRoberto Ierusalimschy2020-12-021-3/+3
| | | | Names in the parser and other details that do not change actual code.
* DetailsRoberto Ierusalimschy2020-10-301-2/+3
| | | | | | - small corrections in the manual - ldo.c: 'docall' -> 'ccall' ('docall' already used in 'lua.c') - comments
* Fixed two bugs in to-be-closed variables x constantsRoberto Ierusalimschy2020-06-011-2/+2
| | | | | | | | | | The parser were mixing compiler indices of variables with stack indices, so that when a to-be-closed variable was used inside the scope of compile-time constants (which may be optimized away), it might be closed in the wrong place. (See new tests for examples.) Besides fixing the bugs, this commit also changed comments and variable names to avoid that kind of confusion and added tests.
* DetailsRoberto Ierusalimschy2019-11-181-1/+1
|
* New kind of expression VKSTRRoberto Ierusalimschy2019-07-171-1/+4
| | | | | | | String literal expressions have their own kind VKSTR, instead of the generic VK. This allows strings to "cross" functions without entering their constant tables (e.g., if they are used only by some nested function).
* First implementation of constant propagationRoberto Ierusalimschy2019-07-121-10/+17
| | | | | Local constant variables initialized with compile-time constants are optimized away from the code.
* Towards constant propagationRoberto Ierusalimschy2019-07-101-3/+9
| | | | | | | This commit detaches the number of active variables from the number of variables in the stack, during compilation. Soon, compile-time constants will be propagated and therefore will not exist during run time (in the stack).
* New implementation for constantsRoberto Ierusalimschy2019-07-091-7/+9
| | | | | | | | | VLOCAL expressions keep a reference to their corresponding 'Vardesc', and 'Upvaldesc' (for upvalues) has a field 'ro' (read-only). So, it is easier to check whether a variable is read-only. The decoupling in VLOCAL between 'vidx' ('Vardesc' index) and 'sidx' (stack index) should also help the forthcoming implementation of compile-time constant propagation.
* First take on constant propagationRoberto Ierusalimschy2019-07-011-0/+2
|
* Structure 'Vardesc' does not need a 'name' fieldRoberto Ierusalimschy2019-06-211-1/+0
| | | | | | Removed the field 'name' from the structure 'Vardesc', as the name of the local variable is already available in the prototype of the function, through the index 'idx'.
* First implementation for 'const' variablesRoberto Ierusalimschy2019-05-171-4/+9
| | | | | A variable can be declared const, which means it cannot be assigned to, with the syntax 'local <const> name = exp'.
* DetailsRoberto Ierusalimschy2018-11-221-1/+1
| | | | comments and other janitorial work.
* Big revamp in the implmentation of labels/gotosRoberto Ierusalimschy2018-10-291-0/+2
| | | | | | | | Added restriction that, when a label is created, there cannot be another label with the same name visible. That allows backward goto's to be resolved when they are read. Backward goto's get a close if they jump out of the scope of some variable; labels get a close only if previous goto to it jumps out of the scope of some upvalue.
* Towards "to closed" local variablesRoberto Ierusalimschy2018-10-081-0/+1
| | | | | | | | | | | | Start of the implementation of "scoped variables" or "to be closed" variables, local variables whose '__close' (or themselves) are called when they go out of scope. This commit implements the syntax, the opcode, and the creation of the corresponding upvalue, but it still does not call the finalizations when the variable goes out of scope (the most important part). Currently, the syntax is 'local scoped name = exp', but that will probably change.
* Removed extra information from RCS keyword stringsRoberto Ierusalimschy2018-08-231-1/+1
| | | | | Version numbers and dates (mostly wrong) from RCS keyword strings removed from all source files; only the file name are kept.
* no more nil-in-tableRoberto Ierusalimschy2018-04-041-3/+2
|
* new experimental syntax using reserved word 'undef'Roberto Ierusalimschy2018-03-071-2/+3
|
* 'VRELOCABLE' -> 'VRELOC'Roberto Ierusalimschy2017-12-141-3/+3
|
* small peephole optimizationsRoberto Ierusalimschy2017-11-301-2/+1
|
* 'lineinfo' in prototypes saved as differences instead of absoluteRoberto Ierusalimschy2017-06-271-1/+4
| | | | | | values, so that the array can use bytes instead of ints, reducing its size. (A new array 'abslineinfo' is used when line differences do not fit in a byte.)
* new opcodes for table access with constant keys (strings and integers)Roberto Ierusalimschy2017-04-281-8/+16
|
* more comments + reordeing of union inside 'expdesc' to allowRoberto Ierusalimschy2015-12-301-13/+16
| | | | static initialization of a VKINT value
* comments. (More explanation about kinds of expressions.)Roberto Ierusalimschy2015-12-171-17/+27
|
* `name' in comments changed to 'name'Roberto Ierusalimschy2014-10-251-8/+8
|
* more precision between closure types ('LClosure' x 'CClosure')Roberto Ierusalimschy2014-06-191-3/+3
|
* bug (GC can collect long identifier during parser) + change (usingRoberto Ierusalimschy2013-08-301-2/+1
| | | | a single constant table for all functions in a chunk)
* first implementation of literal integers (no constant folding yet)Roberto Ierusalimschy2013-04-161-3/+5
|
* no more 'Proto' objects on the stack. Protos are anchored on outerRoberto Ierusalimschy2012-05-081-3/+3
| | | | Protos or on a Closure, which must be created before the Proto.
* reducing even more use of C stack by the parser: struct 'FuncState'Roberto Ierusalimschy2011-07-271-7/+6
| | | | | does not need field 'L' + number of labels/gotos in a chunk may be limited to SHRT_MAX. (Also removed some non-needed 'unsigned's.)
* no need of lookahead in ZioRoberto Ierusalimschy2011-02-231-2/+2
|
* some reorganization of dynamic data structures used by the parserRoberto Ierusalimschy2011-02-071-36/+24
|
* first implementation of 'goto'Roberto Ierusalimschy2011-02-041-6/+41
|
* new way to distinguish between indexing tables in registers andRoberto Ierusalimschy2010-07-071-10/+13
| | | | | tables in upvalues (+ fixed small bug when checking conflicts in multiple assignments)
* better organization for fields in struct 'expdesc'Roberto Ierusalimschy2010-07-021-4/+8
|
* first version of _ENV; no more global variablesRoberto Ierusalimschy2010-03-121-3/+1
|
* new instructions to optimize indexing on upvaluesRoberto Ierusalimschy2010-02-261-5/+6
|
* parser keeps list of active local variables in a single dynamic array,Roberto Ierusalimschy2009-10-111-3/+11
| | | | therefore saving C stack space
* first implementation of lexical environmentsRoberto Ierusalimschy2009-09-301-2/+3
|
* information about upvalues (where they come from) kept in Proto structure,Roberto Ierusalimschy2009-09-281-8/+2
| | | | instead of sequence of pseudo-opcodes after OP_CLOSURE
* added structure for local-variable information to allow extraRoberto Ierusalimschy2008-05-081-4/+10
| | | | checkings if needed
* 'lparser.h' should not include 'ltable.h'Roberto Ierusalimschy2006-03-091-2/+1
|
* numeral expressions keep their values in struct 'expdesc'Roberto Ierusalimschy2005-10-031-2/+6
|
* added LUAI_FUNC to functions not in the APIRoberto Ierusalimschy2005-04-251-2/+3
|
* `luac´ -> `luai' (to avoid confusion with other luac stuff)Roberto Ierusalimschy2005-03-091-3/+3
|
* `luaconf.h´ exports all its definitions always (so all of themRoberto Ierusalimschy2005-03-081-3/+3
| | | | must have a lua/LUA prefix).
* USHRT_MAX may not fit in a (16-bit) intRoberto Ierusalimschy2005-03-071-2/+2
|
* new way to use `vararg' parameters (with `...')Roberto Ierusalimschy2004-05-311-2/+3
|
* zio does not keep "source" name (nobody uses it)Roberto Ierusalimschy2003-08-251-2/+2
|
* more changes to reduce stack usage by the parserRoberto Ierusalimschy2003-07-091-4/+4
|
* small changes to reduce stack usage by the parserRoberto Ierusalimschy2003-07-091-3/+9
|