Closed Bug 503669 Opened 15 years ago Closed 15 years ago

TM: Make js_ValueToStringId inline using jsatom-inl.h

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: gal, Assigned: gal)

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(1 file, 2 obsolete files)

In a microbenchmark that goes in a circle and sets the same property over and over, we spend about 2.5% of our time entering and leaving js_ValueToStringId, which has a quick fast path otherwise.

This patch makes it inline, but to solve the dependency hell (jsatom + jsstr), I had to push the inlines into a separate file. I would like to do this for a bunch of other things. What do people think?
Attached patch patch (obsolete) — Splinter Review
Asking for Brendan's review. This changes the source structure somewhat.
Assignee: general → gal
Attachment #388067 - Flags: review?(brendan)
Attached patch and the right patch this time (obsolete) — Splinter Review
Attachment #388067 - Attachment is obsolete: true
Attachment #388068 - Flags: review?(brendan)
Attachment #388067 - Flags: review?(brendan)
Suggest a standard (until we rename all files) other than -inl suffixing, based on existing convention: jsfooinlines.h for jsfoo.h's inlines that need to include as if they were .cpp files. Long-ish but it gets the point across without ugly -cybercrud.

/be
Attached patch patchSplinter Review
Attachment #388068 - Attachment is obsolete: true
Attachment #388303 - Flags: review?(jwalden+bmo)
Attachment #388068 - Flags: review?(brendan)
Comment on attachment 388303 [details] [diff] [review]
patch

>diff --git a/js/src/jsatominlines.h b/js/src/jsatominlines.h

>+JS_BEGIN_EXTERN_C
>+JS_END_EXTERN_C

I don't think these are necessary, certainly not for SpiderMonkey-internal methods.  Other than that all cool.
Attachment #388303 - Flags: review?(jwalden+bmo) → review+
http://hg.mozilla.org/tracemonkey/rev/c4b5d3e7a8fa
Whiteboard: fixed-in-tracemonkey
http://hg.mozilla.org/mozilla-central/rev/c4b5d3e7a8fa
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: