Last Comment Bug 576175 - TM: rename js_Unbox{Double,Int32}
: TM: rename js_Unbox{Double,Int32}
Status: RESOLVED FIXED
fixed-in-tracemonkey
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: x86 Mac OS X
: -- normal (vote)
: ---
Assigned To: Nicholas Nethercote [:njn]
:
: Jason Orendorff [:jorendorff]
Mentors:
Depends on: fatvals
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-30 19:49 PDT by Nicholas Nethercote [:njn]
Modified: 2011-05-23 14:13 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (against 63013:17273c2c0eda) (7.12 KB, patch)
2011-03-03 18:58 PST, Nicholas Nethercote [:njn]
luke: review+
Details | Diff | Splinter Review

Description Nicholas Nethercote [:njn] 2010-06-30 19:49:08 PDT
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.
Comment 1 Nicholas Nethercote [:njn] 2010-06-30 19:55:59 PDT
This should be done after fatvals land.
Comment 2 Nicholas Nethercote [:njn] 2011-03-03 18:58:34 PST
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.
Comment 3 Nicholas Nethercote [:njn] 2011-03-16 16:38:44 PDT
Review ping!
Comment 4 Luke Wagner [:luke] 2011-03-29 16:34:54 PDT
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.
Comment 5 Nicholas Nethercote [:njn] 2011-05-19 17:23:08 PDT
http://hg.mozilla.org/tracemonkey/rev/ca707cda5df0
Comment 6 Chris Leary [:cdleary] (not checking bugmail) 2011-05-23 14:13:43 PDT
cdleary-bot mozilla-central merge info:
http://hg.mozilla.org/mozilla-central/rev/ca707cda5df0

Note You need to log in before you can comment on or make changes to this bug.