Last Comment Bug 699661 - Make obj->getElement actually call into the ops getElement hooks
: Make obj->getElement actually call into the ops getElement hooks
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: 9 Branch
: x86 Mac OS X
: P2 normal (vote)
: mozilla10
Assigned To: Boris Zbarsky [:bz]
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-03 17:27 PDT by Boris Zbarsky [:bz]
Modified: 2011-11-04 03:06 PDT (History)
4 users (show)
bzbarsky: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Call the class getElement hook from JSObject::getElement as needed. (2.07 KB, patch)
2011-11-03 17:29 PDT, Boris Zbarsky [:bz]
jwalden+bmo: review+
Details | Diff | Review

Description Boris Zbarsky [:bz] 2011-11-03 17:27:54 PDT
Should help with arrays of various sorts.
Comment 1 Boris Zbarsky [:bz] 2011-11-03 17:29:52 PDT
Created attachment 571849 [details] [diff] [review]
Call the class getElement hook from JSObject::getElement as needed.
Comment 2 David Mandelin [:dmandelin] 2011-11-03 17:31:56 PDT
(In reply to Boris Zbarsky (:bz) from comment #0)
> Should help with arrays of various sorts.

Help what? That's a pretty terse description. ;-) Is this just a bug in the way we use ops?
Comment 3 Jeff Walden [:Waldo] (remove +bmo to email) 2011-11-03 17:49:43 PDT
Comment on attachment 571849 [details] [diff] [review]
Call the class getElement hook from JSObject::getElement as needed.

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

Did I really write that, and forget to start calling the getElement op?

Anybody need some fresh egg?  Slightly-used, but still fresh?
Comment 4 Boris Zbarsky [:bz] 2011-11-03 19:10:41 PDT
> Help what?

Performance, sorry.  Instead of converting uint32 to jsid and then calling the jsid ops and then checking to see whether the jsid is an int and branching on that, etc, this patch just directly calls the op taking a uint32, which arraylikes tend to fast-path.
Comment 6 Ed Morley [:emorley] 2011-11-04 03:06:23 PDT
https://hg.mozilla.org/mozilla-central/rev/ce40bde00ef8

Note You need to log in before you can comment on or make changes to this bug.