[JSC] Build fix for FTL on EFL after ftlopt merge
authordbatyai.u-szeged@partner.samsung.com <dbatyai.u-szeged@partner.samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Aug 2014 15:44:57 +0000 (15:44 +0000)
committerdbatyai.u-szeged@partner.samsung.com <dbatyai.u-szeged@partner.samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Aug 2014 15:44:57 +0000 (15:44 +0000)
https://bugs.webkit.org/show_bug.cgi?id=135565

Reviewed by Mark Lam.

Source/JavaScriptCore:

Adding an enable guard for native inlining, since it now requires the bitcode
emitted from Clang, and we don't have a good way of creating it from other compilers.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleCall):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNode):
* ftl/FTLState.cpp:
(JSC::FTL::State::State):
* ftl/FTLState.h:

Source/WTF:

Added ENABLE(FTL_NATIVE_CALL_INLINING).

* wtf/Platform.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@172149 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp
Source/JavaScriptCore/ftl/FTLState.cpp
Source/JavaScriptCore/ftl/FTLState.h
Source/WTF/ChangeLog
Source/WTF/wtf/Platform.h

index bbb1090..68aca77 100644 (file)
@@ -1,3 +1,21 @@
+2014-08-06  Dániel Bátyai  <dbatyai.u-szeged@partner.samsung.com>
+
+        [JSC] Build fix for FTL on EFL after ftlopt merge
+        https://bugs.webkit.org/show_bug.cgi?id=135565
+
+        Reviewed by Mark Lam.
+
+        Adding an enable guard for native inlining, since it now requires the bitcode
+        emitted from Clang, and we don't have a good way of creating it from other compilers.
+
+        * dfg/DFGByteCodeParser.cpp:
+        (JSC::DFG::ByteCodeParser::handleCall):
+        * ftl/FTLLowerDFGToLLVM.cpp:
+        (JSC::FTL::LowerDFGToLLVM::compileNode):
+        * ftl/FTLState.cpp:
+        (JSC::FTL::State::State):
+        * ftl/FTLState.h:
+
 2014-08-05  Csaba Osztrogonác  <ossy@webkit.org>
 
         URTBF after r172129. (ftlopt branch merge)
index 8d9dae8..13c03f8 100644 (file)
@@ -1067,6 +1067,7 @@ void ByteCodeParser::handleCall(
         if (m_graph.compilation())
             m_graph.compilation()->noticeInlinedCall();
         return;
+#if ENABLE(FTL_NATIVE_CALL_INLINING)
     } else if (isFTL(m_graph.m_plan.mode) && Options::optimizeNativeCalls()) {
         JSFunction* function = callLinkStatus.function();
         if (function && function->isHostFunction()) {
@@ -1080,6 +1081,7 @@ void ByteCodeParser::handleCall(
                 op = NativeConstruct;
             }
         }
+#endif
     }
     Node* call = addCall(result, op, callTarget, argumentCountIncludingThis, registerOffset, prediction);
 
index 5d25599..68aa7cd 100644 (file)
@@ -28,7 +28,6 @@
 
 #if ENABLE(FTL_JIT)
 
-#include "BundlePath.h"
 #include "CodeBlockWithJITType.h"
 #include "DFGAbstractInterpreterInlines.h"
 #include "DFGInPlaceAbstractState.h"
 #include <llvm/InitializeLLVM.h>
 #include <wtf/ProcessID.h>
 
+#if ENABLE(FTL_NATIVE_CALL_INLINING)
+#include "BundlePath.h"
+#endif
+
 namespace JSC { namespace FTL {
 
 using namespace DFG;
@@ -631,10 +634,12 @@ private:
         case Construct:
             compileCallOrConstruct();
             break;
+#if ENABLE(FTL_NATIVE_CALL_INLINING)
         case NativeCall:
         case NativeConstruct:
             compileNativeCallOrConstruct();
             break;
+#endif
         case Jump:
             compileJump();
             break;
@@ -3630,7 +3635,7 @@ private:
     {
         setBoolean(m_out.bitNot(boolify(m_node->child1())));
     }
-
+#if ENABLE(FTL_NATIVE_CALL_INLINING)
     void compileNativeCallOrConstruct() 
     {
         int dummyThisArgument = m_node->op() == NativeCall ? 0 : 1;
@@ -3684,6 +3689,7 @@ private:
 
         setJSValue(call);
     }
+#endif
 
     void compileCallOrConstruct()
     {
@@ -4096,6 +4102,7 @@ private:
 #endif
     }
     
+#if ENABLE(FTL_NATIVE_CALL_INLINING)
     LValue getFunctionBySymbol(const CString symbol)
     {
         if (!m_ftlState.symbolTable.contains(symbol)) 
@@ -4195,6 +4202,7 @@ private:
         m_ftlState.nativeLoadedLibraries.add(path);
         return true;
     }
+#endif
 
     bool isInlinableSize(LValue function)
     {
index 92fe30b..0b5fd64 100644 (file)
 #include "FTLForOSREntryJITCode.h"
 #include "FTLJITCode.h"
 #include "FTLJITFinalizer.h"
-#include "InlineRuntimeSymbolTable.h"
 #include <llvm/InitializeLLVM.h>
 #include <stdio.h>
 
+#if ENABLE(FTL_NATIVE_CALL_INLINING)
+#include "InlineRuntimeSymbolTable.h"
+#endif
+
 namespace JSC { namespace FTL {
 
 using namespace DFG;
@@ -50,10 +53,12 @@ State::State(Graph& graph)
     , compactUnwindSize(0)
 {
 
+#if ENABLE(FTL_NATIVE_CALL_INLINING)
 #define SYMBOL_TABLE_ADD(symbol, file) \
     symbolTable.fastAdd(symbol, file);
     FOR_EACH_LIBRARY_SYMBOL(SYMBOL_TABLE_ADD)
 #undef SYMBOL_TABLE_ADD
+#endif
     
     switch (graph.m_plan.mode) {
     case FTLMode: {
index f21c952..8662d63 100644 (file)
@@ -84,7 +84,10 @@ public:
     void dumpState(const char* when);
 
     HashSet<CString> nativeLoadedLibraries;
+
+#if ENABLE(FTL_NATIVE_CALL_INLINING)
     HashMap<CString, CString> symbolTable;
+#endif
 };
 
 } } // namespace JSC::FTL
index 5eee943..d40b991 100644 (file)
@@ -1,3 +1,14 @@
+2014-08-06  Dániel Bátyai  <dbatyai.u-szeged@partner.samsung.com>
+
+        [JSC] Build fix for FTL on EFL after ftlopt merge
+        https://bugs.webkit.org/show_bug.cgi?id=135565
+
+        Reviewed by Mark Lam.
+
+        Added ENABLE(FTL_NATIVE_CALL_INLINING).
+
+        * wtf/Platform.h:
+
 2014-08-04  Alex Christensen  <achristensen@webkit.org>
 
         Progress towards CMake on Mac.
index e6d6b04..41ce4be 100644 (file)
 #define ENABLE_FTL_JIT 0
 #endif
 
+#if !defined(ENABLE_FTL_NATIVE_CALL_INLINING)
+#if COMPILER(CLANG)
+#define ENABLE_FTL_NATIVE_CALL_INLINING 1
+#else
+#define ENABLE_FTL_NATIVE_CALL_INLINING 0
+#endif // COMPILER(CLANG)
+#endif // !defined(ENABLE_FTL_NATIVE_CALL_INLINING)
 
 /* Generational collector for JSC */
 #if !defined(ENABLE_GGC)