-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Remove interoperability between TypedArrays and DataView instances #411
Conversation
Does anyone know the history behind the previous design? The change notes for rev19 only say:
|
From what I saw on the specs, TypedArray and Dataview instance methods are very optimized to work for their respective constructors. I might be wrong, but this interoperability is not necessary and might avoid further optimization. It would be valuable to have feedback on @anba's question, maybe there's a missing piece I haven't found yet. |
@allenwb What do you think? |
I'll take a closer look in a bit. A good starting place for understanding the motivation is to look at the change markup for Rev19 and see the before and after. |
ping @allenwb? :) |
OK, I verified that this is indeed a bug and the proposed fix looks exactly right. |
Thank you, @allenwb! |
I like this change. Suggestion: maybe completely disjoint internal slot names to make the distinction even more clear. |
the common [[ViewedArrayBuffer]] is used to make |
I left the Assert steps for [[ViewedArrayBuffer]] for a historical reason, but they're not really necessary as probably won't cause any trouble. I can remove them if necessary. |
The asserts are fine I think. Let's leave them! |
Apply this change to prevent this - probably unwanted - interoperability.
This change help optimizing implementations.