$ZCODE_LESS_DICT_DATA option to omit last byte in dictionary words #148
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Setting
$ZCODE_LESS_DICT_DATA
to a nonzero value tells the compiler to omit the last dict entry byte (the one referred to as#dict_par3
). See #146 .This turned out to be more of a pain than it looked. The Z-code dict computation of
((version_number==3)?7:9)
was hardwired in quite a lot of places. I replaced them all with theDICT_ENTRY_BYTE_LENGTH
compiler variable, which is set at startup time.Complication: The
Version
directive can change the Z-code version in mid-compile, which means we must changeDICT_ENTRY_BYTE_LENGTH
at that point. And also theDICT_ENTRY_BYTES
I6 constant. This is doable, it's just messy. See #147 about the idea of deprecating this directive.Anyhow, with all that in place, we just have to reduce
DICT_ENTRY_BYTE_LENGTH
by one when$ZCODE_LESS_DICT_DATA
is set.We generate warnings and errors for three cases when
$ZCODE_LESS_DICT_DATA
is set:Dictionary 'word' x y
. (The third value is ignored.)#dict_par3
.#dict_par3
field.)