Skip to content

Conversation

@mmarchini
Copy link
Contributor

V8 6.4 "replaces the in-object properties count byte in the map
with the byte that stores the start offset of in-object properties".
Object inspection on llnode relies on in-object properties being count
bytes, so these are minimal changes to make object inspection work again
with V8 6.4 while keeping compatibility with previous versions.

Ref: https://chromium-review.googlesource.com/c/v8/v8/+/776720
Fixes: #158

V8 6.4 "replaces the in-object properties count byte in the map
with the byte that stores the start offset of in-object properties".
Object inspection on llnode relies on in-object properties being count
bytes, so these are minimal changes to make object inspection work again
with V8 6.4 while keeping compatibility with previous versions.

Ref: https://chromium-review.googlesource.com/c/v8/v8/+/776720
Fixes: nodejs#158
bnoordhuis

This comment was marked as off-topic.

@mmarchini
Copy link
Contributor Author

I thought it only applies when the map's instance type >= FIRST_JS_OBJECT_TYPE, i.e., when it's a map describing a JSObject.

There are 5 calls to InObjectProperties in llnode, 4 of them are in JSObject methods, so those calls should be safe. The only one I'm not 100% sure is correct is the call in Map::Inspect. We might need to do some special handling there, but I'm not sure. I'll leave a FIXME comment to investigate this in a follow-up PR, WDYT?

@mmarchini
Copy link
Contributor Author

Improved legibility on InObjectProperty and handled the case where Map don't describe a JSObject. @bnoordhuis PTAL.

Would be nice to have a test for this case. I'll see if I can come up with one later, but suggestions are appreciated 😄

cjihrig

This comment was marked as off-topic.

cjihrig

This comment was marked as off-topic.

@mmarchini mmarchini merged commit 7f1e791 into nodejs:master May 15, 2018
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

Successfully merging this pull request may close these issues.

3 participants