Bug 15703

Summary: fix numeric functions -- improve correctness and speed
Product: WebKit Reporter: Darin Adler <darin>
Component: JavaScriptCoreAssignee: Darin Adler <darin>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 523.x (Safari 3)   
Hardware: Mac   
OS: OS X 10.4   
Attachments:
Description Flags
patch with detailed change log mjs: review+

Description Darin Adler 2007-10-25 23:24:43 PDT
I noticed that our toInteger function was not doing what the specification said it should. And that toInt32 wasn't optimizing enough. So I went and optimized both.
Comment 1 Darin Adler 2007-10-26 00:05:35 PDT
Created attachment 16873 [details]
patch with detailed change log
Comment 2 Maciej Stachowiak 2007-10-26 00:33:18 PDT
Comment on attachment 16873 [details]
patch with detailed change log

r=me with one comment:

please consider using trunc(d) instead of copysign(floor(fabs(d))). 

They should do the same thing.
Comment 3 Darin Adler 2007-10-26 01:04:03 PDT
Committed revision 27095.