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

Decide whether unused AEB bits must be zero #1020

Open
tgregg opened this issue Dec 21, 2024 · 1 comment
Open

Decide whether unused AEB bits must be zero #1020

tgregg opened this issue Dec 21, 2024 · 1 comment

Comments

@tgregg
Copy link
Contributor

tgregg commented Dec 21, 2024

The argument encoding bitmap requires (as of its current definition) 2 bits per non-required parameter. For macro signatures with numbers of non-required parameters not a multiple of 4, this leaves some unused bits in the argument encoding bitmap byte(s).

Should implementation(s) require these unused bits to be zero, or simply ignore them? Currently ion-java ignores them. The spec should probably take a stance here as well.

The following data illustrates this:

  0x01, // Macro invocation 1 ($ion::values, when system macros are in scope)
  0xF0  // The argument encoding bitmap, with the lowest 2 bits (`00`) required by the single zero-to-many parameter

If unused bits are ignored, this is valid and expands to nothing (i.e., (:values)). If unused bits must be zero, then this must raise an error.

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

2 participants
@tgregg and others