Ignore:
Timestamp:
Sep 7, 2013, 2:13:55 PM (12 years ago)
Author:
[email protected]
Message:

FTL should support typed array GetByVal and related ops
https://bugs.webkit.org/show_bug.cgi?id=120965

Reviewed by Oliver Hunt.

This adds support for typed array instantiations of the following DFG IR ops:

  • GetByVal


  • GetIndexedPropertyStorage


  • CheckArray


  • GetArrayLength


This also adds CheckArray for Int32/Double/Contiguous arrays.

  • dfg/DFGArrayMode.cpp:

(JSC::DFG::toIndexingShape):

  • dfg/DFGArrayMode.h:

(JSC::DFG::ArrayMode::shapeMask):

  • ftl/FTLAbbreviations.h:

(JSC::FTL::floatType):
(JSC::FTL::buildSExt):
(JSC::FTL::buildFPCast):

  • ftl/FTLAbstractHeapRepository.h:
  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLCommonValues.cpp:

(JSC::FTL::CommonValues::CommonValues):

  • ftl/FTLCommonValues.h:
  • ftl/FTLLowerDFGToLLVM.cpp:

(JSC::FTL::LowerDFGToLLVM::compileNode):
(JSC::FTL::LowerDFGToLLVM::compileGetIndexedPropertyStorage):
(JSC::FTL::LowerDFGToLLVM::compileCheckArray):
(JSC::FTL::LowerDFGToLLVM::compileGetArrayLength):
(JSC::FTL::LowerDFGToLLVM::compileGetByVal):
(JSC::FTL::LowerDFGToLLVM::isArrayType):
(JSC::FTL::LowerDFGToLLVM::hasClassInfo):

  • ftl/FTLOutput.h:

(JSC::FTL::Output::constIntPtr):
(JSC::FTL::Output::signExt):
(JSC::FTL::Output::fpCast):
(JSC::FTL::Output::loadFloat):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ftl/FTLOutput.h

    r155023 r155260  
    109109    LValue constInt32(int32_t value) { return constInt(int32, value); }
    110110    template<typename T>
    111     LValue constIntPtr(T value) { return constInt(intPtr, bitwise_cast<intptr_t>(value)); }
     111    LValue constIntPtr(T* value) { return constInt(intPtr, bitwise_cast<intptr_t>(value)); }
     112    template<typename T>
     113    LValue constIntPtr(T value) { return constInt(intPtr, static_cast<intptr_t>(value)); }
    112114    LValue constInt64(int64_t value) { return constInt(int64, value); }
    113115    LValue constDouble(double value) { return constReal(doubleType, value); }
     
    170172    }
    171173   
     174    LValue signExt(LValue value, LType type) { return buildSExt(m_builder, value, type); }
    172175    LValue zeroExt(LValue value, LType type) { return buildZExt(m_builder, value, type); }
    173176    LValue fpToInt(LValue value, LType type) { return buildFPToSI(m_builder, value, type); }
     
    179182    LValue intCast(LValue value, LType type) { return buildIntCast(m_builder, value, type); }
    180183    LValue castToInt32(LValue value) { return intCast(value, int32); }
     184    LValue fpCast(LValue value, LType type) { return buildFPCast(m_builder, value, type); }
    181185    LValue intToPtr(LValue value, LType type) { return buildIntToPtr(m_builder, value, type); }
    182186    LValue bitCast(LValue value, LType type) { return buildBitCast(m_builder, value, type); }
     
    202206    LValue load64(TypedPointer pointer) { return load(pointer, ref64); }
    203207    LValue loadPtr(TypedPointer pointer) { return load(pointer, refPtr); }
     208    LValue loadFloat(TypedPointer pointer) { return load(pointer, refFloat); }
    204209    LValue loadDouble(TypedPointer pointer) { return load(pointer, refDouble); }
    205210    void store32(LValue value, TypedPointer pointer) { store(value, pointer, ref32); }
Note: See TracChangeset for help on using the changeset viewer.