Ignore:
Timestamp:
Dec 1, 2015, 11:31:58 AM (10 years ago)
Author:
[email protected]
Message:

Refactor FTL sub snippet code to support general binary op snippets.
https://bugs.webkit.org/show_bug.cgi?id=151706

Reviewed by Geoffrey Garen.

  • ftl/FTLCompile.cpp:
  • Moved the BinarySnippetRegisterContext to FTLCompileBinaryOp.cpp verbatim.
  • Generalize generateArithSubICFastPath() to generateBinaryOpICFastPath(). It now uses snippet specific helpers in FTLCompileBinaryOp.cpp to generate the fast paths.
  • ftl/FTLCompileBinaryOp.cpp: Added.

(JSC::FTL::BinarySnippetRegisterContext::BinarySnippetRegisterContext):
(JSC::FTL::BinarySnippetRegisterContext::initializeRegisters):
(JSC::FTL::BinarySnippetRegisterContext::restoreRegisters):

  • Moved here without changed from FTLCompile.cpp.

(JSC::FTL::generateArithSubFastPath):

  • ftl/FTLCompileBinaryOp.h: Added.
  • ftl/FTLInlineCacheDescriptor.h:

(JSC::FTL::BinaryOpDescriptor::nodeType):
(JSC::FTL::BinaryOpDescriptor::size):
(JSC::FTL::BinaryOpDescriptor::name):
(JSC::FTL::BinaryOpDescriptor::fastPathICName):
(JSC::FTL::BinaryOpDescriptor::slowPathFunction):
(JSC::FTL::BinaryOpDescriptor::leftOperand):
(JSC::FTL::BinaryOpDescriptor::rightOperand):
(JSC::FTL::BinaryOpDescriptor::BinaryOpDescriptor):
(JSC::FTL::ArithSubDescriptor::ArithSubDescriptor): Deleted.
(JSC::FTL::ArithSubDescriptor::leftType): Deleted.
(JSC::FTL::ArithSubDescriptor::rightType): Deleted.

  • Refactor ArithSubDescriptor into BinaryOpDescriptor, and re-add a sub-class ArithSubDescriptor as specializations of BinaryOpDescriptor.
  • ftl/FTLInlineCacheDescriptorInlines.h: Added.

(JSC::FTL::ArithSubDescriptor::ArithSubDescriptor):
(JSC::FTL::ArithSubDescriptor::icSize):

  • ftl/FTLLowerDFGToLLVM.cpp:

(JSC::FTL::DFG::LowerDFGToLLVM::compileArithAddOrSub):

  • ftl/FTLOSRExit.cpp:

(JSC::FTL::OSRExit::willArriveAtExitFromIndirectExceptionCheck):
(JSC::FTL::OSRExit::willArriveAtOSRExitFromCallOperation):

  • ftl/FTLOSRExit.h:
  • ftl/FTLState.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r192882 r192896  
     12015-12-01  Mark Lam  <[email protected]>
     2
     3        Refactor FTL sub snippet code to support general binary op snippets.
     4        https://bugs.webkit.org/show_bug.cgi?id=151706
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        * CMakeLists.txt:
     9        * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
     10        * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters:
     11        * JavaScriptCore.xcodeproj/project.pbxproj:
     12
     13        * ftl/FTLCompile.cpp:
     14        - Moved the BinarySnippetRegisterContext to FTLCompileBinaryOp.cpp verbatim.
     15        - Generalize generateArithSubICFastPath() to generateBinaryOpICFastPath().
     16          It now uses snippet specific helpers in FTLCompileBinaryOp.cpp to generate
     17          the fast paths.
     18
     19        * ftl/FTLCompileBinaryOp.cpp: Added.
     20        (JSC::FTL::BinarySnippetRegisterContext::BinarySnippetRegisterContext):
     21        (JSC::FTL::BinarySnippetRegisterContext::initializeRegisters):
     22        (JSC::FTL::BinarySnippetRegisterContext::restoreRegisters):
     23        - Moved here without changed from FTLCompile.cpp.
     24        (JSC::FTL::generateArithSubFastPath):
     25        * ftl/FTLCompileBinaryOp.h: Added.
     26
     27        * ftl/FTLInlineCacheDescriptor.h:
     28        (JSC::FTL::BinaryOpDescriptor::nodeType):
     29        (JSC::FTL::BinaryOpDescriptor::size):
     30        (JSC::FTL::BinaryOpDescriptor::name):
     31        (JSC::FTL::BinaryOpDescriptor::fastPathICName):
     32        (JSC::FTL::BinaryOpDescriptor::slowPathFunction):
     33        (JSC::FTL::BinaryOpDescriptor::leftOperand):
     34        (JSC::FTL::BinaryOpDescriptor::rightOperand):
     35        (JSC::FTL::BinaryOpDescriptor::BinaryOpDescriptor):
     36        (JSC::FTL::ArithSubDescriptor::ArithSubDescriptor): Deleted.
     37        (JSC::FTL::ArithSubDescriptor::leftType): Deleted.
     38        (JSC::FTL::ArithSubDescriptor::rightType): Deleted.
     39        - Refactor ArithSubDescriptor into BinaryOpDescriptor, and re-add a sub-class
     40          ArithSubDescriptor as specializations of BinaryOpDescriptor.
     41
     42        * ftl/FTLInlineCacheDescriptorInlines.h: Added.
     43        (JSC::FTL::ArithSubDescriptor::ArithSubDescriptor):
     44        (JSC::FTL::ArithSubDescriptor::icSize):
     45
     46        * ftl/FTLLowerDFGToLLVM.cpp:
     47        (JSC::FTL::DFG::LowerDFGToLLVM::compileArithAddOrSub):
     48        * ftl/FTLOSRExit.cpp:
     49        (JSC::FTL::OSRExit::willArriveAtExitFromIndirectExceptionCheck):
     50        (JSC::FTL::OSRExit::willArriveAtOSRExitFromCallOperation):
     51        * ftl/FTLOSRExit.h:
     52        * ftl/FTLState.h:
     53
    1542015-12-01  Carlos Garcia Campos  <[email protected]>
    255
Note: See TracChangeset for help on using the changeset viewer.