Closed Bug 769041 Opened 12 years ago Closed 12 years ago

Remove some unneeded __proto__ special-cases

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: Waldo, Assigned: Waldo)

Details

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

Attachments

(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.)
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: