Title: [180266] trunk/Source/WebCore
Revision
180266
Author
commit-qu...@webkit.org
Date
2015-02-18 09:08:46 -0800 (Wed, 18 Feb 2015)

Log Message

Unreviewed, rolling out r180260.
https://bugs.webkit.org/show_bug.cgi?id=141757

Broke the 32-bit builders (Requested by jessieberlin on
#webkit).

Reverted changeset:

"Add a trivial code generator for the DFA"
https://bugs.webkit.org/show_bug.cgi?id=141017
http://trac.webkit.org/changeset/180260

Modified Paths

Removed Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (180265 => 180266)


--- trunk/Source/WebCore/ChangeLog	2015-02-18 16:31:15 UTC (rev 180265)
+++ trunk/Source/WebCore/ChangeLog	2015-02-18 17:08:46 UTC (rev 180266)
@@ -1,3 +1,17 @@
+2015-02-18  Commit Queue  <commit-qu...@webkit.org>
+
+        Unreviewed, rolling out r180260.
+        https://bugs.webkit.org/show_bug.cgi?id=141757
+
+        Broke the 32-bit builders (Requested by jessieberlin on
+        #webkit).
+
+        Reverted changeset:
+
+        "Add a trivial code generator for the DFA"
+        https://bugs.webkit.org/show_bug.cgi?id=141017
+        http://trac.webkit.org/changeset/180260
+
 2015-02-17  Anders Carlsson  <ander...@apple.com>
 
         Add API for clearing in-memory caches to WKWebsiteDataStore

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (180265 => 180266)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2015-02-18 16:31:15 UTC (rev 180265)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2015-02-18 17:08:46 UTC (rev 180266)
@@ -1029,8 +1029,6 @@
 		26C15CF71857E15E00F15C03 /* ResourceHandleCFURLConnectionDelegateWithOperationQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 26C15CF51857E15D00F15C03 /* ResourceHandleCFURLConnectionDelegateWithOperationQueue.h */; };
 		26C17A3E1491D2D400D12BA2 /* FileSystemIOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 26C17A3C1491D2D400D12BA2 /* FileSystemIOS.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		26C17A3F1491D2D400D12BA2 /* FileSystemIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 26C17A3D1491D2D400D12BA2 /* FileSystemIOS.mm */; };
-		26C560D31A783EBB008682E4 /* DFACompiler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26C560D11A783EBB008682E4 /* DFACompiler.cpp */; };
-		26C560D41A783EBB008682E4 /* DFACompiler.h in Headers */ = {isa = PBXBuildFile; fileRef = 26C560D21A783EBB008682E4 /* DFACompiler.h */; };
 		26E98A10130A9FCA008EB7B2 /* TextCodecASCIIFastPath.h in Headers */ = {isa = PBXBuildFile; fileRef = 26E98A0F130A9FCA008EB7B2 /* TextCodecASCIIFastPath.h */; };
 		26F0C8971A2E724B002794F8 /* ContentExtensionsManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26F0C8951A2E724B002794F8 /* ContentExtensionsManager.cpp */; };
 		26F0C8981A2E724B002794F8 /* ContentExtensionsManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 26F0C8961A2E724B002794F8 /* ContentExtensionsManager.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -8055,8 +8053,6 @@
 		26C15CF51857E15D00F15C03 /* ResourceHandleCFURLConnectionDelegateWithOperationQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResourceHandleCFURLConnectionDelegateWithOperationQueue.h; sourceTree = "<group>"; };
 		26C17A3C1491D2D400D12BA2 /* FileSystemIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileSystemIOS.h; path = ios/FileSystemIOS.h; sourceTree = "<group>"; };
 		26C17A3D1491D2D400D12BA2 /* FileSystemIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = FileSystemIOS.mm; path = ios/FileSystemIOS.mm; sourceTree = "<group>"; };
-		26C560D11A783EBB008682E4 /* DFACompiler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DFACompiler.cpp; sourceTree = "<group>"; };
-		26C560D21A783EBB008682E4 /* DFACompiler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DFACompiler.h; sourceTree = "<group>"; };
 		26E98A0F130A9FCA008EB7B2 /* TextCodecASCIIFastPath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextCodecASCIIFastPath.h; sourceTree = "<group>"; };
 		26F0C8951A2E724B002794F8 /* ContentExtensionsManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ContentExtensionsManager.cpp; sourceTree = "<group>"; };
 		26F0C8961A2E724B002794F8 /* ContentExtensionsManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContentExtensionsManager.h; sourceTree = "<group>"; };
@@ -15373,8 +15369,6 @@
 				26F0C8961A2E724B002794F8 /* ContentExtensionsManager.h */,
 				267725F61A5B3AD9003C24DD /* DFA.cpp */,
 				267725F71A5B3AD9003C24DD /* DFA.h */,
-				26C560D11A783EBB008682E4 /* DFACompiler.cpp */,
-				26C560D21A783EBB008682E4 /* DFACompiler.h */,
 				267725F91A5B3AD9003C24DD /* DFANode.h */,
 				269397251A4A5FBD00E8349D /* NFA.cpp */,
 				269397231A4A5B6400E8349D /* NFA.h */,
@@ -26308,7 +26302,6 @@
 				B22279C20D00BF220071B782 /* SVGException.h in Headers */,
 				B22279C50D00BF220071B782 /* SVGExternalResourcesRequired.h in Headers */,
 				B22279C80D00BF220071B782 /* SVGFEBlendElement.h in Headers */,
-				26C560D41A783EBB008682E4 /* DFACompiler.h in Headers */,
 				B22279CB0D00BF220071B782 /* SVGFEColorMatrixElement.h in Headers */,
 				B22279CE0D00BF220071B782 /* SVGFEComponentTransferElement.h in Headers */,
 				B22279D10D00BF220071B782 /* SVGFECompositeElement.h in Headers */,
@@ -29521,7 +29514,6 @@
 				C5A1EA7C152BCF04004D00B6 /* SimplifyMarkupCommand.cpp in Sources */,
 				FD00D7A414A3F61900734011 /* SincResampler.cpp in Sources */,
 				51327D6111A33A2B004F9D65 /* SinkDocument.cpp in Sources */,
-				26C560D31A783EBB008682E4 /* DFACompiler.cpp in Sources */,
 				49E911CC0EF86D47009D0CAF /* SkewTransformOperation.cpp in Sources */,
 				4150F9F212B6E0E70008C860 /* SliderThumbElement.cpp in Sources */,
 				1C0939EA1A13E12900B788E5 /* CachedSVGFont.cpp in Sources */,

Modified: trunk/Source/WebCore/contentextensions/ContentExtensionsBackend.cpp (180265 => 180266)


--- trunk/Source/WebCore/contentextensions/ContentExtensionsBackend.cpp	2015-02-18 16:31:15 UTC (rev 180265)
+++ trunk/Source/WebCore/contentextensions/ContentExtensionsBackend.cpp	2015-02-18 17:08:46 UTC (rev 180266)
@@ -29,7 +29,6 @@
 #if ENABLE(CONTENT_EXTENSIONS)
 
 #include "ContentExtensionsDebugging.h"
-#include "DFACompiler.h"
 #include "NFA.h"
 #include "NFAToDFA.h"
 #include "URL.h"
@@ -43,11 +42,6 @@
 
 namespace ContentExtensions {
 
-ContentExtensionsBackend::ContentExtensionsBackend()
-    : m_vm(JSC::VM::sharedInstance())
-{
-}
-
 void ContentExtensionsBackend::setRuleList(const String& identifier, const Vector<ContentExtensionRule>& ruleList)
 {
     ASSERT(!identifier.isEmpty());
@@ -91,24 +85,19 @@
     double dfaBuildTimeStart = monotonicallyIncreasingTime();
 #endif
 
-    const DFA dfa = NFAToDFA::convert(nfa);
+    CompiledContentExtension compiledContentExtension = { NFAToDFA::convert(nfa), ruleList };
 
 #if CONTENT_EXTENSIONS_PERFORMANCE_REPORTING
     double dfaBuildTimeEnd = monotonicallyIncreasingTime();
     dataLogF("    Time spent building the DFA: %f\n", (dfaBuildTimeEnd - dfaBuildTimeStart));
 #endif
 
-    JSC::MacroAssemblerCodeRef compiledDfa;
-    {
-        JSC::JSLockHolder locker(m_vm.get());
-        compiledDfa = compileDFA(dfa, m_vm.get());
-    }
+    // FIXME: never add a DFA that only matches the empty set.
 
 #if CONTENT_EXTENSIONS_STATE_MACHINE_DEBUGGING
-    dfa.debugPrintDot();
+    compiledContentExtension.dfa.debugPrintDot();
 #endif
 
-    CompiledContentExtension compiledContentExtension = { compiledDfa, ruleList };
     m_ruleLists.set(identifier, compiledContentExtension);
 }
 
@@ -122,11 +111,6 @@
     m_ruleLists.clear();
 }
 
-static void addActionToHashSet(TriggeredActionSet* triggeredActionSet, unsigned actionId)
-{
-    triggeredActionSet->add(actionId);
-}
-
 bool ContentExtensionsBackend::shouldBlockURL(const URL& url)
 {
     const String& urlString = url.string();
@@ -134,17 +118,21 @@
 
     for (auto& ruleListSlot : m_ruleLists) {
         CompiledContentExtension& compiledContentExtension = ruleListSlot.value;
+        unsigned state = compiledContentExtension.dfa.root();
 
-        CString urlCString = urlString.utf8();
-        PotentialPageLoadDescriptor potentialPageLoadDescriptor;
-        potentialPageLoadDescriptor.urlBuffer = urlCString.data();
-        potentialPageLoadDescriptor.urlBufferSize = urlCString.length();
+        HashSet<uint64_t, DefaultHash<uint64_t>::Hash, WTF::UnsignedWithZeroKeyHashTraits<uint64_t>> triggeredActions;
 
-        TriggeredActionSet triggeredActions;
+        for (unsigned i = 0; i < urlString.length(); ++i) {
+            char character = static_cast<char>(urlString[i]);
+            bool ok;
+            state = compiledContentExtension.dfa.nextState(state, character, ok);
+            if (!ok)
+                break;
 
-        void* compiledMatcher = compiledContentExtension.compiledMatcher.code().executableAddress();
-        reinterpret_cast<CompiledRuleMatcher>(compiledMatcher)(&potentialPageLoadDescriptor, addActionToHashSet, &triggeredActions);
-
+            const Vector<uint64_t>& actions = compiledContentExtension.dfa.actions(state);
+            if (!actions.isEmpty())
+                triggeredActions.add(actions.begin(), actions.end());
+        }
         if (!triggeredActions.isEmpty()) {
             Vector<uint64_t> sortedActions;
             copyToVector(triggeredActions, sortedActions);

Modified: trunk/Source/WebCore/contentextensions/ContentExtensionsBackend.h (180265 => 180266)


--- trunk/Source/WebCore/contentextensions/ContentExtensionsBackend.h	2015-02-18 16:31:15 UTC (rev 180265)
+++ trunk/Source/WebCore/contentextensions/ContentExtensionsBackend.h	2015-02-18 17:08:46 UTC (rev 180266)
@@ -30,8 +30,6 @@
 
 #include "ContentExtensionRule.h"
 #include "DFA.h"
-#include <_javascript_Core/MacroAssemblerCodeRef.h>
-#include <_javascript_Core/VM.h>
 #include <wtf/HashMap.h>
 #include <wtf/text/StringHash.h>
 #include <wtf/text/WTFString.h>
@@ -49,8 +47,6 @@
 // 2) It provides APIs for the WebCore interfaces to use those rules efficiently.
 class ContentExtensionsBackend {
 public:
-    ContentExtensionsBackend();
-
     // - Rule management interface. This can be used by upper layer.
 
     // Set a list of rules for a given name. If there were existing rules for the name, they are overriden.
@@ -64,11 +60,10 @@
 
 private:
     struct CompiledContentExtension {
-        JSC::MacroAssemblerCodeRef compiledMatcher;
+        DFA dfa;
         Vector<ContentExtensionRule> ruleList;
     };
 
-    Ref<JSC::VM> m_vm;
     HashMap<String, CompiledContentExtension> m_ruleLists;
 };
 

Modified: trunk/Source/WebCore/contentextensions/DFA.cpp (180265 => 180266)


--- trunk/Source/WebCore/contentextensions/DFA.cpp	2015-02-18 16:31:15 UTC (rev 180265)
+++ trunk/Source/WebCore/contentextensions/DFA.cpp	2015-02-18 17:08:46 UTC (rev 180266)
@@ -59,6 +59,31 @@
     return *this;
 }
 
+unsigned DFA::nextState(unsigned currentState, char character, bool& ok) const
+{
+    ASSERT(currentState < m_nodes.size());
+
+    const DFANode& node = m_nodes[currentState];
+    auto nextNode = node.transitions.find(character);
+    if (nextNode != node.transitions.end()) {
+        ok = true;
+        return nextNode->value;
+    }
+    if (node.hasFallbackTransition) {
+        ok = true;
+        return node.fallbackTransition;
+    }
+    ok = false;
+    return 0;
+
+}
+
+const Vector<uint64_t>& DFA::actions(unsigned currentState) const
+{
+    ASSERT(currentState < m_nodes.size());
+    return m_nodes[currentState].actions;
+}
+
 #if CONTENT_EXTENSIONS_STATE_MACHINE_DEBUGGING
 static void printRange(bool firstRange, char rangeStart, char rangeEnd)
 {

Modified: trunk/Source/WebCore/contentextensions/DFA.h (180265 => 180266)


--- trunk/Source/WebCore/contentextensions/DFA.h	2015-02-18 16:31:15 UTC (rev 180265)
+++ trunk/Source/WebCore/contentextensions/DFA.h	2015-02-18 17:08:46 UTC (rev 180266)
@@ -46,11 +46,10 @@
     DFA& operator=(const DFA&);
 
     unsigned root() const { return m_root; }
-    unsigned size() const { return m_nodes.size(); }
-    const DFANode& nodeAt(unsigned i) const
-    {
-        return m_nodes[i];
-    }
+    // If there is a transition to a valid state on "character", return that state and set ok to true.
+    // Otherwise, the return value is undefined and ok is false.
+    unsigned nextState(unsigned currentState, char character, bool& ok) const;
+    const Vector<uint64_t>& actions(unsigned currentState) const;
 
 #if CONTENT_EXTENSIONS_STATE_MACHINE_DEBUGGING
     void debugPrintDot() const;

Deleted: trunk/Source/WebCore/contentextensions/DFACompiler.cpp (180265 => 180266)


--- trunk/Source/WebCore/contentextensions/DFACompiler.cpp	2015-02-18 16:31:15 UTC (rev 180265)
+++ trunk/Source/WebCore/contentextensions/DFACompiler.cpp	2015-02-18 17:08:46 UTC (rev 180266)
@@ -1,192 +0,0 @@
-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "DFACompiler.h"
-
-#if ENABLE(CONTENT_EXTENSIONS)
-
-#include "DFA.h"
-#include "DFANode.h"
-#include "RegisterAllocator.h"
-#include "StackAllocator.h"
-#include <_javascript_Core/GPRInfo.h>
-#include <_javascript_Core/LinkBuffer.h>
-#include <_javascript_Core/MacroAssembler.h>
-#include <_javascript_Core/VM.h>
-
-namespace WebCore {
-
-namespace ContentExtensions {
-
-typedef JSC::MacroAssembler Assembler;
-
-class DFACodeGenerator {
-public:
-    explicit DFACodeGenerator(const DFA&);
-    JSC::MacroAssemblerCodeRef compile(JSC::VM&);
-
-private:
-    void lowerStateMachine();
-    void lowerNode(Assembler::JumpList& failureCases, const DFANode&);
-
-    void tryLoadingNextCharacter(Assembler::JumpList& failureCases, LocalRegister& output);
-    void callAddActionFunction(unsigned argument);
-
-    const DFA& m_dfa;
-
-    Assembler m_assembler;
-    RegisterAllocator m_registerAllocator;
-    StackAllocator m_stackAllocator;
-
-    Assembler::RegisterID m_urlBufferOffsetRegister = InvalidGPRReg;
-    Vector<Assembler::Label> m_stateEntryLabels;
-    Vector<Assembler::JumpList> m_jumpsPerState;
-};
-
-JSC::MacroAssemblerCodeRef compileDFA(const DFA& dfa, JSC::VM& vm)
-{
-    DFACodeGenerator codeGenerator(dfa);
-    return codeGenerator.compile(vm);
-}
-
-DFACodeGenerator::DFACodeGenerator(const DFA& dfa)
-    : m_dfa(dfa)
-    , m_stackAllocator(m_assembler)
-{
-}
-
-JSC::MacroAssemblerCodeRef DFACodeGenerator::compile(JSC::VM& vm)
-{
-    m_registerAllocator.reserveCallerSavedRegisters(WTF_ARRAY_LENGTH(callerSavedRegisters));
-
-    m_registerAllocator.allocateRegister(JSC::GPRInfo::argumentGPR0);
-    m_registerAllocator.allocateRegister(JSC::GPRInfo::argumentGPR1);
-    m_registerAllocator.allocateRegister(JSC::GPRInfo::argumentGPR2);
-
-    m_urlBufferOffsetRegister = m_registerAllocator.allocateRegister();
-    m_assembler.move(Assembler::TrustedImm32(0), m_urlBufferOffsetRegister);
-
-    lowerStateMachine();
-
-    m_registerAllocator.deallocateRegister(m_urlBufferOffsetRegister);
-    m_urlBufferOffsetRegister = InvalidGPRReg;
-
-    m_assembler.ret();
-
-    m_registerAllocator.deallocateRegister(JSC::GPRInfo::argumentGPR0);
-    m_registerAllocator.deallocateRegister(JSC::GPRInfo::argumentGPR1);
-    m_registerAllocator.deallocateRegister(JSC::GPRInfo::argumentGPR2);
-
-    JSC::LinkBuffer linkBuffer(vm, m_assembler, GLOBAL_THUNK_ID);
-#if CONTENT_EXTENSIONS_STATE_MACHINE_DEBUGGING
-    return linkBuffer.finalizeCodeWithDisassembly("Compiled Extension");
-#else
-    return FINALIZE_CODE(linkBuffer, ("Compiled Extension"));
-#endif
-}
-
-void DFACodeGenerator::lowerStateMachine()
-{
-    Assembler::JumpList failureCases;
-
-    unsigned dfaSize = m_dfa.size();
-
-    m_stateEntryLabels.resize(dfaSize);
-    m_jumpsPerState.resize(dfaSize);
-
-    unsigned root = m_dfa.root();
-    m_stateEntryLabels[root] = m_assembler.label();
-    lowerNode(failureCases, m_dfa.nodeAt(root));
-
-    for (unsigned i = 0; i < dfaSize; ++i) {
-        if (i == root)
-            continue;
-        m_stateEntryLabels[i] = m_assembler.label();
-        lowerNode(failureCases, m_dfa.nodeAt(i));
-    }
-
-    for (unsigned i = 0; i < dfaSize; ++i)
-        m_jumpsPerState[i].linkTo(m_stateEntryLabels[i], &m_assembler);
-
-    failureCases.link(&m_assembler);
-}
-
-void DFACodeGenerator::lowerNode(Assembler::JumpList& failureCases, const DFANode& dfaNode)
-{
-    for (uint64_t actionId : dfaNode.actions)
-        callAddActionFunction(static_cast<unsigned>(actionId));
-
-    LocalRegister characterRegister(m_registerAllocator);
-    tryLoadingNextCharacter(failureCases, characterRegister);
-
-    for (const auto& transition : dfaNode.transitions) {
-        Assembler::Jump jumpOnCharacter = m_assembler.branch32(Assembler::Equal, characterRegister, Assembler::TrustedImm32(transition.key));
-        m_jumpsPerState[transition.value].append(jumpOnCharacter);
-    }
-
-    if (dfaNode.hasFallbackTransition)
-        m_jumpsPerState[dfaNode.fallbackTransition].append(m_assembler.jump());
-    else
-        failureCases.append(m_assembler.jump());
-}
-
-void DFACodeGenerator::tryLoadingNextCharacter(Assembler::JumpList& failureCases, LocalRegister& character)
-{
-    failureCases.append(m_assembler.branch32(Assembler::Equal, Assembler::Address(JSC::GPRInfo::argumentGPR0, OBJECT_OFFSETOF(PotentialPageLoadDescriptor, urlBufferSize)), m_urlBufferOffsetRegister));
-
-    LocalRegister bufferPointer(m_registerAllocator);
-    m_assembler.loadPtr(Assembler::Address(JSC::GPRInfo::argumentGPR0, OBJECT_OFFSETOF(PotentialPageLoadDescriptor, urlBuffer)), bufferPointer);
-    m_assembler.load8(Assembler::BaseIndex(bufferPointer, m_urlBufferOffsetRegister, Assembler::TimesOne), character);
-
-    m_assembler.add32(Assembler::TrustedImm32(1), m_urlBufferOffsetRegister);
-}
-
-void DFACodeGenerator::callAddActionFunction(unsigned argument)
-{
-    const RegisterVector& allocatedRegisters = m_registerAllocator.allocatedRegisters();
-    StackAllocator::StackReferenceVector savedRegisterStackReferences = m_stackAllocator.push(allocatedRegisters);
-
-    m_stackAllocator.alignStackPreFunctionCall();
-
-    {
-        LocalRegister functionAddress(m_registerAllocator);
-        m_assembler.move(JSC::GPRInfo::argumentGPR1, functionAddress);
-        m_assembler.move(JSC::GPRInfo::argumentGPR2, JSC::GPRInfo::argumentGPR0);
-        m_assembler.move(Assembler::TrustedImm32(argument), JSC::GPRInfo::argumentGPR1);
-
-        m_assembler.call(functionAddress);
-    }
-
-    m_stackAllocator.unalignStackPostFunctionCall();
-
-    m_stackAllocator.pop(savedRegisterStackReferences, allocatedRegisters);
-}
-
-} // namespace ContentExtensions
-
-} // namespace WebCore
-
-#endif // ENABLE(CONTENT_EXTENSIONS)

Deleted: trunk/Source/WebCore/contentextensions/DFACompiler.h (180265 => 180266)


--- trunk/Source/WebCore/contentextensions/DFACompiler.h	2015-02-18 16:31:15 UTC (rev 180265)
+++ trunk/Source/WebCore/contentextensions/DFACompiler.h	2015-02-18 17:08:46 UTC (rev 180266)
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2015 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef DFACompiler_h
-#define DFACompiler_h
-
-#if ENABLE(CONTENT_EXTENSIONS)
-
-#include <_javascript_Core/MacroAssemblerCodeRef.h>
-#include <wtf/HashSet.h>
-
-namespace WebCore {
-
-namespace ContentExtensions {
-
-class DFA;
-
-struct PotentialPageLoadDescriptor {
-    const char* urlBuffer;
-    unsigned urlBufferSize;
-};
-
-typedef HashSet<unsigned, DefaultHash<unsigned>::Hash, WTF::UnsignedWithZeroKeyHashTraits<unsigned>> TriggeredActionSet;
-
-typedef void (*AddActionFunction)(TriggeredActionSet*, unsigned);
-typedef void (*CompiledRuleMatcher)(PotentialPageLoadDescriptor*, AddActionFunction, TriggeredActionSet*);
-
-JSC::MacroAssemblerCodeRef compileDFA(const DFA&, JSC::VM&);
-
-} // namespace ContentExtensions
-
-} // namespace WebCore
-
-#endif // ENABLE(CONTENT_EXTENSIONS)
-
-#endif // DFACompiler_h
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to