CSS JIT: Fix build error raised when CSS_SELECTOR_JIT_DEBUGGING is 1
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 May 2014 00:19:17 +0000 (00:19 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 May 2014 00:19:17 +0000 (00:19 +0000)
https://bugs.webkit.org/show_bug.cgi?id=133266

Patch by Yusuke Suzuki <utatane.tea@gmail.com> on 2014-05-26
Reviewed by Benjamin Poulain.

When CSS_SELECTOR_JIT_DEBUGGING is 1, build erros occur on x86_64.

* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::SelectorCodeGenerator::generatePrologue):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateEpilogue):

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

Source/WebCore/ChangeLog
Source/WebCore/cssjit/SelectorCompiler.cpp

index 5164c99..ba33d2e 100644 (file)
@@ -1,3 +1,16 @@
+2014-05-26  Yusuke Suzuki  <utatane.tea@gmail.com>
+
+        CSS JIT: Fix build error raised when CSS_SELECTOR_JIT_DEBUGGING is 1
+        https://bugs.webkit.org/show_bug.cgi?id=133266
+
+        Reviewed by Benjamin Poulain.
+
+        When CSS_SELECTOR_JIT_DEBUGGING is 1, build erros occur on x86_64.
+
+        * cssjit/SelectorCompiler.cpp:
+        (WebCore::SelectorCompiler::SelectorCodeGenerator::generatePrologue):
+        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateEpilogue):
+
 2014-05-26  Benjamin Poulain  <benjamin@webkit.org>
 
         Fix the quirks mode selector matching of the pseudo classes :hover and :active
index 324177b..d3c03f7 100644 (file)
@@ -45,6 +45,7 @@
 #include "SelectorCheckerTestFunctions.h"
 #include "StackAllocator.h"
 #include "StyledElement.h"
+#include <JavaScriptCore/GPRInfo.h>
 #include <JavaScriptCore/LinkBuffer.h>
 #include <JavaScriptCore/MacroAssembler.h>
 #include <JavaScriptCore/VM.h>
@@ -174,9 +175,10 @@ public:
     SelectorCompilationStatus compile(JSC::VM*, JSC::MacroAssemblerCodeRef&);
 
 private:
-    static const Assembler::RegisterID returnRegister = JSC::GPRInfo::returnValueGPR;
-    static const Assembler::RegisterID elementAddressRegister = JSC::GPRInfo::argumentGPR0;
-    static const Assembler::RegisterID checkingContextRegister = JSC::GPRInfo::argumentGPR1;
+    static const Assembler::RegisterID returnRegister;
+    static const Assembler::RegisterID elementAddressRegister;
+    static const Assembler::RegisterID checkingContextRegister;
+    static const Assembler::RegisterID callFrameRegister;
 
     void computeBacktrackingInformation();
     void generateSelectorChecker();
@@ -259,6 +261,11 @@ private:
 #endif
 };
 
+const Assembler::RegisterID SelectorCodeGenerator::returnRegister = JSC::GPRInfo::returnValueGPR;
+const Assembler::RegisterID SelectorCodeGenerator::elementAddressRegister = JSC::GPRInfo::argumentGPR0;
+const Assembler::RegisterID SelectorCodeGenerator::checkingContextRegister = JSC::GPRInfo::argumentGPR1;
+const Assembler::RegisterID SelectorCodeGenerator::callFrameRegister = JSC::GPRInfo::callFrameRegister;
+
 SelectorCompilationStatus compileSelector(const CSSSelector* lastSelector, JSC::VM* vm, SelectorContext selectorContext, JSC::MacroAssemblerCodeRef& codeRef)
 {
     if (!vm->canUseJIT())
@@ -939,7 +946,7 @@ inline bool SelectorCodeGenerator::generatePrologue()
     return true;
 #elif CPU(X86_64) && CSS_SELECTOR_JIT_DEBUGGING
     Vector<JSC::MacroAssembler::RegisterID, 1> prologueRegister;
-    prologueRegister.append(GPRInfo::callFrameRegister);
+    prologueRegister.append(callFrameRegister);
     m_prologueStackReferences = m_stackAllocator.push(prologueRegister);
     return true;
 #endif
@@ -955,7 +962,7 @@ inline void SelectorCodeGenerator::generateEpilogue()
     m_stackAllocator.pop(m_prologueStackReferences, prologueRegisters);
 #elif CPU(X86_64) && CSS_SELECTOR_JIT_DEBUGGING
     Vector<JSC::MacroAssembler::RegisterID, 1> prologueRegister;
-    prologueRegister.append(GPRInfo::callFrameRegister);
+    prologueRegister.append(callFrameRegister);
     m_stackAllocator.pop(m_prologueStackReferences, prologueRegister);
 #endif
 }