GeezerVison is showing github.com — V8 4.4 to remove indexed properties via external data · Issue #1451 · nodejs/node
V8 4.4 to remove indexed properties via external data #1451Labels bufferIssues and PRs related to the buffer subsystem.v8 engineIssues and PRs related to the V8 dependency. DescriptionHey,
I'm about to remove SetIndexedPropertiesToExternalArrayData and related APIs from V8. I think there are some callsites of this API in io.js that would need to be updated.
You should use the standardized ArrayBuffers / ArrayBufferViews instead.
CL to remove them is here: https://codereview.chromium.org/1092923002
this will land in V8 4.4 Activitybnoordhuis commented on Apr 17, 2015 I just saw the email on v8-dev and I've left a comment. I appreciate the heads up and I can't stress enough the impact that change will have on the io.js and node.js ecosystem. mscdex commented on Apr 17, 2015 jeisinger commented on Apr 17, 2015 ContributorAuthor More actions I realize this is disruptive, but I don't see how it's fundamentally different from e.g. the MaybeLocal<> or Persistent<> changes that also force existing embedders to update.
anyway, as I mentioned on the CL, we'll discuss this internally. Will update this issue with the outcome. mscdex commented on Apr 17, 2015 @bnoordhuis Doesn't this mean that it would no longer be possible to have Buffer? jeisinger commented on Apr 17, 2015 ContributorAuthor More actions the same functionality is provided by the ArrayBuffer API. The javascript objects will look exactly the same. petkaantonov commented on Apr 17, 2015 It's not just compatibility but you can't implement something like SharedArrayBuffer (partial ownership transfers) with only ArrayBuffer api Fishrock123 commented on Apr 17, 2015 iirc ArrayBuffer APIs aren't able to completely replace Buffer?
See @petkaantonov's comment..
We'd need enough hooks to at least make a replacement... jeisinger commented on Apr 17, 2015 ContributorAuthor More actions All those use cases should be supported. If you have a concrete instance of
problem, I'm happy to help
On Fri, Apr 17, 2015, 5:38 PM Jeremiah Senkpiel [email protected]
wrote:
iirc ArrayBuffer APIs aren't able to completely replace Buffer? We'd need
enough (something) to at least make a replacement...
—
Reply to this email directly or view it on GitHub
#1451 (comment).
changed the title [-]V8 removes indexed properties via external data[/-] [+]V8 4.4 to remove indexed properties via external data[/+] on Apr 17, 2015meandmycode commented on Apr 17, 2015 I feel if there aren't any blocking functionality issues then this is ok.
It seems more of an agenda issue to say making breaking changes is unacceptable. It won't break node as node lives on v8 from the past and they've said they won't update v8 often because of changes like this.
Whereas iojs was willing to take the hit for the better engine, I'm not sure you can always have your cake and eat it..
If iojs has an agenda to keep up with v8 then it also needs to point out that this can be disruptive to native modules. bmeck commented on Apr 17, 2015 I think you can do transferable ArrayBuffers using ArrayBuffer::Externalize(), ArrayBuffer::Neuter(), then ArrayBuffer::New(). Or if you want shared mutation don't Neuter() after Externalize(). @jeisinger does that sound right? jeisinger commented on Apr 18, 2015 ContributorAuthor More actions You can just allocate the memory yourself using the ArrayBufferAllocator node already defines and pass that memory to ArrayBuffer::New()
I'd put the pointer to the underlying memory in one of the internal fields of the arraybuffer (via SetAlignedPointerInInternalField) because the ArrayBuffer::Externalize API only gives you the pointer once...
If there are additional APIs you'd need on ArrayBuffer, ArrayBufferView, or the typed Arrays, we can certainly add them there. jeisinger commented on Apr 20, 2015 ContributorAuthor More actions basically, what will be dropped is the ability to add external data to any object. Instead, the object needs to inherit from one of the typed array types (ArrayBufferView) or DataView.
All other functionality will stay - if something is not accessible via the typed array API this can be easily fixed. vkurchatkin commented on Apr 20, 2015 @jeisinger so it will be possible to access ArrayBuffer data without copying/externalizing? trevnorris commented on May 13, 2015 @jeisinger I've noticed that calling super() from constructor() doesn't allow it to every be optimized. Any chance that could be added to the 4.5 performance roadmap as well? I'll take a look under-the-hook, but my V8 chops probably aren't good enough to make a CL. jeisinger commented on May 14, 2015 ContributorAuthor More actions Yes, many of the newly added ES6 features aren't yet fully optimized. I don't know what the roadmap for specific features is. rvagg commented on Jun 3, 2015 removing tsc-agenda label from this, @trevnorris please feel free to put a label back on one of the related issues if you'd like to discuss the topic further bnoordhuis commented on Jun 3, 2015 trevnorris commented on Sep 15, 2015 @jeisinger Here was my solution to allowing creating the Uint8Array from JS but still not filling it: 74178a5
Horrible abuse of the API, but is working great. jeisinger commented on Sep 16, 2015 ContributorAuthor More actions You'll lose the optimizations for length and other fields that way, no
(because the prototype is modified)?
On Wed, Sep 16, 2015, 1:38 AM Trevor Norris [email protected]
wrote:
@jeisinger https://github.com/jeisinger Here was my solution to
allowing creating the Uint8Array from JS but still not filling it: 74178a5
74178a5
Horrible abuse of the API, but is working great.
—
Reply to this email directly or view it on GitHub
#1451 (comment).
trevnorris commented on Sep 16, 2015 trevnorris commented on Sep 16, 2015 @jeisinger Wouldn't we have lost these anyway by using v8::Object::SetPrototype()? indutny commented on Sep 16, 2015 jeisinger commented on Sep 16, 2015 ContributorAuthor More actions
MetadataMetadatabufferIssues and PRs related to the buffer subsystem.v8 engineIssues and PRs related to the V8 dependency. DevelopmentNo branches or pull requestsIssue actions
|