Clone wiki

zilf / ZILF 0.8 Release Notes

ZILF 0.8 Release Notes

(Previous version: 0.7)

What's new in 0.8?

Compiler

Z-machine structures

  • Objects can have multiple (FLAGS ...) clauses (they're combined)
  • PROPDEF-based property values can use string constant names instead of string literals
  • A VECTOR can be coerced into a TABLE
  • Added the TEMP-TABLE table flag
  • Tables with the PARSER-TABLE flag are automatically purified and emitted before the rest of the pure tables, with the constant PRSTBL pointing to the first one
  • Added ZREST to offset into a table at compile time

Z-machine version 6

  • ZILF can compile version 6-7 games
  • ZILF can generate version 6 vocab and syntax tables, if the global NEW-PARSER? is set to T; the game must define several types and macros for this to work
  • Added DCLEAR, 3-argument DIROUT, DISPLAY, FSTACK, MARGIN, MENU, MOUSE-INFO, MOUSE-LIMIT, PICINF, PICSET, POP, PRINTF, SCROLL, WINATTR, WINGET, WINPOS, WINPUT, WINSIZE, XPUSH
  • Added LOWCORE fields FOFF, SOFF, and TWID
  • Header extensions are allowed on version 6-8

Vocabulary and grammar

  • The set of object search flags can be extended or replaced by setting the GVAL of NEW-SFLAGS to a vector

Miscellaneous Z-code functions

  • BAND and BOR can take any number of parameters
  • COND clauses can be macro expansions instead of explicit lists

Compile-time types

  • New DEFSTRUCT options: NOTYPE, PRINTTYPE, CONSTRUCTOR, INIT-ARGS, and quoted FIXes
  • DEFSTRUCT constructors can take positional ("BOA constructor") arguments instead of keyword arguments
  • DEFSTRUCT constructors initialize fields to their default values
  • Added the ACTIVATION type, and support for it in DEFINE, FUNCTION, PROG, REPEAT, BIND, RETURN, and AGAIN
  • Added the ENVIRONMENT type, and support for it in SET, LVAL, VALUE, BOUND?, ASSIGNED?, UNASSIGN, and EVAL
  • Added the ASOC type, and the SUBRs ASSOCIATIONS, NEXT, ITEM, INDICATOR, and AVALUE
  • Added LINK (type and SUBR)
  • Added LEGAL?
  • Added ATOM (the SUBR)
  • Added NEWTYPE, PRINTTYPE, EVALTYPE, APPLYTYPE, PRIMTYPE, TYPEPRIM, ALLTYPES, and VALID-TYPE?
  • Added DECL?, GDECL, PUT-DECL, GET-DECL, and DECL-CHECK
  • Improved DECL pattern support and enforced checks by default in some situations
  • READ macros can return SPLICEs

Miscellaneous compile-time functions

  • Added aliases and dummy implementations for various obsolete functions
  • INSERT-FILE tries the extension .mud if it can't find the file with .zil
  • Added lexical blocking: BLOCK and ENDBLOCK
  • Added the MDL package system: PACKAGE, ENDPACKAGE, ENTRY, RENTRY, USE, USE-WHEN, DEFINITIONS, END-DEFINITIONS, INCLUDE, INCLUDE-WHEN
  • Added MOBLIST and OBLIST?
  • Added PRINT, PRIN1, PRINT-MANY, M-HPOS, and INDENT-TO
  • Added UNASSIGN, GUNASSIGN, VALUE, BOUND?, and GBOUND?
  • Added BACK, TOP, GROW, SORT, OFFSET, and INDEX
  • Added LPARSE and a real implementation of PARSE
  • Added INSERT (with an atom argument) and REMOVE
  • The output functions PRINT, PRIN1, PRINC, CRLF, and IMAGE can take an optional CHANNEL parameter to override the LVAL of OUTCHAN; they'll also use the GVAL of OUTCHAN if it has no LVAL
  • PARSE can take optional second (ignored) and third arguments
  • COMPILATION-FLAG-VALUE returns FALSE when the flag doesn't exist
  • IFFLAG accepts flag names as strings as well as atoms
  • The IN-ZILCH compilation flag is only enabled while routines are being compiled
  • LONG-WORDS? sets the LONG-WORDS compilation flag
  • PUTB can overwrite words in a table with bytes
  • TUPLE (the SUBR) is an alias for VECTOR
  • Added hooks to let game code transform and add definitions before compilation starts

Diagnostics, debugging, and optimization

  • ZILF's version banner includes the build date
  • The library directory is added to the include path by default
  • "Too many routine args" is a warning instead of an error if the extra args are optional
  • "RETURN value ignored" warning is suppressed in some cases when an activation is provided
  • Some string conversions of infinitely recursive structures print ... instead of looping forever
  • Diagnostic messages are more consistently formatted, and they include more context when possible (such as stack traces)
  • Many arithmetic/bitwise operations and comparisons on constants are evaluated at compile time
  • BAND in predicate context is optimized to BTST or a simple branch when possible
  • Improved code generation for OR and AND in value context with predicate arguments
  • Improved code generation for idiomatic use of PROG and BIND in void context

Bug fixes

  • Fixed spurious error in some cases when IN was used as both a direction and a synonym for LOC in the same object definition
  • The association table used by PUTPROP is smarter about releasing memory
  • In MDL-ZIL? mode, SETG retains its normal meaning inside a function
  • Fixed DEFSTRUCT constructors failing when called without arguments
  • Fixed DEFSTRUCT auto-assigned offsets being disrupted by explicitly assigned offsets
  • Fixed some built-in types not being recognized as types
  • Fixed ADECL expressions failing to compile in several contexts
  • Fixed BIT-SYNONYM failing if the original name was never set on an object
  • Fixed a handful of bugs related to MACROs, SEGMENTs, and SPLICEs being expanded when they shouldn't be, or not expanded when they should
  • Fixed ZGET and ZPUT being unaware of the LTABLE length prefix
  • Fixed rooms taking up too much space in a PROPDEF in ROOMS-FIRST mode
  • Fixed operand count of NOT in predicate context
  • Fixed function arguments being bound in the caller's environment, visible to later arguments
  • Fixed return value of PUT
  • Fixed bugs involving PUT and PUTREST writing past the end of lists
  • Fixed constants in the middle of PROG and other statements being stored as the return value instead of ignored
  • Fixed calls inside a routine failing to compile when the target was given by a CONSTANT
  • Fixed SET-DEFSTRUCT-FILE-DEFAULTS leaking out into other files
  • Fixed bug where the compiler choked on (IN "foo") if IN wasn't defined as a direction
  • Fixed LISTs being incorrectly considered =? to FORMs if they had the same contents
  • Fixed exception when using local variables in GO
  • Fixed oblist trailers being omitted from atoms in abbreviated FORMs
  • Fixed bug involving REST on MACROs

Assembler

  • ZAPF supports the version 6-7 memory model
  • Abbreviation finding performance is improved
  • A warning is issued when packed addresses overflow because the game is too big
  • Fixed bug where pointers inside vocab entries, pointing to other vocab entries, broke during sorting

Library

Input and syntax

  • A number can be given as an orphaning response
  • Adjectives cannot follow their nouns

Miscellaneous

  • Increased library version to J4
  • Included pprint.mud, a pretty printing library

Bug fixes

  • Fixed bug where orders were aborted after an ambiguous actor name triggered orphaning
  • Fixed bug where objects selected through orphaning would bypass some noun checks and implicit takes
  • Fixed PARSE-NUMBER? failing to reject overflowing numbers

Updated