Ignore:
Timestamp:
May 26, 2011, 2:37:05 PM (14 years ago)
Author:
[email protected]
Message:

https://bugs.webkit.org/show_bug.cgi?id=61508
DFG JIT - Add support for get by id self caching.

Reviewed by Geoff Garen.

Change the call out to be an unexpected call (using silent spill/fill functions),
add a structure check & compact load to the JIT code, and add repatching mechanisms.
Since DFGOperations may want to be be implemented in asm, make these symbols be extern
"C". Add an asm wrapper to pass the return address to the optimizing get-by-id operation,
so that it can look up its StructureStubInfo.

  • JavaScriptCore.xcodeproj/project.pbxproj:
    • Added new files.
  • bytecode/StructureStubInfo.h:
    • Added 'unset' entries to union.
  • dfg/DFGJITCodeGenerator.h:

(JSC::DFG::JITCodeGenerator::appendCallWithExceptionCheck):

  • Return the call, we need this to populate the StructureStubInfo.
  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::compileFunction):

  • Populate the CodebBlock's StructureStubInfo Vector.
  • dfg/DFGJITCompiler.h:

(JSC::DFG::JITCompiler::appendCallWithExceptionCheck):

  • Return the call, we need this to populate the StructureStubInfo.

(JSC::DFG::JITCompiler::addPropertyAccess):
(JSC::DFG::JITCompiler::PropertyAccessRecord::PropertyAccessRecord):

  • Add structures to record property access info during compilation.
  • dfg/DFGOperations.cpp:
    • Made all external methods extern "C".

(JSC::DFG::operationPutByValInternal):

  • Moved outside of the extern "C" block.
  • dfg/DFGOperations.h:
    • Made all external methods extern "C".
  • dfg/DFGRepatch.cpp: Added.

(JSC::DFG::dfgRepatchCall):

  • repatch a call to link to a new callee function.

(JSC::DFG::dfgRepatchGetByIdSelf):

  • Modify the JIT code to optimize self accesses.

(JSC::DFG::tryCacheGetByID):

  • Internal implementation of dfgRepatchGetByID (factor out failing cases).

(JSC::DFG::dfgRepatchGetByID):

  • Used to optimize 'operationGetByIdOptimize' - repatches to 'operationGetById', and tries to optimize self accesses!
  • dfg/DFGRepatch.h: Added.
    • Expose dfgRepatchGetByID.
  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compile):

  • Changed implementation of GetById ops.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r87427 r87431  
     12011-05-26  Gavin Barraclough  <[email protected]>
     2
     3        Reviewed by Geoff Garen.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=61508
     6        DFG JIT - Add support for get by id self caching.
     7
     8        Change the call out to be an unexpected call (using silent spill/fill functions),
     9        add a structure check & compact load to the JIT code, and add repatching mechanisms.
     10        Since DFGOperations may want to be be implemented in asm, make these symbols be extern
     11        "C". Add an asm wrapper to pass the return address to the optimizing get-by-id operation,
     12        so that it can look up its StructureStubInfo.
     13
     14        * JavaScriptCore.xcodeproj/project.pbxproj:
     15            - Added new files.
     16        * bytecode/StructureStubInfo.h:
     17            - Added 'unset' entries to union.
     18        * dfg/DFGJITCodeGenerator.h:
     19        (JSC::DFG::JITCodeGenerator::appendCallWithExceptionCheck):
     20            - Return the call, we need this to populate the StructureStubInfo.
     21        * dfg/DFGJITCompiler.cpp:
     22        (JSC::DFG::JITCompiler::compileFunction):
     23            - Populate the CodebBlock's StructureStubInfo Vector.
     24        * dfg/DFGJITCompiler.h:
     25        (JSC::DFG::JITCompiler::appendCallWithExceptionCheck):
     26            - Return the call, we need this to populate the StructureStubInfo.
     27        (JSC::DFG::JITCompiler::addPropertyAccess):
     28        (JSC::DFG::JITCompiler::PropertyAccessRecord::PropertyAccessRecord):
     29            - Add structures to record property access info during compilation.
     30        * dfg/DFGOperations.cpp:
     31            - Made all external methods extern "C".
     32        (JSC::DFG::operationPutByValInternal):
     33            - Moved outside of the extern "C" block.
     34        * dfg/DFGOperations.h:
     35            - Made all external methods extern "C".
     36        * dfg/DFGRepatch.cpp: Added.
     37        (JSC::DFG::dfgRepatchCall):
     38            - repatch a call to link to a new callee function.
     39        (JSC::DFG::dfgRepatchGetByIdSelf):
     40            - Modify the JIT code to optimize self accesses.
     41        (JSC::DFG::tryCacheGetByID):
     42            - Internal implementation of dfgRepatchGetByID (factor out failing cases).
     43        (JSC::DFG::dfgRepatchGetByID):
     44            - Used to optimize 'operationGetByIdOptimize' - repatches to 'operationGetById', and tries to optimize self accesses!
     45        * dfg/DFGRepatch.h: Added.
     46            - Expose dfgRepatchGetByID.
     47        * dfg/DFGSpeculativeJIT.cpp:
     48        (JSC::DFG::SpeculativeJIT::compile):
     49            - Changed implementation of GetById ops.
     50
    1512011-05-26  Geoffrey Garen  <[email protected]>
    252
Note: See TracChangeset for help on using the changeset viewer.