Bring in 5.1 - 5.0 abi compatibility - #23
Conversation
Good work! Looking at the diff from v8.h in 5.0, there is still this ABI difference remaining: @@ -7149,7 +7323,7 @@ class Internals {
1 * kApiPointerSize + kApiIntSize;
static const int kStringResourceOffset = 3 * kApiPointerSize;
- static const int kOddballKindOffset = 4 * kApiPointerSize;+ static const int kOddballKindOffset = 5 * kApiPointerSize;
static const int kForeignAddressOffset = kApiPointerSize; |
matthewloring
commented
May 20, 2016
That should be fixed now. |
Looking at some of the other include/ files, a few more differences. These should be easy to fix however: --- a/deps/v8/include/v8-debug.h+++ b/deps/v8/include/v8-debug.h@@ -18,13 +18,11 @@ enum DebugEvent {
Exception = 2,
NewFunction = 3,
BeforeCompile = 4,
- AfterCompile = 5,+ AfterCompile = 5,
CompileError = 6,
- PromiseEvent = 7,- AsyncTaskEvent = 8,+ AsyncTaskEvent = 7,
};
--- a/deps/v8/include/v8-platform.h+++ b/deps/v8/include/v8-platform.h@@ -152,9 +152,9 @@ class Platform {
*/
virtual uint64_t AddTraceEvent(
char phase, const uint8_t* category_enabled_flag, const char* name,
- uint64_t id, uint64_t bind_id, int32_t num_args, const char** arg_names,- const uint8_t* arg_types, const uint64_t* arg_values,- unsigned int flags) {+ const char* scope, uint64_t id, uint64_t bind_id, int32_t num_args,+ const char** arg_names, const uint8_t* arg_types,+ const uint64_t* arg_values, unsigned int flags) {
return 0;
} |
matthewloring
commented
May 21, 2016
These should now be compatible. |
There was a problem hiding this comment.
Swapping this back around will be bad for performance, since we perform range checks on LAST_SPECIAL_RECEIVER_TYPE and LAST_CUSTOM_ELEMENTS_RECEIVER. If JS_OBJECT_TYPE falls above, all JS_OBJECT_TYPE objects (most common JavaScript object) will take the slow path for e.g., .hasOwnProperty.
matthewloring
commented
May 24, 2016
I added custom checks for varo={};for(vari=0;i<10000000;i++){Object.assign(o,{i: i});for(varkino){if(!o.hasOwnProperty(k)){console.log('fail');}}}I observed: |
There was a problem hiding this comment.
I think this is not right. JS_SPECIAL_API_OBJECT_TYPE used to be <= LAST_CUSTOM_ELEMENTS_RECEIVER before your change, but is > after your change. JS_OBJECT_TYPE is invariant here.
I think the expression you want is:
OR (
LESS_EQUAL (instance_type, LAST_CUSTOM_ELEMENTS_RECEIVER
EQUAL(instance_type, JS_SPECIAL_API_OBJECT_TYPE))
ofrobots
commented
May 27, 2016
LGTM to me. Let's get @verwaest to review as well. |
targos
commented
May 31, 2016
There is now v8/v8@ea5e96f in the 5.1 branch. Do you have to make changes for that? |
verwaest-zz
commented
May 31, 2016
LGTM as well. |
matthewloring
commented
May 31, 2016
I've updated the patch to support v8/v8@ea5e96f. |
ofrobots
commented
Jun 1, 2016
LGTM. @jeisinger PTAL as well. |
jeisinger
commented
Jun 2, 2016
LGTM |
targos
commented
Jun 2, 2016
@matthewloring If everything is ready, could you squash the commits so I can pick them up in nodejs#7016 ? |
matthewloring
commented
Jun 2, 2016
@targos All squashed. |
targos
commented
Jun 3, 2016
The patch does not apply cleanly on my branch |
ofrobots
commented
Jun 3, 2016
Actually this PR needs more work. Intercepted enumerator tests are failing for me. @matthewloring I think the problem is that @targos: this is not likely to be ready before next week. |
There was a problem hiding this comment.
Looking at this more closely, I think the removal of PromiseEvent was actually an API change that is missing from the official list (/cc @natorion). I think we will have bring this back as a revert of https://codereview.chromium.org/1833563002.
The removal of the promise debug event is an API/ABI breaking change. https://codereview.chromium.org/1833563002
ofrobots
commented
Jun 7, 2016
LGTM from my side. Given that that the roots list was reordered; it would be good to get signoff from @verwaest or @jeisinger as well. |
jeisinger
commented
Jun 7, 2016
lgtm |
ofrobots
commented
Jun 7, 2016
Launched a CI: https://ci.nodejs.org/job/node-test-commit/3684/ |
The removal of the promise debug event is an API/ABI breaking change. Ref: https://codereview.chromium.org/1833563002 Ref: ofrobots#23 PR-URL: nodejs#7016 Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Ref: ofrobots#23 PR-URL: nodejs#7016 Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
The removal of the promise debug event is an API/ABI breaking change. Ref: https://codereview.chromium.org/1833563002 Ref: ofrobots#23 PR-URL: #7016 Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Ref: ofrobots#23 PR-URL: #7016 Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
matthewloring
commented
Jun 29, 2016
Closing this as it has landed in core. |
The removal of the promise debug event is an API/ABI breaking change. Ref: https://codereview.chromium.org/1833563002 Ref: #23 PR-URL: nodejs#7016 Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Ref: #23 PR-URL: nodejs#7016 Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
No description provided.