Skip to content

Decide whether unused AEB bits must be zero #1020

@tgregg

Description

@tgregg

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions