Ignore:
Timestamp:
Jan 14, 2017, 11:35:23 AM (9 years ago)
Author:
Yusuke Suzuki
Message:

WebAssembly: Suppress warnings & errors in GCC
https://bugs.webkit.org/show_bug.cgi?id=167049

Reviewed by Sam Weinig.

Source/JavaScriptCore:

  • wasm/WasmFunctionParser.h:

Add missing { } after the switch. Ideally, it is not necessary.
But in GCC, it is required. Since this function is fairly large,
I think the code generated by this does not cause performance
regression.

  • wasm/WasmPageCount.h:

UINT_MAX is defined in limits.h.

  • wasm/generateWasmValidateInlinesHeader.py:

On the other hand, we use this suppress pragma here to solve the
same problem in wasm/WasmFunctionParser.h. Since the load function
is fairly small, the additional return { }; may generate some
suboptimal code. See bug 150794 for more detail.

Source/WTF:

  • wtf/LEBDecoder.h:

(WTF::LEBDecoder::decodeInt):
If T = int, it performs -1 << shift. It causes
warning in GCC. Instead, we first cast it to the
UnsignedT, perform operation and re-cast to the
T.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/wasm/generateWasmValidateInlinesHeader.py

    r209880 r210769  
    126126#if ENABLE(WEBASSEMBLY)
    127127
     128#include <wtf/StdLibExtras.h>
     129
     130#if COMPILER(GCC) && ASSERT_DISABLED
     131#pragma GCC diagnostic push
     132#pragma GCC diagnostic ignored "-Wreturn-type"
     133#endif // COMPILER(GCC) && ASSERT_DISABLED
     134
    128135namespace JSC { namespace Wasm {
    129136
     
    152159} } // namespace JSC::Wasm
    153160
     161#if COMPILER(GCC) && ASSERT_DISABLED
     162#pragma GCC diagnostic pop
     163#endif // COMPILER(GCC) && ASSERT_DISABLED
     164
    154165#endif // ENABLE(WEBASSEMBLY)
    155166
Note: See TracChangeset for help on using the changeset viewer.