TM: rename js_Unbox{Double,Int32}

RESOLVED FIXED

Status

()

Core
JavaScript Engine
RESOLVED FIXED
7 years ago
6 years ago

People

(Reporter: njn, Assigned: njn)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(1 attachment)

(Assignee)

Description

7 years ago
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.
(Assignee)

Comment 1

7 years ago
This should be done after fatvals land.
Depends on: 549143
(Assignee)

Comment 2

7 years ago
Created attachment 516777 [details] [diff] [review]
patch (against 63013:17273c2c0eda)

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)
(Assignee)

Updated

7 years ago
Summary: TM: rename js_Unbox{Double,Int32}, js_TryUnboxInt32 → TM: rename js_Unbox{Double,Int32}
(Assignee)

Comment 3

6 years ago
Review ping!

Comment 4

6 years ago
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+
(Assignee)

Comment 5

6 years ago
http://hg.mozilla.org/tracemonkey/rev/ca707cda5df0
Whiteboard: fixed-in-tracemonkey
cdleary-bot mozilla-central merge info:
http://hg.mozilla.org/mozilla-central/rev/ca707cda5df0
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.