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

Specify reflective field access #44

Open
smarr opened this issue Jun 16, 2020 · 0 comments
Open

Specify reflective field access #44

smarr opened this issue Jun 16, 2020 · 0 comments
Labels
spec Needs specification, or is specification related.

Comments

@smarr
Copy link
Member

smarr commented Jun 16, 2020

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
@smarr smarr added the spec Needs specification, or is specification related. label Jun 16, 2020
smarr referenced this issue in softdevteam/yksom Jun 16, 2020
ltratt added a commit to ltratt/yksom that referenced this issue Jun 16, 2020
As it so happens, yksom already respects this new facet of the SOM spec
(SOM-st/SOM#44), so the test alone is sufficient.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spec Needs specification, or is specification related.
Projects
None yet
Development

No branches or pull requests

1 participant