Changeset 166524 in webkit


Ignore:
Timestamp:
Mar 31, 2014 2:04:03 PM (10 years ago)
Author:
benjamin@webkit.org
Message:

CSS JIT: clean up the functions ending when generating a checker with context
https://bugs.webkit.org/show_bug.cgi?id=130959

Reviewed by Andreas Kling.

This code got refactored over time and now both branches do the exact same action
on the stack.
This patch removes the stack split and move the stack cleanup in the common ending
just before restoring the callee saved registers.

  • cssjit/SelectorCompiler.cpp:

(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r166523 r166524  
     12014-03-31  Benjamin Poulain  <benjamin@webkit.org>
     2
     3        CSS JIT: clean up the functions ending when generating a checker with context
     4        https://bugs.webkit.org/show_bug.cgi?id=130959
     5
     6        Reviewed by Andreas Kling.
     7
     8        This code got refactored over time and now both branches do the exact same action
     9        on the stack.
     10        This patch removes the stack split and move the stack cleanup in the common ending
     11        just before restoring the callee saved registers.
     12
     13        * cssjit/SelectorCompiler.cpp:
     14        (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
     15
    1162014-03-31  Beth Dakin  <bdakin@apple.com>
    217
  • trunk/Source/WebCore/cssjit/SelectorCompiler.cpp

    r165402 r166524  
    707707        m_assembler.move(Assembler::TrustedImm32(1), returnRegister);
    708708
    709         StackAllocator successStack = m_stackAllocator;
    710         StackAllocator failureStack = m_stackAllocator;
    711 
    712         LocalRegister checkingContextRegister(m_registerAllocator);
    713         successStack.popAndDiscardUpTo(m_checkingContextStackReference);
    714 
    715709        // Failure.
    716710        if (!failureCases.empty()) {
    717711            Assembler::Jump skipFailureCase = m_assembler.jump();
    718 
    719712            failureCases.link(&m_assembler);
    720             failureStack.popAndDiscardUpTo(m_checkingContextStackReference);
    721713            m_assembler.move(Assembler::TrustedImm32(0), returnRegister);
    722 
    723714            skipFailureCase.link(&m_assembler);
    724715        }
    725716
    726         m_stackAllocator.merge(std::move(successStack), std::move(failureStack));
     717        m_stackAllocator.popAndDiscardUpTo(m_checkingContextStackReference);
    727718        m_registerAllocator.restoreCalleeSavedRegisters(m_stackAllocator);
    728719        m_assembler.ret();
Note: See TracChangeset for help on using the changeset viewer.