Closed
Bug 507683
Opened 15 years ago
Closed 15 years ago
Trace native getters
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
status1.9.2 | --- | beta1-fixed |
People
(Reporter: jorendorff, Assigned: jorendorff)
References
Details
(Whiteboard: fixed-in-tracemonkey)
Attachments
(2 files, 2 obsolete files)
656 bytes,
text/html
|
Details | |
17.69 KB,
patch
|
gal
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•15 years ago
|
||
This patch doesn't make JIT code call native getters directly. Instead they call a builtin function, GetPropertyById, which does OBJ_GET_PROPERTY, which repeats the whole lookup. So, it's sloppy, but I'd like bz to give it a spin and maybe even land it, with a promise to improve upon this soon. Passes trace-tests. It hardly seems possible, but I think this is a win on SunSpider. I occasionally get a bench.sh run under 1000ms now, which didn't happen for me before. This might even trace non-quick-stubbed getters, if we can get through XPConnect without deep-aborting/deep-bailing. TODO: Add a few trace-tests; try to make the violence to TR::prop()'s interface a little less horrible; probably bring back the special case for str.length.
Assignee: general → jorendorff
Assignee | ||
Comment 2•15 years ago
|
||
Forgot to mention that this patch goes on top of the one in bug 507665.
Depends on: 507665
Assignee | ||
Comment 3•15 years ago
|
||
We won't trace non-quick-stubbed XPConnect getters. We'll deep-bail in js_InternalInvoke every time. Memo to myself: add a check to prevent this patch from trying to record the JSPROP_GETTER case.
Assignee | ||
Comment 4•15 years ago
|
||
This is what I'm sending to the Try server right about now. (I can definitely squeeze a bit more speed out of it, but if it passes tests I'd rather land it and file the follow-up bug.)
Attachment #391927 -
Attachment is obsolete: true
Comment 5•15 years ago
|
||
Assignee | ||
Comment 6•15 years ago
|
||
This isn't much different from WIP 2. Unbitrotted and a few tweaks here and there. This removes a special hack for obj.length where obj is a String wrapper object. Now that will result in a call to the length getter, instead of emitting hand-coded LIR. I hope we can live without that. I'll check SunSpider and v8 benchmarks before landing, but this shouldn't affect them much either way. Dromaeo should see a win at the margins--we still lose big because it calls across window objects though.
Attachment #392357 -
Attachment is obsolete: true
Attachment #394153 -
Flags: review?(gal)
Assignee | ||
Comment 7•15 years ago
|
||
Bug 508310 is the follow-up bug to call getters directly, eliminating GetPropertyWithNativeGetter.
Assignee | ||
Comment 8•15 years ago
|
||
Review ping.
Updated•15 years ago
|
Attachment #394153 -
Flags: review?(gal) → review+
Comment 9•15 years ago
|
||
Comment on attachment 394153 [details] [diff] [review] v3 { DeepBailState state; // or something like this? just a suggestion } >+ enterDeepBailCall(); >+ LIns* vp_ins = addName(lir->insAlloc(sizeof(jsval)), "vp"); >+ LIns* args[] = {vp_ins, INS_CONSTPTR(sprop), obj_ins, cx_ins}; >+ LIns* ok_ins = lir->insCall(&GetPropertyWithNativeGetter_ci, args); >+ finishGetProp(obj_ins, vp_ins, ok_ins, outp); >+ leaveDeepBailCall(); >+ return JSRS_CONTINUE; >+} >+
Assignee | ||
Comment 10•15 years ago
|
||
Part the First: http://hg.mozilla.org/tracemonkey/rev/b7ef4e4816ed Part the Second: http://hg.mozilla.org/tracemonkey/rev/8ca247a7d4ba
Assignee | ||
Updated•15 years ago
|
Whiteboard: fixed-in-tracemonkey
Comment 11•15 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/b7ef4e4816ed
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Comment 12•15 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/8ca247a7d4ba
Comment 13•15 years ago
|
||
http://hg.mozilla.org/releases/mozilla-1.9.2/rev/ec9d6d620204
status1.9.2:
--- → beta1-fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•