Closed Bug 885729 Opened 11 years ago Closed 11 years ago

Inline array and proxy specializations of js::DefineProperty into js::DefineProperties

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla25

People

(Reporter: till, Assigned: till)

Details

Attachments

(1 file)

I'm not sure how, but I stumbled upon this and think that we could do well with hoisting all those checks from js::DefineProperty into js::DefineProperties.

To make that work, I had to remove the duplication of DefineProperties from Object.cpp and expose the declaration in jsobj.h. Shout if I should do something different.

I don't actually know which benchmarks test our performance here, if any, so I don't know if it'll be a visible win somewhere. I would wager that it will speed up some real code, somewhere, however.
Attached patch v1Splinter Review
Attachment #765910 - Flags: review?(jwalden+bmo)
Comment on attachment 765910 [details] [diff] [review]
v1

Review of attachment 765910 [details] [diff] [review]:
-----------------------------------------------------------------

Probably not much code uses Object.defineProperties yet, but yeah, this'll speed up whatever exists, or will exist at some point.
Attachment #765910 - Flags: review?(jwalden+bmo) → review+
https://hg.mozilla.org/mozilla-central/rev/612c36049571
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: