WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
39972
Fix style errors of dtoa
https://bugs.webkit.org/show_bug.cgi?id=39972
Summary
Fix style errors of dtoa
Kent Tamura
Reported
2010-05-31 16:13:35 PDT
Fix style errors of dtoa
Attachments
Patch
(23.13 KB, patch)
2010-05-31 16:15 PDT
,
Kent Tamura
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Kent Tamura
Comment 1
2010-05-31 16:15:46 PDT
Created
attachment 57498
[details]
Patch
Shinichiro Hamaji
Comment 2
2010-05-31 22:48:10 PDT
Comment on
attachment 57498
[details]
Patch JavaScriptCore/wtf/dtoa.cpp:210 + static ALWAYS_INLINE uint32_t* storeInc(uint32_t* p, uint16_t high, uint16_t low) I think this is a refactoring rather than a style fix. I guess we can remove the style error just by adding spaces after commas?
Kent Tamura
Comment 3
2010-05-31 22:53:13 PDT
Thank you for looking at the patch. (In reply to
comment #2
)
> (From update of
attachment 57498
[details]
) > JavaScriptCore/wtf/dtoa.cpp:210 > + static ALWAYS_INLINE uint32_t* storeInc(uint32_t* p, uint16_t high, uint16_t low) > I think this is a refactoring rather than a style fix. I guess we can remove the style error just by adding spaces after commas?
It's also a style fix though check-webkit-style doesn't complain it.
http://webkit.org/coding/coding-style.html
> 11. Prefer const to #define. Prefer inline functions to macros.
Shinichiro Hamaji
Comment 4
2010-06-01 01:09:56 PDT
> It's also a style fix though check-webkit-style doesn't complain it. > >
http://webkit.org/coding/coding-style.html
> > 11. Prefer const to #define. Prefer inline functions to macros.
I see. So, we should fix rounded_product and rounded_quotient as well? I guess we can use reference if there are no performance regression (I'm guessing the compiler is clever enough)? static ALWAYS_INLINE void storeInc(uint32_t*& p, uint16_t high, uint16_t low) { // ... p++; }
Kent Tamura
Comment 5
2010-06-01 01:24:29 PDT
(In reply to
comment #4
)
> I see. So, we should fix rounded_product and rounded_quotient as well?
Yes, we should. But I didn't change them because I thought they could be member functions of type U.
> I guess we can use reference if there are no performance regression (I'm guessing the compiler is clever enough)? > > static ALWAYS_INLINE void storeInc(uint32_t*& p, uint16_t high, uint16_t low) > { > // ... > p++; > }
I don't like to change to the reference unless you have a strong objection. I believe returning updated pointer has better code readability.
Shinichiro Hamaji
Comment 6
2010-06-01 01:30:02 PDT
Comment on
attachment 57498
[details]
Patch
> I don't like to change to the reference unless you have a strong objection. I believe returning updated pointer has better code readability.
Hmm I slightly prefer the reference so that we won't forget to assign the return value, but it's not a strong objection. Please feel free to land this patch as is.
WebKit Commit Bot
Comment 7
2010-06-01 01:57:51 PDT
Comment on
attachment 57498
[details]
Patch Clearing flags on attachment: 57498 Committed
r60468
: <
http://trac.webkit.org/changeset/60468
>
WebKit Commit Bot
Comment 8
2010-06-01 01:57:57 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug