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/FTLCapabilities.cpp

    r155243 r155260  
    9292        // These are OK.
    9393        break;
     94    case GetIndexedPropertyStorage:
     95        if (isTypedView(node->arrayMode().typedArrayType()))
     96            break;
     97        return CannotCompile;
     98    case CheckArray:
     99        switch (node->arrayMode().type()) {
     100        case Array::Int32:
     101        case Array::Double:
     102        case Array::Contiguous:
     103            break;
     104        default:
     105            if (isTypedView(node->arrayMode().typedArrayType()))
     106                break;
     107            return CannotCompile;
     108        }
     109        break;
    94110    case GetArrayLength:
    95111        switch (node->arrayMode().type()) {
     
    99115            break;
    100116        default:
     117            if (isTypedView(node->arrayMode().typedArrayType()))
     118                break;
    101119            return CannotCompile;
    102120        }
     
    111129            break;
    112130        default:
     131            if (isTypedView(node->arrayMode().typedArrayType()))
     132                return CanCompileAndOSREnter;
    113133            return CannotCompile;
    114134        }
Note: See TracChangeset for help on using the changeset viewer.