Fix style errors of dtoa
Created attachment 57498 [details] Patch
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?
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.
> 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++; }
(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.
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.
Comment on attachment 57498 [details] Patch Clearing flags on attachment: 57498 Committed r60468: <http://trac.webkit.org/changeset/60468>
All reviewed patches have been landed. Closing bug.