Closed
Bug 779601
Opened 12 years ago
Closed 12 years ago
Minor cleanup for JS_ValueToECMAInt32 and friends
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla17
People
(Reporter: jorendorff, Assigned: jorendorff)
Details
Attachments
(1 file, 1 obsolete file)
9.12 KB,
patch
|
bhackett1024
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•12 years ago
|
||
Assignee: general → jorendorff
Attachment #648058 -
Flags: review?(luke)
Assignee | ||
Comment 2•12 years ago
|
||
Comment on attachment 648058 [details] [diff] [review] v1 Adding more changes after talking this over with bhackett.
Attachment #648058 -
Flags: review?(luke)
Assignee | ||
Comment 3•12 years ago
|
||
Attachment #648058 -
Attachment is obsolete: true
Attachment #648081 -
Flags: review?(bhackett1024)
Comment 4•12 years ago
|
||
Comment on attachment 648081 [details] [diff] [review] v2 Review of attachment 648081 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/jsapi.h @@ +2741,5 @@ > JS_ValueToECMAInt32(JSContext *cx, jsval v, int32_t *ip); > > #ifdef __cplusplus > namespace js { > +/* DO NOT CALL THIS. Use JS::ToInt32. */ JS::ToUint16
Attachment #648081 -
Flags: review?(bhackett1024) → review+
Assignee | ||
Comment 5•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/a5f46bf6c00e
Comment 6•12 years ago
|
||
How expensive is the root stuff in ToNumber and ToInt32? Is there any way we could get rid of it? Those are pretty hot paths in binding code...
Comment 7•12 years ago
|
||
(In reply to Boris Zbarsky (:bz) [In and out Aug 1 - 10, out Aug 11-20] from comment #6) > How expensive is the root stuff in ToNumber and ToInt32? Is there any way > we could get rid of it? Those are pretty hot paths in binding code... Yes, absolutely. We would like to take a HandleValue here and use the existing root rather than creating a new one. Work should be starting soon under bug 773686 now that bug 777219 has landed. We could certainly do this bit first, especially if you have time to help from the DOM side.
Comment 8•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/a5f46bf6c00e
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
Comment 9•12 years ago
|
||
I can definitely help on the DOM side, modulo the whole "gone Aug 11-20 thing". On the DOM side, the common case is that the value is coming out of a JSNative's vp or he equivalent for the new setup efaust added for ionmonkey. A slightly more rare case is that I'm working with a property I just got off an object via JS_GetProperty or JS_GetElement. So we could presumably push the bits from here out to the DOM code for now, pending those three things getting converted, but to get a real win perf-wise they'd need to be converted too, right?
Comment 10•12 years ago
|
||
Yes, they'd need to be converted. (HANDLE ALL THE THINGS. Ahem.) If we're changing JSNative, tho, we should probably just change it to JS::CallArgs, which is not far from including all the handle stuff. (I see that JS::CallReceiver which it derives from is handle-ized, but CallArgs still appears to need a little work yet.)
You need to log in
before you can comment on or make changes to this bug.
Description
•