Closed Bug 480794 Opened 15 years ago Closed 15 years ago

TM: trace index out-of-bounds case of charCodeAt and optimize for integer case

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: gal, Assigned: gal)

Details

(Keywords: fixed1.9.1, Whiteboard: fixed-in-tracemonkey)

Attachments

(1 file, 1 obsolete file)

Most uses of charCodeAt immediately pipe into a math operation, so we can emit a double version to cover the out-of-bounds case (which returns nan), and if we see an integer conversion, we filter to an integer variant.
Attached patch patch (obsolete) — Splinter Review
Assignee: general → gal
Status: NEW → ASSIGNED
Attachment #364745 - Flags: review?(danderson)
Attached patch v2Splinter Review
Attachment #364745 - Attachment is obsolete: true
Attachment #364749 - Flags: review?
Attachment #364745 - Flags: review?(danderson)
Comment on attachment 364749 [details] [diff] [review]
v2

>+/*
>+ * The FuncFilter replaces the generic double version of charCodeAt with the integer fast path
>+ * if appriopriate.

Typo'ed last word -- also, prettier if wrapped around column 80.

/be
Didn't see the nit in time. Will fix separately if the patch sticks.

http://hg.mozilla.org/tracemonkey/rev/a0d1d121351f
Whiteboard: fixed-in-tracemonkey
http://hg.mozilla.org/mozilla-central/rev/a0d1d121351f
Status: ASSIGNED → 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: