Remedy minor bit rotting in DFGSpeculativeJIT32_64.cpp. JITStubs.cpp has a case for CPU(X86_64) && USE(JSVALUE32_64) which doesn't make sense. Will delete this block of unnecessary code. Also will add some line breaks and update some comments to more clearly delineate between the sections of code in JITStubs.cpp.
Created attachment 200857 [details] the patch.
Comment on attachment 200857 [details] the patch. View in context: https://bugs.webkit.org/attachment.cgi?id=200857&action=review > Source/JavaScriptCore/jit/JITStubs.cpp:312 > -#else // USE(JSVALUE32_64) > +#else // !USE(JSVALUE32_64) > > #if COMPILER(GCC) && CPU(X86_64) > I believe the style in other WebKit code is to annotate a dependent preprocessor macro with the heading for the macro's start. So, in this case, "USE(JSVALUE32_64)" is correct.
(In reply to comment #2) > (From update of attachment 200857 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=200857&action=review > > > Source/JavaScriptCore/jit/JITStubs.cpp:312 > > -#else // USE(JSVALUE32_64) > > +#else // !USE(JSVALUE32_64) > > > > #if COMPILER(GCC) && CPU(X86_64) > > > > I believe the style in other WebKit code is to annotate a dependent preprocessor macro with the heading for the macro's start. So, in this case, "USE(JSVALUE32_64)" is correct. I'll revert this !USE(JSVALUE32_64) change for this commit, but for future reference, what is the right thing to do then when we have a case like the following? #if CPU(x86) ... #elif CPU(X86_64) ... #else // what comment is appropriate here? #endif // whacomment is appropriate here?
Thanks for the review. Landed in r149655: <http://trac.webkit.org/changeset/149655>.
> what is the right thing to do then when we have a case like the following? > > #if CPU(x86) > ... > #elif CPU(X86_64) > ... > #else // what comment is appropriate here? > #endif // whacomment is appropriate here? I don't think we have a clear guideline on this. Thinking about it now, I might choose not to use #elif, and instead: #if CPU(X86) #endif // CPU(X86) #if CPU(X86_64) #endif // CPU(X86_64) #if !CPU(X86) && !CPU(X86_64) #endif // !CPU(X86) && !CPU(X86_64) The phrase "else" is hard to decipher when it flows hundred of lines after an "if", possibly with intervening "#elif".