Closed Bug 872669 Opened 7 years ago Closed 7 years ago

Slightly speed up our named proxy gets by making use of the inline chars/length getters we can have when our id is an atom

Categories

(Core :: DOM: Core & HTML, defect)

x86
macOS
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla24

People

(Reporter: bzbarsky, Assigned: bzbarsky)

Details

Attachments

(1 file)

No description provided.
Jeff, could you look over the jsfriendapi changes?
Attachment #749993 - Flags: review?(peterv)
Attachment #749993 - Flags: review?(jwalden+bmo)
Comment on attachment 749993 [details] [diff] [review]
Slightly speed up our named proxy gets by making use of the inline chars/length getters we can have when our id is an atom.

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

::: js/src/jsfriendapi.h
@@ +539,5 @@
> +inline size_t
> +GetAtomLength(JSAtom *atom)
> +{
> +    return reinterpret_cast<shadow::Atom *>(atom)->lengthAndFlags >>
> +        shadow::Atom::LENGTH_SHIFT;

I think if you had |using shadow::Atom;| here you could fit that all on one line, which seems slightly nice to me.
Attachment #749993 - Flags: review?(jwalden+bmo) → review+
Attachment #749993 - Flags: review?(peterv) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/1de41a52b662 with the change from comment 2.
Flags: in-testsuite-
Whiteboard: [need review]
Target Milestone: --- → mozilla24
https://hg.mozilla.org/mozilla-central/rev/1de41a52b662
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.