Commit graph

9 commits

Author SHA1 Message Date
Alexander Motzkau
0142ebbd27 Added abilities to Python integration to trace LPC program execution
Added BEFORE_INSTRUCTION hook to be called for every instruction.
Added call_stack property to query the current stack.
2025-07-07 22:14:05 +02:00
Alexander Motzkau
bf44f19753 Save local variable names for inspection in coroutines
With the new pragma save_local_names the names of local variables are
stored in the program so they can be inspected (with Python) later on.
2022-01-09 21:22:34 +01:00
Alexander Motzkau
8556262748 Implement coroutines
Add a new type and several statements to LPC to implement coroutines.
Coroutines allow a function to suspend its execution and resume it
later.
2022-01-09 21:22:34 +01:00
Alexander Motzkau
0659a4124d Implement lightweight objects
Add a new type and data structure to LPC. Lightweight objects combine
properties from structs (small memory footprint, automatic lifetime
management) and objects (capsulation, functions).
(Implements #688)
2022-01-09 01:13:21 +01:00
Alexander Motzkau
9414a7a046 Preprocessor statements and pragmas must be written in full
It is no more permissible to preprocessor statements in part
(e.g. '#incl <>' or just '# <>'), also pragma names must be written fully.
2021-02-02 20:41:00 +01:00
Alexander Motzkau
987b89bbd8 Python: Added protector for replace_program()
When lfun or variable objects are created, we need to make sure,
the indices are adjusted if a replace_program() is in progress.
Just like closures we create a protector structure that will be
processed after the replace_program().
2020-04-28 22:30:06 +02:00
Alexander Motzkau
68bc5440c7 Python: Implemented variable list for object representation
In Python the representation of an LPC object offers an attribute
variables, that contains all variables of that object with some
information about it and an attribute to change its value.
2020-04-28 22:30:06 +02:00
Alexander Motzkau
855ee6441a Python: Implemented function list for object representation
In Python the representation of an LPC object offers an attribute
functions, that contains all visible functions of that object
with some information about that function and the call operator.
2020-04-28 22:30:06 +02:00
Alexander Motzkau
aff1392ef3 Added testsuite for Python. 2016-10-12 21:42:52 +02:00