Closed Bug 576175 Opened 14 years ago Closed 13 years ago

TM: rename js_Unbox{Double,Int32}

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: n.nethercote, Assigned: n.nethercote)

References

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(1 file)

I hate these names.  I always have to look at the prototypes to remember what these functions do.

Suggested new names:  js_UnboxNumberAsDouble, js_UnboxNumberAsInt32, js_TryUnboxNumberAsInt32.

(js_BoxDouble and js_BoxInt32 are fine as is, however.)

It would also be sensible to add assertions to js_Unbox{Double,Int32} to check that the given jsval really is a number.
This should be done after fatvals land.
Depends on: fatvals
Fatvals landed a while ago.

js_TryUnboxInt32 no longer exists, so this patch just renames js_Unbox{Double,Int32} and adds assertions to them.
Attachment #516777 - Flags: review?(luke)
Summary: TM: rename js_Unbox{Double,Int32}, js_TryUnboxInt32 → TM: rename js_Unbox{Double,Int32}
Review ping!
Comment on attachment 516777 [details] [diff] [review]
patch (against 63013:17273c2c0eda)

Sorry for the late review; I managed to miss both the request and the ping.
Attachment #516777 - Flags: review?(luke) → review+
http://hg.mozilla.org/tracemonkey/rev/ca707cda5df0
Whiteboard: fixed-in-tracemonkey
Status: ASSIGNED → RESOLVED
Closed: 13 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: