Dialog version 0h/04 (library 0.31) contains several bugfixes and performance improvements.
-
Library: Reduced heap usage during nested disambiguation questions. A few players managed to crash Pas De Deux by triggering several disambiguation questions in a row. When the game asks “Did you mean …”, and the player doesn’t respond with one of the options, the library treats the input as a new command and tries to parse it as a nested operation. If that command, too, is ambiguous, a new question is asked, and so on. In the old version of the library, if the player kept typing ambiguous commands, the heap would overflow, and the library would print an error message and attempt to
UNDO
. In the new version, if the player types something other than a response to the question, that command is stored temporarily on the long-term heap, while regular heap memory is recovered through backtracking. -
Library: The shortest-path routine has been rewritten to reduce static memory usage. The old version, a rather hastily implemented variant of the Bellman-Ford algorithm, required six bytes of storage for every object in the game. Since all the room connectors (the “obvious exits”) are unweighted, I have now switched to a breadth-first search. This reduced the storage requirements to a single per-object variable (two bytes). Furthermore, because rooms are never located in or on other objects in Dialog, the per-object variable
($ has relation $)
can be used for temporary storage during path-finding, which eliminates the remaining two bytes. In other words, the new version reduces static RAM usage by 1 kB for every 171 objects. This leaves more RAM for paging, which improves performance on vintage hardware. -
Compiler: The triple-verbose (
-vvv
) output from the compiler describes how every predicate is queried by the rest of the code. For each parameter, you get to know whether it can be unbound, and if so, an example of where in the code such a query is made. This lets you trace backwards from a compiler warning (about using a potentially unbound value in a place where it’s not allowed) to the root cause of the problem. But sometimes, for recursive queries, only the recursive call was reported, which would put an end to your tracing. This has now been fixed. -
Several odd fixes and corner cases:
-
Compiler: Added support for
(now) ~($ has parent $)
, for completeness. -
Compiler: Reduced temporary register usage. Added a check to report an error if we’re running out of registers.
-
Compiler: Fixed additional corner-case bugs discovered through fuzzing.
-
Å-backend: Collecting into a value (e.g. a list expression) now works properly.
-
Å-backend: Fixed a compiler error due to e.g.
(#a = $X)
. -
Debugger: Now handles auxiliary heap overflow gracefully.
-
Debugger: Correct handling of undo inside div, e.g. from the runtime error handler.
-
Debugger: Fixed a bug related to single-digit input.
-
Z-backend and debugger: Allows dynamic predicates to be unset for non-objects (nothing happens).
-
-
Improved the frontend optimizer, with a special focus on if-statements.
-
Several improvements to make the Å-machine backend generate smaller and faster code.