Skip to content

Specify reflective field access #44

Open
@smarr

Description

@smarr

The instVarAt: and instVarAt:put: methods take an index to access fields.

This index is based on the lexical definition of fields in the class hierarchy.

The first field of the first class with a field is specified to have index 1.
The second field has index 2.
First and second, i.e., ordering are determine by the lexical location in the field definition clause.
Thus, in | a b | the field a is the first, and b is the second field.

The field of a super class directly precedes the field of the class, and that of the super super class precedes the fields of the super class, and so on.

Thus, in the following examples the fields have the following indexes:

A = (
  | a b |
)

B = A (
 | c d |
)
  1. a
  2. b
  3. c
  4. d

Metadata

Metadata

Assignees

No one assigned

    Labels

    specNeeds specification, or is specification related.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions