DavidKinder / Inform6

The latest version of the Inform 6 compiler, used for generating interactive fiction games.
http://inform-fiction.org/
Other
199 stars 32 forks source link

Debug output for system constants is out of date #291

Open erkyrath opened 2 months ago

erkyrath commented 2 months ago

The debug file (-k) has a section for system constants. This is generated from the arrays z_system_constant_list[] and glulx_system_constant_list[].

I suspect a few are missing.

The new constant #highest_meta_action_number is also missing. But that's set up to generate an error if $GRAMMAR_META_FLAG is not set. So just sticking it in the arrays will cause an unnecessary error.

We could rely on check_system_constant_available() for this, if it were updated to handle #highest_meta_action_number, which it currently doesn't. If we moved the $GRAMMAR_META_FLAG check there, we could simplify value_of_system_constant_z/g().

This would also let the debug file omit meaningless constants when $OMIT_SYMBOL_TABLE is set.

check_system_constant_available() would need a "quiet" mode.