Closed Bug 769041 Opened 8 years ago Closed 7 years ago

Remove some unneeded __proto__ special-cases


(Core :: JavaScript Engine, defect)

Not set





(Reporter: Waldo, Assigned: Waldo)


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


(3 files)

Old "optimizations" to handle __proto__ outside of fast paths don't pay their way complexity-wise.
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)
Attachment #637244 - Flags: review?(luke) → review+
Attachment #637247 - Flags: review?(luke) → review+
Attachment #637258 - Flags: review?(luke) → review+
Whiteboard: [leave open] → [leave open][js:t]
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.)
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.