Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debug output for system constants is out of date #291

Open
erkyrath opened this issue Apr 13, 2024 · 0 comments
Open

Debug output for system constants is out of date #291

erkyrath opened this issue Apr 13, 2024 · 0 comments

Comments

@erkyrath
Copy link
Contributor

erkyrath commented Apr 13, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant