About branch compile-uplevel
Adds compilation for the uplevel command. This requires one new opcodes, INST_UPLEVEL, that takes two values on the stack (level, script) and produces one (result). Concatenation of arguments, if required, is handled by the compiled instruction sequence.
Note that the compiler requires the first argument to be known at compile time (so it can be definitely parsed to see if it is a level), and cannot handle a call with a single argument. This is caused by a flaw in the semantics of, say, uplevel 1 which currently parses as an error in all cases. The correct fix, similar to how switch was also fixed, is to say that when a single argument is present, it is always a script and never interpreted as anything else. This will require a TIP to fix.
11 check-ins related to "compile-uplevel"
|
2025-06-29
| ||
| 06:36 | Add bytecode compilation of [uplevel] check-in: 8c37a379c1 user: dkf tags: trunk, main | |
| 06:25 | merge trunk closed check-in: 63d8f3a50f user: dkf tags: compile-uplevel | |
| 06:21 | Add bytecode compilation of [lseq] check-in: 83eda5e7b0 user: dkf tags: trunk, main | |
|
2025-06-27
| ||
| 10:50 | merge trunk check-in: 96135b818f user: dkf tags: compile-uplevel | |
| 10:50 | All test cases now pass. check-in: 14ff2b425b user: dkf tags: compile-uplevel | |
| 08:03 | Some of the test failures fixed... check-in: c44829d14c user: dkf tags: compile-uplevel | |
|
2025-06-26
| ||
| 14:28 | Compiled [uplevel] works. Except for some tests which see differences in [info frame] as a result. check-in: a965f02024 user: dkf tags: compile-uplevel | |
| 13:46 | Merge 9.0 check-in: 8f8b11907b user: jan.nijtmans tags: trunk, main | |
| 13:12 | Draft of instruction done... but crashes. check-in: 4af3554349 user: dkf tags: compile-uplevel | |
| 10:45 | Start of developing compilation for [uplevel] check-in: b16b6d856c user: dkf tags: compile-uplevel | |
| 09:56 | Merge 9.0 check-in: 52ff13f312 user: jan.nijtmans tags: trunk, main | |