Ignore:
Timestamp:
Mar 25, 2014, 3:38:52 PM (11 years ago)
Author:
[email protected]
Message:

Repatch should plant calls to getters directly rather than through a C helper
https://bugs.webkit.org/show_bug.cgi?id=129589

Source/JavaScriptCore:

Reviewed by Mark Hahnenberg.

As the title says. All of the superstructure for this was already in place, so now it
was just a matter of actually emitting the call.

8x speed-up for getter microbenchmarks.

  • CMakeLists.txt:
  • JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • bytecode/PolymorphicGetByIdList.h:

(JSC::GetByIdAccess::doesCalls):

  • jit/AccessorCallJITStubRoutine.cpp: Added.

(JSC::AccessorCallJITStubRoutine::AccessorCallJITStubRoutine):
(JSC::AccessorCallJITStubRoutine::~AccessorCallJITStubRoutine):
(JSC::AccessorCallJITStubRoutine::visitWeak):

  • jit/AccessorCallJITStubRoutine.h: Added.
  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::storeCell):

  • jit/GCAwareJITStubRoutine.h:
  • jit/Repatch.cpp:

(JSC::generateGetByIdStub):

  • runtime/GetterSetter.h:

(JSC::GetterSetter::offsetOfGetter):
(JSC::GetterSetter::offsetOfSetter):

LayoutTests:

Reviewed by Mark Hahnenberg.

  • js/regress/getter-expected.txt: Added.
  • js/regress/getter.html: Added.
  • js/regress/script-tests/getter.js: Added.
  • js/regress/script-tests/string-char-code-at.js: Added.

(foo):

  • js/regress/string-char-code-at-expected.txt: Added.
  • js/regress/string-char-code-at.html: Added.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/jit/AssemblyHelpers.h

    r165205 r166263  
    6767#endif
    6868    }
     69   
     70    template<typename T>
     71    void storeCell(T cell, Address address)
     72    {
     73#if USE(JSVALUE64)
     74        store64(cell, address);
     75#else
     76        store32(cell, address.withOffset(PayloadOffset));
     77        store32(TrustedImm32(JSValue::CellTag), address.withOffset(TagOffset));
     78#endif
     79    }
    6980
    7081#if CPU(X86_64) || CPU(X86)
Note: See TracChangeset for help on using the changeset viewer.