Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Simplify Object Model and add StorageAccessor #164

Merged
merged 6 commits into from
Jun 27, 2017
Merged

Simplify Object Model and add StorageAccessor #164

merged 6 commits into from
Jun 27, 2017

Conversation

smarr
Copy link
Owner

@smarr smarr commented Jun 25, 2017

  • move variability into dispatch chains and remove read/write nodes
    • the goal here is to have one less indirection/moving part
      didn't seem necessary anymore, and just made the model more complex
    • prim (set/setOrUnset), object, unwritten variability is now in
      dispatch chains directly
  • do accessing of the slot's memory in a new storage accessors
    • there is a fixed number of storage accessors preallocated based on
      the fields in S*Object
    • the goal is to have more control over the unsafe accesses and try
      alternative accessors for the SubstrateVM
  • expose CheckSObject guard and use it for cast
  • correct naming and file structure
  • move storage handling and primitiveUsedMap handling from SObject to
    storage accessors

smarr added 2 commits June 23, 2017 14:20
Signed-off-by: Stefan Marr <git@stefan-marr.de>
Signed-off-by: Stefan Marr <git@stefan-marr.de>
@smarr smarr added the enhancement Improves the implementation with something noteworthy label Jun 25, 2017
@smarr smarr added this to the v0.5.0 milestone Jun 25, 2017
@smarr smarr force-pushed the object-model branch 2 times, most recently from 3ceadf8 to d8b9179 Compare June 25, 2017 18:44
Repository owner deleted a comment from coveralls Jun 25, 2017
Repository owner deleted a comment from coveralls Jun 25, 2017
Repository owner deleted a comment from coveralls Jun 25, 2017
@smarr
Copy link
Owner Author

smarr commented Jun 25, 2017

@Richard-Roberts Would be great if you could have a look at this, and potential review the change.
It's probably going to be interesting for you in the long term.

@daumayr, I am not sure, no way to confirm, I think, but I might have fixed our long-standing race.
There was a race for updating the object layouts. We tried to initialize a previously unwritten field, or generalize it multiple times.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 79.897% when pulling d8b9179 on object-model into 02c064e on dev.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 79.897% when pulling 23c52a7 on object-model into 02c064e on dev.

@smarr smarr force-pushed the object-model branch 2 times, most recently from 9c6c13a to 332d839 Compare June 26, 2017 15:30
@coveralls
Copy link

Coverage Status

Coverage remained the same at 79.897% when pulling 332d839 on object-model into a6767a4 on dev.

smarr added 4 commits June 27, 2017 17:54
- move variability into dispatch chains and remove read/write nodes
  - the goal here is to have one less indirection/moving part
    didn't seem necessary anymore, and just made the model more complex
  - prim (set/setOrUnset), object, unwritten variability is now in
    dispatch chains directly
- do accessing of the slot's memory in a new storage accessors
  - there is a fixed number of storage accessors preallocated based on
    the fields in S*Object
  - the goal is to have more control over the unsafe accesses and try
    alternative accessors for the SubstrateVM
- expose CheckSObject guard and use it for cast
- correct naming and file structure
- move storage handling and primitiveUsedMap handling from SObject to
  storage accessors

Signed-off-by: Stefan Marr <git@stefan-marr.de>
- make sure multiple initializations of same slot don't overwrite first
  type but generalize it instead, if necessary
- make sure already generalized fields don't need to be generalized
  again

Signed-off-by: Stefan Marr <git@stefan-marr.de>
- only to be used on the slow path
- updated only with sync on ClassFactory
- also, updates should only be part of slow path

Signed-off-by: Stefan Marr <git@stefan-marr.de>
It doesn’t seem very useful to have invalid layouts being propergated after such a check.

Signed-off-by: Stefan Marr <git@stefan-marr.de>
@smarr smarr merged commit cf3f782 into dev Jun 27, 2017
@smarr smarr deleted the object-model branch June 27, 2017 15:58
@smarr
Copy link
Owner Author

smarr commented Jun 27, 2017

The changes to the object model are merged now, but post-merge reviews are still welcome.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 79.897% when pulling e2af364 on object-model into a6767a4 on dev.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement Improves the implementation with something noteworthy
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants