Title: [205021] trunk
Revision
205021
Author
[email protected]
Date
2016-08-26 09:54:14 -0700 (Fri, 26 Aug 2016)

Log Message

Fix the ENABLE(WEBASSEMBLY) build on Linux
https://bugs.webkit.org/show_bug.cgi?id=161197

Reviewed by Mark Lam.

Source/_javascript_Core:

* CMakeLists.txt:
* b3/B3Common.cpp:
(JSC::B3::shouldDumpIR):
* shell/CMakeLists.txt:
* wasm/JSWASMModule.h:
* wasm/WASMB3IRGenerator.cpp:
(JSC::WASM::toB3Op):
* wasm/WASMB3IRGenerator.h:
* wasm/WASMFormat.h:
* wasm/WASMFunctionParser.h:
* wasm/WASMModuleParser.cpp:
(JSC::WASM::WASMModuleParser::parseFunctionTypes):
* wasm/WASMModuleParser.h:
* wasm/WASMParser.h:
* wasm/WASMPlan.cpp:
* wasm/WASMPlan.h:
* wasm/WASMSections.cpp:

Source/WTF:

* wtf/Platform.h:

Tools:

* Scripts/build-jsc:

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/CMakeLists.txt (205020 => 205021)


--- trunk/Source/_javascript_Core/CMakeLists.txt	2016-08-26 16:50:15 UTC (rev 205020)
+++ trunk/Source/_javascript_Core/CMakeLists.txt	2016-08-26 16:54:14 UTC (rev 205021)
@@ -841,6 +841,10 @@
     tools/JSDollarVMPrototype.cpp
 
     wasm/JSWASMModule.cpp
+    wasm/WASMB3IRGenerator.cpp
+    wasm/WASMModuleParser.cpp
+    wasm/WASMPlan.cpp
+    wasm/WASMSections.cpp
 
     yarr/RegularExpression.cpp
     yarr/YarrCanonicalizeUCS2.cpp

Modified: trunk/Source/_javascript_Core/ChangeLog (205020 => 205021)


--- trunk/Source/_javascript_Core/ChangeLog	2016-08-26 16:50:15 UTC (rev 205020)
+++ trunk/Source/_javascript_Core/ChangeLog	2016-08-26 16:54:14 UTC (rev 205021)
@@ -1,3 +1,28 @@
+2016-08-26  Csaba Osztrogonác  <[email protected]>
+
+        Fix the ENABLE(WEBASSEMBLY) build on Linux
+        https://bugs.webkit.org/show_bug.cgi?id=161197
+
+        Reviewed by Mark Lam.
+
+        * CMakeLists.txt:
+        * b3/B3Common.cpp:
+        (JSC::B3::shouldDumpIR):
+        * shell/CMakeLists.txt:
+        * wasm/JSWASMModule.h:
+        * wasm/WASMB3IRGenerator.cpp:
+        (JSC::WASM::toB3Op):
+        * wasm/WASMB3IRGenerator.h:
+        * wasm/WASMFormat.h:
+        * wasm/WASMFunctionParser.h:
+        * wasm/WASMModuleParser.cpp:
+        (JSC::WASM::WASMModuleParser::parseFunctionTypes):
+        * wasm/WASMModuleParser.h:
+        * wasm/WASMParser.h:
+        * wasm/WASMPlan.cpp:
+        * wasm/WASMPlan.h:
+        * wasm/WASMSections.cpp:
+
 2016-08-26  Per Arne Vollan  <[email protected]>
 
         [Win] Compile fix.

Modified: trunk/Source/_javascript_Core/b3/B3Common.cpp (205020 => 205021)


--- trunk/Source/_javascript_Core/b3/B3Common.cpp	2016-08-26 16:50:15 UTC (rev 205020)
+++ trunk/Source/_javascript_Core/b3/B3Common.cpp	2016-08-26 16:54:14 UTC (rev 205021)
@@ -36,7 +36,11 @@
 
 bool shouldDumpIR(B3ComplitationMode mode)
 {
+#if ENABLE(FTL_JIT)
     return FTL::verboseCompilationEnabled() || FTL::shouldDumpDisassembly() || shouldDumpIRAtEachPhase(mode);
+#else
+    return shouldDumpIRAtEachPhase(mode);
+#endif
 }
 
 bool shouldDumpIRAtEachPhase(B3ComplitationMode mode)

Modified: trunk/Source/_javascript_Core/shell/CMakeLists.txt (205020 => 205021)


--- trunk/Source/_javascript_Core/shell/CMakeLists.txt	2016-08-26 16:50:15 UTC (rev 205020)
+++ trunk/Source/_javascript_Core/shell/CMakeLists.txt	2016-08-26 16:54:14 UTC (rev 205021)
@@ -49,6 +49,10 @@
         ../b3/air/testair.cpp
     )
 
+    set(TESTWASM_SOURCES
+        ../testWASM.cpp
+    )
+
     add_executable(testb3 ${TESTB3_SOURCES})
     target_link_libraries(testb3 ${JSC_LIBRARIES})
 
@@ -55,4 +59,7 @@
     add_executable(testair ${TESTAIR_SOURCES})
     target_link_libraries(testair ${JSC_LIBRARIES})
 
+    add_executable(testWASM ${TESTWASM_SOURCES})
+    target_link_libraries(testWASM ${JSC_LIBRARIES})
+
 endif ()

Modified: trunk/Source/_javascript_Core/wasm/JSWASMModule.h (205020 => 205021)


--- trunk/Source/_javascript_Core/wasm/JSWASMModule.h	2016-08-26 16:50:15 UTC (rev 205020)
+++ trunk/Source/_javascript_Core/wasm/JSWASMModule.h	2016-08-26 16:54:14 UTC (rev 205021)
@@ -23,8 +23,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#ifndef JSWASMModule_h
-#define JSWASMModule_h
+#pragma once
 
 #if ENABLE(WEBASSEMBLY)
 
@@ -114,5 +113,3 @@
 } // namespace JSC
 
 #endif // ENABLE(WEBASSEMBLY)
-
-#endif // JSWASMModule_h

Modified: trunk/Source/_javascript_Core/wasm/WASMB3IRGenerator.cpp (205020 => 205021)


--- trunk/Source/_javascript_Core/wasm/WASMB3IRGenerator.cpp	2016-08-26 16:50:15 UTC (rev 205020)
+++ trunk/Source/_javascript_Core/wasm/WASMB3IRGenerator.cpp	2016-08-26 16:54:14 UTC (rev 205021)
@@ -26,6 +26,8 @@
 #include "config.h"
 #include "WASMB3IRGenerator.h"
 
+#if ENABLE(WEBASSEMBLY)
+
 #include "B3BasicBlockInlines.h"
 #include "B3ValueInlines.h"
 #include "B3Variable.h"
@@ -33,8 +35,6 @@
 #include "WASMFunctionParser.h"
 #include <wtf/Optional.h>
 
-#if ENABLE(WEBASSEMBLY)
-
 namespace JSC {
 
 namespace WASM {
@@ -48,6 +48,7 @@
     FOR_EACH_WASM_BINARY_OP(CREATE_CASE)
 #undef CREATE_CASE
     }
+    RELEASE_ASSERT_NOT_REACHED();
 }
 
 inline B3::Opcode toB3Op(WASMUnaryOpType op)
@@ -57,6 +58,7 @@
     FOR_EACH_WASM_UNARY_OP(CREATE_CASE)
 #undef CREATE_CASE
     }
+    RELEASE_ASSERT_NOT_REACHED();
 }
 
 class B3IRGenerator {

Modified: trunk/Source/_javascript_Core/wasm/WASMB3IRGenerator.h (205020 => 205021)


--- trunk/Source/_javascript_Core/wasm/WASMB3IRGenerator.h	2016-08-26 16:50:15 UTC (rev 205020)
+++ trunk/Source/_javascript_Core/wasm/WASMB3IRGenerator.h	2016-08-26 16:54:14 UTC (rev 205021)
@@ -25,12 +25,12 @@
 
 #pragma once
 
+#if ENABLE(WEBASSEMBLY)
+
 #include "B3Compilation.h"
 #include "VM.h"
 #include "WASMFormat.h"
 
-#if ENABLE(WEBASSEMBLY)
-
 namespace JSC {
 
 namespace WASM {

Modified: trunk/Source/_javascript_Core/wasm/WASMFormat.h (205020 => 205021)


--- trunk/Source/_javascript_Core/wasm/WASMFormat.h	2016-08-26 16:50:15 UTC (rev 205020)
+++ trunk/Source/_javascript_Core/wasm/WASMFormat.h	2016-08-26 16:54:14 UTC (rev 205021)
@@ -40,8 +40,7 @@
  * limitations under the License.
  */
 
-#ifndef WASMFormat_h
-#define WASMFormat_h
+#pragma once
 
 #if ENABLE(WEBASSEMBLY)
 
@@ -101,5 +100,3 @@
 } // namespace JSC
 
 #endif // ENABLE(WEBASSEMBLY)
-
-#endif // WASMFormat_h

Modified: trunk/Source/_javascript_Core/wasm/WASMFunctionParser.h (205020 => 205021)


--- trunk/Source/_javascript_Core/wasm/WASMFunctionParser.h	2016-08-26 16:50:15 UTC (rev 205020)
+++ trunk/Source/_javascript_Core/wasm/WASMFunctionParser.h	2016-08-26 16:54:14 UTC (rev 205021)
@@ -25,11 +25,11 @@
 
 #pragma once
 
+#if ENABLE(WEBASSEMBLY)
+
 #include "WASMParser.h"
 #include <wtf/DataLog.h>
 
-#if ENABLE(WEBASSEMBLY)
-
 namespace JSC {
 
 namespace WASM {

Modified: trunk/Source/_javascript_Core/wasm/WASMModuleParser.cpp (205020 => 205021)


--- trunk/Source/_javascript_Core/wasm/WASMModuleParser.cpp	2016-08-26 16:50:15 UTC (rev 205020)
+++ trunk/Source/_javascript_Core/wasm/WASMModuleParser.cpp	2016-08-26 16:54:14 UTC (rev 205021)
@@ -26,12 +26,12 @@
 #include "config.h"
 #include "WASMModuleParser.h"
 
+#if ENABLE(WEBASSEMBLY)
+
 #include "WASMFormat.h"
 #include "WASMOps.h"
 #include "WASMSections.h"
 
-#if ENABLE(WEBASSEMBLY)
-
 namespace JSC {
 
 namespace WASM {
@@ -180,6 +180,7 @@
             returnType = WASMFunctionReturnType::Void;
 
         // TODO: Actually do something with this data...
+        UNUSED_PARAM(returnType);
     }
     return true;
 }

Modified: trunk/Source/_javascript_Core/wasm/WASMModuleParser.h (205020 => 205021)


--- trunk/Source/_javascript_Core/wasm/WASMModuleParser.h	2016-08-26 16:50:15 UTC (rev 205020)
+++ trunk/Source/_javascript_Core/wasm/WASMModuleParser.h	2016-08-26 16:54:14 UTC (rev 205021)
@@ -25,12 +25,12 @@
 
 #pragma once
 
+#if ENABLE(WEBASSEMBLY)
+
 #include "WASMOps.h"
 #include "WASMParser.h"
 #include <wtf/Vector.h>
 
-#if ENABLE(WEBASSEMBLY)
-
 namespace JSC {
 
 namespace WASM {

Modified: trunk/Source/_javascript_Core/wasm/WASMParser.h (205020 => 205021)


--- trunk/Source/_javascript_Core/wasm/WASMParser.h	2016-08-26 16:50:15 UTC (rev 205020)
+++ trunk/Source/_javascript_Core/wasm/WASMParser.h	2016-08-26 16:54:14 UTC (rev 205021)
@@ -25,6 +25,8 @@
 
 #pragma once
 
+#if ENABLE(WEBASSEMBLY)
+
 #include "B3Compilation.h"
 #include "B3Procedure.h"
 #include "WASMFormat.h"
@@ -32,8 +34,6 @@
 #include "WASMSections.h"
 #include <wtf/LEBDecoder.h>
 
-#if ENABLE(WEBASSEMBLY)
-
 namespace JSC {
 
 namespace WASM {

Modified: trunk/Source/_javascript_Core/wasm/WASMPlan.cpp (205020 => 205021)


--- trunk/Source/_javascript_Core/wasm/WASMPlan.cpp	2016-08-26 16:50:15 UTC (rev 205020)
+++ trunk/Source/_javascript_Core/wasm/WASMPlan.cpp	2016-08-26 16:54:14 UTC (rev 205021)
@@ -26,13 +26,13 @@
 #include "config.h"
 #include "WASMPlan.h"
 
+#if ENABLE(WEBASSEMBLY)
+
 #include "B3Compilation.h"
 #include "WASMB3IRGenerator.h"
 #include "WASMModuleParser.h"
 #include <wtf/DataLog.h>
 
-#if ENABLE(WEBASSEMBLY)
-
 namespace JSC {
 
 namespace WASM {

Modified: trunk/Source/_javascript_Core/wasm/WASMPlan.h (205020 => 205021)


--- trunk/Source/_javascript_Core/wasm/WASMPlan.h	2016-08-26 16:50:15 UTC (rev 205020)
+++ trunk/Source/_javascript_Core/wasm/WASMPlan.h	2016-08-26 16:54:14 UTC (rev 205021)
@@ -25,13 +25,13 @@
 
 #pragma once
 
+#if ENABLE(WEBASSEMBLY)
+
 #include "CompilationResult.h"
 #include "VM.h"
 #include <wtf/ThreadSafeRefCounted.h>
 #include <wtf/Vector.h>
 
-#if ENABLE(WEBASSEMBLY)
-
 namespace JSC {
 
 namespace B3 {

Modified: trunk/Source/_javascript_Core/wasm/WASMSections.cpp (205020 => 205021)


--- trunk/Source/_javascript_Core/wasm/WASMSections.cpp	2016-08-26 16:50:15 UTC (rev 205020)
+++ trunk/Source/_javascript_Core/wasm/WASMSections.cpp	2016-08-26 16:54:14 UTC (rev 205021)
@@ -26,11 +26,11 @@
 #include "config.h"
 #include "WASMSections.h"
 
+#if ENABLE(WEBASSEMBLY)
+
 #include <wtf/DataLog.h>
 #include <wtf/text/WTFString.h>
 
-#if ENABLE(WEBASSEMBLY)
-
 namespace JSC {
 
 namespace WASM {

Modified: trunk/Source/WTF/ChangeLog (205020 => 205021)


--- trunk/Source/WTF/ChangeLog	2016-08-26 16:50:15 UTC (rev 205020)
+++ trunk/Source/WTF/ChangeLog	2016-08-26 16:54:14 UTC (rev 205021)
@@ -1,3 +1,12 @@
+2016-08-26  Csaba Osztrogonác  <[email protected]>
+
+        Fix the ENABLE(WEBASSEMBLY) build on Linux
+        https://bugs.webkit.org/show_bug.cgi?id=161197
+
+        Reviewed by Mark Lam.
+
+        * wtf/Platform.h:
+
 2016-08-25  Yusuke Suzuki  <[email protected]>
 
         [DFG][FTL] Implement ES6 Generators in DFG / FTL

Modified: trunk/Source/WTF/wtf/Platform.h (205020 => 205021)


--- trunk/Source/WTF/wtf/Platform.h	2016-08-26 16:50:15 UTC (rev 205020)
+++ trunk/Source/WTF/wtf/Platform.h	2016-08-26 16:54:14 UTC (rev 205021)
@@ -774,8 +774,8 @@
 #define ENABLE_CONCURRENT_JIT 1
 #endif
 
-/* This controls whether B3 is built. It will not be used unless FTL_USES_B3 is enabled. */
-#if ENABLE(FTL_JIT)
+/* This controls whether B3 is built. B3 is needed for FTL JIT and WebAssembly */
+#if ENABLE(FTL_JIT) || ENABLE(WEBASSEMBLY)
 #define ENABLE_B3_JIT 1
 #endif
 

Modified: trunk/Tools/ChangeLog (205020 => 205021)


--- trunk/Tools/ChangeLog	2016-08-26 16:50:15 UTC (rev 205020)
+++ trunk/Tools/ChangeLog	2016-08-26 16:54:14 UTC (rev 205021)
@@ -1,3 +1,12 @@
+2016-08-26  Csaba Osztrogonác  <[email protected]>
+
+        Fix the ENABLE(WEBASSEMBLY) build on Linux
+        https://bugs.webkit.org/show_bug.cgi?id=161197
+
+        Reviewed by Mark Lam.
+
+        * Scripts/build-jsc:
+
 2016-08-26  Carlos Alberto Lopez Perez  <[email protected]>
 
         [GTK] run-gtk-tests should use the driver environment for checking the accessibility bus

Modified: trunk/Tools/Scripts/build-jsc (205020 => 205021)


--- trunk/Tools/Scripts/build-jsc	2016-08-26 16:50:15 UTC (rev 205020)
+++ trunk/Tools/Scripts/build-jsc	2016-08-26 16:54:14 UTC (rev 205021)
@@ -108,7 +108,7 @@
     unless (isAnyWindows()) {
         # By default we build using all of the available CPUs
         $makeArgs .= ($makeArgs ? " " : "") . "-j" . numberOfCPUs() if $makeArgs !~ /-j\s*\d+/;
-        $buildTarget = "jsc testb3 testair $makeArgs";
+        $buildTarget = "jsc testb3 testair testWASM $makeArgs";
     } elsif (canUseNinja()) {
         $buildTarget .= "jsc testapi";
     }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to