Ignore:
Timestamp:
Nov 18, 2015, 3:05:34 PM (10 years ago)
Author:
[email protected]
Message:

Implement the B3 equivalent of FTLCompile
https://bugs.webkit.org/show_bug.cgi?id=151370

Reviewed by Benjamin Poulain.

This adds a B3 version of FTLCompile and gets the data structures related to installing an FTL
compilation (i.e. the finalizer and JITCode) to be aware of B3. That requires stubbing a lot of stuff
out and also simplifying a lot of code around having everything inside a single contiguous chunk of
JIT code rather than some opaque JIT code handles plus miscellaneous side-codes. This compiles but
crashes because lowering isn't done yet.

(JSC::B3::Procedure::addDataSection):
(JSC::B3::Procedure::calleeSaveRegisters):
(JSC::B3::Procedure::addValueIndex):

  • b3/B3Procedure.h:

(JSC::B3::Procedure::code):

  • ftl/FTLB3Compile.cpp: Added.

(JSC::FTL::compile):

  • ftl/FTLCompile.cpp:

(JSC::FTL::mmAllocateDataSection):

  • ftl/FTLExceptionHandlerManager.cpp:

(JSC::FTL::ExceptionHandlerManager::callOperationExceptionTarget):
(JSC::FTL::ExceptionHandlerManager::lazySlowPathExceptionTarget):
(JSC::FTL::ExceptionHandlerManager::getByIdOSRExit):

  • ftl/FTLJITCode.cpp:

(JSC::FTL::JITCode::~JITCode):
(JSC::FTL::JITCode::initializeB3Code):
(JSC::FTL::JITCode::initializeExitThunks):
(JSC::FTL::JITCode::addDataSection):
(JSC::FTL::JITCode::initializeAddressForCall):
(JSC::FTL::JITCode::initializeArityCheckEntrypoint):
(JSC::FTL::JITCode::addressForCall):
(JSC::FTL::JITCode::contains):
(JSC::FTL::JITCode::exitThunks):
(JSC::FTL::JITCode::ftl):

  • ftl/FTLJITCode.h:

(JSC::FTL::JITCode::b3Code):
(JSC::FTL::JITCode::handles):
(JSC::FTL::JITCode::dataSections):

  • ftl/FTLJITFinalizer.cpp:

(JSC::FTL::JITFinalizer::codeSize):
(JSC::FTL::JITFinalizer::finalizeFunction):

  • ftl/FTLJITFinalizer.h:
  • ftl/FTLLink.cpp:

(JSC::FTL::link):

  • ftl/FTLOSRExit.cpp:

(JSC::FTL::OSRExit::codeLocationForRepatch):
(JSC::FTL::OSRExit::gatherRegistersToSpillForCallIfException):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r192586 r192590  
     12015-11-18  Filip Pizlo  <[email protected]>
     2
     3        Implement the B3 equivalent of FTLCompile
     4        https://bugs.webkit.org/show_bug.cgi?id=151370
     5
     6        Reviewed by Benjamin Poulain.
     7
     8        This adds a B3 version of FTLCompile and gets the data structures related to installing an FTL
     9        compilation (i.e. the finalizer and JITCode) to be aware of B3. That requires stubbing a lot of stuff
     10        out and also simplifying a lot of code around having everything inside a single contiguous chunk of
     11        JIT code rather than some opaque JIT code handles plus miscellaneous side-codes. This compiles but
     12        crashes because lowering isn't done yet.
     13
     14        * JavaScriptCore.xcodeproj/project.pbxproj:
     15        * b3/B3Procedure.cpp:
     16        (JSC::B3::Procedure::addDataSection):
     17        (JSC::B3::Procedure::calleeSaveRegisters):
     18        (JSC::B3::Procedure::addValueIndex):
     19        * b3/B3Procedure.h:
     20        (JSC::B3::Procedure::code):
     21        * ftl/FTLB3Compile.cpp: Added.
     22        (JSC::FTL::compile):
     23        * ftl/FTLCompile.cpp:
     24        (JSC::FTL::mmAllocateDataSection):
     25        * ftl/FTLExceptionHandlerManager.cpp:
     26        (JSC::FTL::ExceptionHandlerManager::callOperationExceptionTarget):
     27        (JSC::FTL::ExceptionHandlerManager::lazySlowPathExceptionTarget):
     28        (JSC::FTL::ExceptionHandlerManager::getByIdOSRExit):
     29        * ftl/FTLJITCode.cpp:
     30        (JSC::FTL::JITCode::~JITCode):
     31        (JSC::FTL::JITCode::initializeB3Code):
     32        (JSC::FTL::JITCode::initializeExitThunks):
     33        (JSC::FTL::JITCode::addDataSection):
     34        (JSC::FTL::JITCode::initializeAddressForCall):
     35        (JSC::FTL::JITCode::initializeArityCheckEntrypoint):
     36        (JSC::FTL::JITCode::addressForCall):
     37        (JSC::FTL::JITCode::contains):
     38        (JSC::FTL::JITCode::exitThunks):
     39        (JSC::FTL::JITCode::ftl):
     40        * ftl/FTLJITCode.h:
     41        (JSC::FTL::JITCode::b3Code):
     42        (JSC::FTL::JITCode::handles):
     43        (JSC::FTL::JITCode::dataSections):
     44        * ftl/FTLJITFinalizer.cpp:
     45        (JSC::FTL::JITFinalizer::codeSize):
     46        (JSC::FTL::JITFinalizer::finalizeFunction):
     47        * ftl/FTLJITFinalizer.h:
     48        * ftl/FTLLink.cpp:
     49        (JSC::FTL::link):
     50        * ftl/FTLOSRExit.cpp:
     51        (JSC::FTL::OSRExit::codeLocationForRepatch):
     52        (JSC::FTL::OSRExit::gatherRegistersToSpillForCallIfException):
     53
    1542015-11-18  Saam barati  <[email protected]>
    255
Note: See TracChangeset for help on using the changeset viewer.