Ignore:
Timestamp:
Aug 24, 2021, 4:04:18 PM (4 years ago)
Author:
[email protected]
Message:

Add for-in OwnStructureMode optimizations to LLInt
https://bugs.webkit.org/show_bug.cgi?id=229038

Reviewed by Saam Barati.

This patch adds the optimizations we have for OwnStructureMode in
the Baseline to the LLInt. The patch also adds redundant self move
(i.e. move a, a) elimination to arm64. Finally, a bunch of the
property offset functions are now marked constexpr and return
intptr_t rather than size_t as the values can be negative.

There's also a minor fix to disable MSVC's signed to unsigned
cast warning for LLIntOffsetsExtractor as we don't care about
signedness for extracting constants.

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileEnumeratorGetByVal):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq):

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_enumerator_get_by_val):

  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • offlineasm/arm64.rb:
  • offlineasm/generate_offset_extractor.rb:
  • runtime/Butterfly.h:

(JSC::Butterfly::indexOfPropertyStorage):

  • runtime/JSObject.h:

(JSC::offsetInButterfly):

  • runtime/PropertyOffset.h:

(JSC::checkOffset):
(JSC::validateOffset):
(JSC::isValidOffset):
(JSC::isInlineOffset):
(JSC::isOutOfLineOffset):
(JSC::offsetInInlineStorage):
(JSC::offsetInOutOfLineStorage):
(JSC::offsetInRespectiveStorage):
(JSC::numberOfOutOfLineSlotsForMaxOffset):
(JSC::numberOfSlotsForMaxOffset):
(JSC::offsetForPropertyNumber):

Location:
trunk/Source/JavaScriptCore/offlineasm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/offlineasm/arm64.rb

    r275392 r281523  
    885885            if operands[0].immediate?
    886886                emitARM64MoveImmediate(operands[0].value, operands[1])
    887             else
     887            elsif operands[0] != operands[1]
    888888                emitARM64("mov", operands, :quad)
    889889            end
  • trunk/Source/JavaScriptCore/offlineasm/generate_offset_extractor.rb

    r269171 r281523  
    9393
    9494            emitCodeInConfiguration(concreteSettings, lowLevelAST, backend) {
     95
     96                # Windows complains about signed integers being cast to unsigned but we just want the bits.
     97                outp.puts "\#if COMPILER(MSVC)"
     98                outp.puts "\#pragma warning(disable:4308)"
     99                outp.puts "\#endif"
    95100                constsList.each_with_index {
    96101                    | const, index |
Note: See TracChangeset for help on using the changeset viewer.