Remove some unneeded __proto__ special-cases

RESOLVED FIXED

Status

()

RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Waldo, Assigned: Waldo)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [leave open][js:t])

Attachments

(3 attachments)

(Assignee)

Description

6 years ago
Old "optimizations" to handle __proto__ outside of fast paths don't pay their way complexity-wise.
(Assignee)

Comment 1

6 years ago
Created attachment 637244 [details] [diff] [review]
Don't use special opcodes when emitting bytecode for getting obj.__proto__
Attachment #637244 - Flags: review?(luke)
(Assignee)

Comment 2

6 years ago
Created attachment 637247 [details] [diff] [review]
Remove more special opcoding for dotted property access involving __proto__
Attachment #637247 - Flags: review?(luke)
(Assignee)

Comment 3

6 years ago
Created attachment 637258 [details] [diff] [review]
Don't specially handle __proto__ in array_getProperty

We now pass along the receiver when delegating access to properties the array doesn't have, so things will just work without this code.

I thought for a moment that this code actually indicated the presence of a bug, if called when obj != receiver, but I think it's not actually an issue, because the only way such a case could happen is if array_lookupProperty indicated that __proto__ existed on the array in question.  But I wrote the tests before coming to that conclusion, and they seem reasonable to have, so I've left them in the patch.
Attachment #637258 - Flags: review?(luke)

Updated

6 years ago
Attachment #637244 - Flags: review?(luke) → review+

Updated

6 years ago
Attachment #637247 - Flags: review?(luke) → review+

Updated

6 years ago
Attachment #637258 - Flags: review?(luke) → review+
Whiteboard: [leave open] → [leave open][js:t]
(Assignee)

Comment 6

6 years ago
Nope, in hindsight this looks done.  The remaining special-casing happens because we reuse initprop for both normal properties in literals, and for the __proto__ special case, and that we can't really remove.  (Although we probably should have a different JSOp for the __proto__-as-key case here, but that aside.)
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.