[webkit-reviews] review granted: [Bug 136616] Introduce COMPILER_QUIRK(CONSIDERS_UNREACHABLE_CODE) and use it : [Attachment 237761] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Sep 7 18:11:13 PDT 2014


Darin Adler <darin at apple.com> has granted Maciej Stachowiak <mjs at apple.com>'s
request for review:
Bug 136616: Introduce COMPILER_QUIRK(CONSIDERS_UNREACHABLE_CODE) and use it
https://bugs.webkit.org/show_bug.cgi?id=136616

Attachment 237761: Patch
https://bugs.webkit.org/attachment.cgi?id=237761&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=237761&action=review


I find the name of this a bit oblique and even possibly ambiguous.

a) To “consider unreachable code” could be to correctly consider whether code
is unreachable and complain if any such code is included.

b) Or to “consider unreachable code” could be to compile unreachable code, as a
matter of policy or even compiler ignorance, and evaluate the properties of
that code as if it was reachable, warning about missing return statements and
uninitialized variables and such.

I think you mean (b), but I had thought you meant (a).

What’s undeniable is that it is indeed a compiler quirk. And that this name is
long enough that we could revise it with a global replace.

> Source/JavaScriptCore/jsc.cpp:368
> -#if !COMPILER(CLANG) && !COMPILER(MSVC)
> +#if COMPILER_QUIRK(CONSIDERS_UNREACHABLE_CODE)
>	   return true;
>  #endif

We will now compile in this return statement on MSVC; is that an intentional
change?


More information about the webkit-reviews mailing list