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

RESOLVED FIXED in mozilla24

Status

()

Core
DOM
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: bz, Assigned: bz)

Tracking

unspecified
mozilla24
x86
Mac OS X
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Comment hidden (empty)
Created 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.

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
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.