Changeset 103250 in webkit for trunk/Source/JavaScriptCore


Ignore:
Timestamp:
Dec 19, 2011, 11:36:37 AM (13 years ago)
Author:
[email protected]
Message:

Rolling r103120 back in with merge errors corrected.

Location:
trunk/Source/JavaScriptCore
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r103243 r103250  
     12011-12-16  Oliver Hunt  <[email protected]>
     2
     3        Rolling r103120 back in with merge errors corrected.
     4
     5        PutByVal[Alias] unnecessarily reloads the storage buffer
     6        https://bugs.webkit.org/show_bug.cgi?id=74747
     7
     8        Reviewed by Gavin Barraclough.
     9
     10        Make PutByVal use GetIndexedStorage to load the storage buffer.
     11        This required switching PutByVal to a vararg node (which is
     12        responsible for most of the noise in this patch).  This fixes the
     13        remaining portion of the kraken regression caused by the GetByVal
     14        storage load elimination, and a 1-5% win on some of the sub tests of
     15        the typed array benchmark at:
     16        http://stepheneb.github.com/webgl-matrix-benchmarks/matrix_benchmark.html
     17
     18        * dfg/DFGAbstractState.cpp:
     19        (JSC::DFG::AbstractState::execute):
     20        * dfg/DFGByteCodeParser.cpp:
     21        (JSC::DFG::ByteCodeParser::parseBlock):
     22        * dfg/DFGNode.h:
     23        * dfg/DFGPropagator.cpp:
     24        (JSC::DFG::Propagator::propagateArithNodeFlags):
     25        (JSC::DFG::Propagator::fixupNode):
     26        (JSC::DFG::Propagator::byValIndexIsPure):
     27        (JSC::DFG::Propagator::clobbersWorld):
     28        (JSC::DFG::Propagator::getByValLoadElimination):
     29        (JSC::DFG::Propagator::checkStructureLoadElimination):
     30        (JSC::DFG::Propagator::getByOffsetLoadElimination):
     31        (JSC::DFG::Propagator::getPropertyStorageLoadElimination):
     32        (JSC::DFG::Propagator::getIndexedPropertyStorageLoadElimination):
     33        (JSC::DFG::Propagator::performNodeCSE):
     34        * dfg/DFGSpeculativeJIT.cpp:
     35        (JSC::DFG::SpeculativeJIT::compilePutByValForByteArray):
     36        (JSC::DFG::SpeculativeJIT::compilePutByValForIntTypedArray):
     37        (JSC::DFG::SpeculativeJIT::compilePutByValForFloatTypedArray):
     38        * dfg/DFGSpeculativeJIT.h:
     39        * dfg/DFGSpeculativeJIT32_64.cpp:
     40        (JSC::DFG::SpeculativeJIT::compile):
     41        * dfg/DFGSpeculativeJIT64.cpp:
     42        (JSC::DFG::SpeculativeJIT::compile):
     43
    1442011-12-15  Geoffrey Garen  <[email protected]>
    245
     
    333376        (WTF::lowerNibbleToASCIIHexDigit):
    334377        (WTF::upperNibbleToASCIIHexDigit):
    335 
    336 2011-12-16  Gavin Barraclough  <[email protected]>
    337 
    338         Reverted r103120, this breaks v8 on ARMv7 DFG.
    339 
    340         * dfg/DFGAbstractState.cpp:
    341         (JSC::DFG::AbstractState::execute):
    342         * dfg/DFGByteCodeParser.cpp:
    343         (JSC::DFG::ByteCodeParser::parseBlock):
    344         * dfg/DFGNode.h:
    345         * dfg/DFGPropagator.cpp:
    346         (JSC::DFG::Propagator::propagateArithNodeFlags):
    347         (JSC::DFG::Propagator::fixupNode):
    348         (JSC::DFG::Propagator::byValIsPure):
    349         (JSC::DFG::Propagator::clobbersWorld):
    350         (JSC::DFG::Propagator::getByValLoadElimination):
    351         (JSC::DFG::Propagator::checkStructureLoadElimination):
    352         (JSC::DFG::Propagator::getByOffsetLoadElimination):
    353         (JSC::DFG::Propagator::getPropertyStorageLoadElimination):
    354         (JSC::DFG::Propagator::getIndexedPropertyStorageLoadElimination):
    355         (JSC::DFG::Propagator::performNodeCSE):
    356         * dfg/DFGSpeculativeJIT.cpp:
    357         (JSC::DFG::SpeculativeJIT::compilePutByValForByteArray):
    358         (JSC::DFG::SpeculativeJIT::compilePutByValForIntTypedArray):
    359         (JSC::DFG::SpeculativeJIT::compilePutByValForFloatTypedArray):
    360         * dfg/DFGSpeculativeJIT.h:
    361         * dfg/DFGSpeculativeJIT32_64.cpp:
    362         (JSC::DFG::SpeculativeJIT::compile):
    363         * dfg/DFGSpeculativeJIT64.cpp:
    364         (JSC::DFG::SpeculativeJIT::compile):
    365378
    3663792011-12-16  Filip Pizlo  <[email protected]>
  • trunk/Source/JavaScriptCore/dfg/DFGAbstractState.cpp

    r103218 r103250  
    494494    case PutByVal:
    495495    case PutByValAlias: {
    496         PredictedType indexPrediction = m_graph[node.child2()].prediction();
     496        NodeIndex child1 = m_graph.m_varArgChildren[node.firstChild()];
     497        NodeIndex child2 = m_graph.m_varArgChildren[node.firstChild() + 1];
     498        NodeIndex child3 = m_graph.m_varArgChildren[node.firstChild() + 2];
     499        PredictedType indexPrediction = m_graph[child2].prediction();
    497500        if (!(indexPrediction & PredictInt32) && indexPrediction) {
    498501            clobberStructures(nodeIndex);
     
    500503            break;
    501504        }
    502         if (m_graph[node.child1()].shouldSpeculateByteArray()) {
    503             forNode(node.child1()).filter(PredictByteArray);
    504             forNode(node.child2()).filter(PredictInt32);
    505             forNode(node.child3()).filter(PredictNumber);
    506             break;
    507         }
    508        
    509         if (m_graph[node.child1()].shouldSpeculateInt8Array()) {
    510             forNode(node.child1()).filter(PredictInt8Array);
    511             forNode(node.child2()).filter(PredictInt32);
    512             forNode(node.child3()).filter(PredictNumber);
    513             break;
    514         }
    515         if (m_graph[node.child1()].shouldSpeculateInt16Array()) {
    516             forNode(node.child1()).filter(PredictInt16Array);
    517             forNode(node.child2()).filter(PredictInt32);
    518             forNode(node.child3()).filter(PredictNumber);
    519             break;
    520         }
    521         if (m_graph[node.child1()].shouldSpeculateInt32Array()) {
    522             forNode(node.child1()).filter(PredictInt32Array);
    523             forNode(node.child2()).filter(PredictInt32);
    524             forNode(node.child3()).filter(PredictNumber);
    525             break;
    526         }
    527         if (m_graph[node.child1()].shouldSpeculateUint8Array()) {
    528             forNode(node.child1()).filter(PredictUint8Array);
    529             forNode(node.child2()).filter(PredictInt32);
    530             forNode(node.child3()).filter(PredictNumber);
    531             break;
    532         }
    533         if (m_graph[node.child1()].shouldSpeculateUint16Array()) {
    534             forNode(node.child1()).filter(PredictUint16Array);
    535             forNode(node.child2()).filter(PredictInt32);
    536             forNode(node.child3()).filter(PredictNumber);
    537             break;
    538         }
    539         if (m_graph[node.child1()].shouldSpeculateUint32Array()) {
    540             forNode(node.child1()).filter(PredictUint32Array);
    541             forNode(node.child2()).filter(PredictInt32);
    542             forNode(node.child3()).filter(PredictNumber);
    543             break;
    544         }
    545         if (m_graph[node.child1()].shouldSpeculateFloat32Array()) {
    546             forNode(node.child1()).filter(PredictFloat32Array);
    547             forNode(node.child2()).filter(PredictInt32);
    548             forNode(node.child3()).filter(PredictNumber);
    549             break;
    550         }
    551         if (m_graph[node.child1()].shouldSpeculateFloat64Array()) {
    552             forNode(node.child1()).filter(PredictFloat64Array);
    553             forNode(node.child2()).filter(PredictInt32);
    554             forNode(node.child3()).filter(PredictNumber);
    555             break;
    556         }
    557            
    558         forNode(node.child1()).filter(PredictArray);
    559         forNode(node.child2()).filter(PredictInt32);
     505        if (m_graph[child1].shouldSpeculateByteArray()) {
     506            forNode(child1).filter(PredictByteArray);
     507            forNode(child2).filter(PredictInt32);
     508            forNode(child3).filter(PredictNumber);
     509            break;
     510        }
     511       
     512        if (m_graph[child1].shouldSpeculateInt8Array()) {
     513            forNode(child1).filter(PredictInt8Array);
     514            forNode(child2).filter(PredictInt32);
     515            forNode(child3).filter(PredictNumber);
     516            break;
     517        }
     518        if (m_graph[child1].shouldSpeculateInt16Array()) {
     519            forNode(child1).filter(PredictInt16Array);
     520            forNode(child2).filter(PredictInt32);
     521            forNode(child3).filter(PredictNumber);
     522            break;
     523        }
     524        if (m_graph[child1].shouldSpeculateInt32Array()) {
     525            forNode(child1).filter(PredictInt32Array);
     526            forNode(child2).filter(PredictInt32);
     527            forNode(child3).filter(PredictNumber);
     528            break;
     529        }
     530        if (m_graph[child1].shouldSpeculateUint8Array()) {
     531            forNode(child1).filter(PredictUint8Array);
     532            forNode(child2).filter(PredictInt32);
     533            forNode(child3).filter(PredictNumber);
     534            break;
     535        }
     536        if (m_graph[child1].shouldSpeculateUint16Array()) {
     537            forNode(child1).filter(PredictUint16Array);
     538            forNode(child2).filter(PredictInt32);
     539            forNode(child3).filter(PredictNumber);
     540            break;
     541        }
     542        if (m_graph[child1].shouldSpeculateUint32Array()) {
     543            forNode(child1).filter(PredictUint32Array);
     544            forNode(child2).filter(PredictInt32);
     545            forNode(child3).filter(PredictNumber);
     546            break;
     547        }
     548        if (m_graph[child1].shouldSpeculateFloat32Array()) {
     549            forNode(child1).filter(PredictFloat32Array);
     550            forNode(child2).filter(PredictInt32);
     551            forNode(child3).filter(PredictNumber);
     552            break;
     553        }
     554        if (m_graph[child1].shouldSpeculateFloat64Array()) {
     555            forNode(child1).filter(PredictFloat64Array);
     556            forNode(child2).filter(PredictInt32);
     557            forNode(child3).filter(PredictNumber);
     558            break;
     559        }
     560           
     561        forNode(child1).filter(PredictArray);
     562        forNode(child2).filter(PredictInt32);
    560563        break;
    561564    }
  • trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp

    r103138 r103250  
    16631663            NodeIndex property = get(currentInstruction[2].u.operand);
    16641664            NodeIndex value = get(currentInstruction[3].u.operand);
    1665 
    1666             addToGraph(PutByVal, base, property, value);
     1665            NodeIndex propertyStorage = addToGraph(GetIndexedPropertyStorage, base, property);
     1666
     1667            addVarArgChild(base);
     1668            addVarArgChild(property);
     1669            addVarArgChild(value);
     1670            addVarArgChild(propertyStorage);
     1671           
     1672            addToGraph(Node::VarArg, PutByVal, OpInfo(0), OpInfo(0));
    16671673
    16681674            NEXT_OPCODE(op_put_by_val);
  • trunk/Source/JavaScriptCore/dfg/DFGNode.h

    r103218 r103250  
    227227    /* this must be the directly subsequent property put. */\
    228228    macro(GetByVal, NodeResultJS | NodeMustGenerate | NodeMightClobber) \
    229     macro(PutByVal, NodeMustGenerate | NodeClobbersWorld) \
    230     macro(PutByValAlias, NodeMustGenerate | NodeClobbersWorld) \
     229    macro(PutByVal, NodeMustGenerate | NodeClobbersWorld | NodeHasVarArgs) \
     230    macro(PutByValAlias, NodeMustGenerate | NodeClobbersWorld | NodeHasVarArgs) \
    231231    macro(GetById, NodeResultJS | NodeMustGenerate | NodeClobbersWorld) \
    232232    macro(PutById, NodeMustGenerate | NodeClobbersWorld) \
     
    235235    macro(PutStructure, NodeMustGenerate | NodeClobbersWorld) \
    236236    macro(GetPropertyStorage, NodeResultStorage) \
    237     macro(GetIndexedPropertyStorage, NodeMustGenerate | NodeResultStorage) \
     237    macro(GetIndexedPropertyStorage, NodeResultStorage) \
    238238    macro(GetByOffset, NodeResultJS) \
    239239    macro(PutByOffset, NodeMustGenerate | NodeClobbersWorld) \
  • trunk/Source/JavaScriptCore/dfg/DFGPropagator.cpp

    r103218 r103250  
    193193           
    194194        case PutByVal: {
    195             changed |= m_graph[node.child1()].mergeArithNodeFlags(flags | NodeUsedAsNumber | NodeNeedsNegZero);
    196             changed |= m_graph[node.child2()].mergeArithNodeFlags(flags | NodeUsedAsNumber);
    197             changed |= m_graph[node.child3()].mergeArithNodeFlags(flags | NodeUsedAsNumber | NodeNeedsNegZero);
     195            NodeIndex base = m_graph.m_varArgChildren[node.firstChild()];
     196            NodeIndex property = m_graph.m_varArgChildren[node.firstChild() + 1];
     197            NodeIndex value = m_graph.m_varArgChildren[node.firstChild() + 2];
     198            changed |= m_graph[base].mergeArithNodeFlags(flags | NodeUsedAsNumber | NodeNeedsNegZero);
     199            changed |= m_graph[property].mergeArithNodeFlags(flags | NodeUsedAsNumber);
     200            changed |= m_graph[value].mergeArithNodeFlags(flags | NodeUsedAsNumber | NodeNeedsNegZero);
    198201            break;
    199202        }
     
    931934            break;
    932935        }
     936        case PutByVal:
     937        case PutByValAlias: {
     938            NodeIndex storage = m_graph.m_varArgChildren[node.firstChild() + 3];
     939            if (m_graph[storage].op == Nop)
     940                node.children.variable.numChildren = 3;
     941            break;
     942        }
     943           
    933944        case GetByVal:
    934945        case StringCharAt:
     
    10861097    }
    10871098   
    1088     bool byValIsPure(Node& node)
    1089     {
    1090         PredictedType prediction = m_graph[node.child2()].prediction();
     1099    bool byValIndexIsPure(Node& node)
     1100    {
     1101        PredictedType prediction = node.prediction();
    10911102        return (prediction & PredictInt32) || !prediction;
    10921103    }
     
    11101121            return !logicalNotIsPure(node);
    11111122        case GetByVal:
    1112             return !byValIsPure(node);
     1123            return !byValIndexIsPure(m_graph[node.child2()]);
    11131124        default:
    11141125            ASSERT_NOT_REACHED();
     
    11801191            switch (node.op) {
    11811192            case GetByVal:
    1182                 if (!byValIsPure(node))
     1193                if (!byValIndexIsPure(m_graph[node.child2()]))
    11831194                    return NoNode;
    11841195                if (node.child1() == child1 && canonicalize(node.child2()) == canonicalize(child2))
     
    11861197                break;
    11871198            case PutByVal:
    1188             case PutByValAlias:
    1189                 if (!byValIsPure(node))
     1199            case PutByValAlias: {
     1200               
     1201                NodeIndex base = m_graph.m_varArgChildren[node.firstChild()];
     1202                    NodeIndex property = m_graph.m_varArgChildren[node.firstChild() + 1];
     1203                if (!byValIndexIsPure(m_graph[property]))
    11901204                    return NoNode;
    1191                 if (node.child1() == child1 && canonicalize(node.child2()) == canonicalize(child2))
    1192                     return node.child3();
     1205                if (base == child1 && canonicalize(property) == canonicalize(child2))
     1206                    return m_graph.m_varArgChildren[node.firstChild() + 2];
    11931207                // We must assume that the PutByVal will clobber the location we're getting from.
    11941208                // FIXME: We can do better; if we know that the PutByVal is accessing an array of a
    11951209                // different type than the GetByVal, then we know that they won't clobber each other.
    11961210                return NoNode;
     1211            }
    11971212            case PutStructure:
    11981213            case PutByOffset:
     
    12501265               
    12511266            case PutByVal:
    1252             case PutByValAlias:
    1253                 if (byValIsPure(node)) {
     1267            case PutByValAlias: {
     1268                NodeIndex property = m_graph.m_varArgChildren[node.firstChild() + 1];
     1269                if (byValIndexIsPure(m_graph[property])) {
    12541270                    // If PutByVal speculates that it's accessing an array with an
    12551271                    // integer index, then it's impossible for it to cause a structure
     
    12581274                }
    12591275                return false;
    1260                
     1276            }
     1277
    12611278            default:
    12621279                if (clobbersWorld(index))
     
    12931310               
    12941311            case PutByVal:
    1295             case PutByValAlias:
    1296                 if (byValIsPure(node)) {
     1312            case PutByValAlias: {
     1313                NodeIndex property = m_graph.m_varArgChildren[node.firstChild() + 1];
     1314                if (byValIndexIsPure(m_graph[property])) {
    12971315                    // If PutByVal speculates that it's accessing an array with an
    12981316                    // integer index, then it's impossible for it to cause a structure
     
    13011319                }
    13021320                return NoNode;
    1303                
     1321            }
     1322
    13041323            default:
    13051324                if (clobbersWorld(index))
     
    13291348               
    13301349            case PutByVal:
    1331             case PutByValAlias:
    1332                 if (byValIsPure(node)) {
     1350            case PutByValAlias: {
     1351                NodeIndex property = m_graph.m_varArgChildren[node.firstChild() + 1];
     1352                if (byValIndexIsPure(m_graph[property])) {
    13331353                    // If PutByVal speculates that it's accessing an array with an
    13341354                    // integer index, then it's impossible for it to cause a structure
     
    13371357                }
    13381358                return NoNode;
    1339                
     1359            }
     1360
    13401361            default:
    13411362                if (clobbersWorld(index))
     
    13471368    }
    13481369
    1349     NodeIndex getIndexedPropertyStorageLoadElimination(NodeIndex child1, bool hasIntegerIndexPrediction)
     1370    NodeIndex getIndexedPropertyStorageLoadElimination(NodeIndex child1)
    13501371    {
    13511372        NodeIndex start = startIndexForChildren(child1);
     
    13561377                PredictedType basePrediction = m_graph[node.child2()].prediction();
    13571378                bool nodeHasIntegerIndexPrediction = !(!(basePrediction & PredictInt32) && basePrediction);
    1358                 if (node.child1() == child1 && hasIntegerIndexPrediction == nodeHasIntegerIndexPrediction)
     1379                if (node.child1() == child1 && nodeHasIntegerIndexPrediction)
    13591380                    return index;
    13601381                break;
     
    13711392                break;
    13721393               
    1373             case PutByVal:
    1374                 if (isFixedIndexedStorageObjectPrediction(m_graph[node.child1()].prediction()) && byValIsPure(node))
     1394            case PutByVal: {
     1395                NodeIndex base = m_graph.m_varArgChildren[node.firstChild()];
     1396                NodeIndex property = m_graph.m_varArgChildren[node.firstChild() + 1];
     1397                if (isFixedIndexedStorageObjectPrediction(m_graph[base].prediction()) && byValIndexIsPure(m_graph[property]))
    13751398                    break;
    13761399                return NoNode;
     1400            }
    13771401
    13781402            default:
     
    15551579           
    15561580        case GetByVal:
    1557             if (byValIsPure(node))
     1581            if (byValIndexIsPure(m_graph[node.child2()]))
    15581582                setReplacement(getByValLoadElimination(node.child1(), node.child2()));
    15591583            break;
    15601584           
    1561         case PutByVal:
    1562             if (byValIsPure(node) && getByValLoadElimination(node.child1(), node.child2()) != NoNode)
     1585        case PutByVal: {
     1586            NodeIndex base = m_graph.m_varArgChildren[node.firstChild()];
     1587            NodeIndex property = m_graph.m_varArgChildren[node.firstChild() + 1];
     1588            if (byValIndexIsPure(m_graph[property]) && getByValLoadElimination(base, property) != NoNode)
    15631589                node.op = PutByValAlias;
    15641590            break;
     1591        }
    15651592           
    15661593        case CheckStructure:
     
    15771604            PredictedType basePrediction = m_graph[node.child2()].prediction();
    15781605            bool nodeHasIntegerIndexPrediction = !(!(basePrediction & PredictInt32) && basePrediction);
    1579             setReplacement(getIndexedPropertyStorageLoadElimination(node.child1(), nodeHasIntegerIndexPrediction));
     1606            if (nodeHasIntegerIndexPrediction)
     1607                setReplacement(getIndexedPropertyStorageLoadElimination(node.child1()));
    15801608            break;
    15811609        }
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp

    r103218 r103250  
    15541554}
    15551555
    1556 void SpeculativeJIT::compilePutByValForByteArray(GPRReg base, GPRReg property, Node& node)
    1557 {
    1558     NodeIndex baseIndex = node.child1();
    1559     NodeIndex valueIndex = node.child3();
    1560    
    1561     if (!isByteArrayPrediction(m_state.forNode(baseIndex).m_type))
    1562         speculationCheck(BadType, JSValueSource::unboxedCell(base), baseIndex, m_jit.branchPtr(MacroAssembler::NotEqual, MacroAssembler::Address(base, JSCell::classInfoOffset()), MacroAssembler::TrustedImmPtr(&JSByteArray::s_info)));
     1556void SpeculativeJIT::compilePutByValForByteArray(Node& node)
     1557{
     1558    NodeIndex baseIndex = m_jit.graph().m_varArgChildren[node.firstChild()];
     1559    NodeIndex propertyIndex = m_jit.graph().m_varArgChildren[node.firstChild() + 1];
     1560    NodeIndex valueIndex = m_jit.graph().m_varArgChildren[node.firstChild() + 2];
     1561    NodeIndex storageIndex = m_jit.graph().m_varArgChildren[node.firstChild() + 3];
     1562   
     1563    if (!isByteArrayPrediction(m_state.forNode(baseIndex).m_type)) {
     1564        SpeculateCellOperand base(this, baseIndex);
     1565        speculationCheck(BadType, JSValueSource::unboxedCell(base.gpr()), baseIndex, m_jit.branchPtr(MacroAssembler::NotEqual, MacroAssembler::Address(base.gpr(), JSCell::classInfoOffset()), MacroAssembler::TrustedImmPtr(&JSByteArray::s_info)));
     1566    }
    15631567    GPRTemporary value;
    15641568    GPRReg valueGPR;
     
    16071611        valueGPR = gpr;
    16081612    }
    1609     ASSERT_UNUSED(valueGPR, valueGPR != property);
    1610     ASSERT(valueGPR != base);
    1611     GPRTemporary storage(this);
     1613    StorageOperand storage(this, storageIndex);
     1614    SpeculateIntegerOperand property(this, propertyIndex);
    16121615    GPRReg storageReg = storage.gpr();
    1613     ASSERT(valueGPR != storageReg);
    1614     m_jit.loadPtr(MacroAssembler::Address(base, JSByteArray::offsetOfStorage()), storageReg);
    1615     MacroAssembler::Jump outOfBounds = m_jit.branch32(MacroAssembler::AboveOrEqual, property, MacroAssembler::Address(storageReg, ByteArray::offsetOfSize()));
    1616     m_jit.store8(value.gpr(), MacroAssembler::BaseIndex(storageReg, property, MacroAssembler::TimesOne, ByteArray::offsetOfData()));
     1616    MacroAssembler::Jump outOfBounds = m_jit.branch32(MacroAssembler::AboveOrEqual, property.gpr(), MacroAssembler::Address(storageReg, ByteArray::offsetOfSize()));
     1617    m_jit.store8(value.gpr(), MacroAssembler::BaseIndex(storageReg, property.gpr(), MacroAssembler::TimesOne, ByteArray::offsetOfData()));
    16171618    outOfBounds.link(&m_jit);
    16181619    noResult(m_compileIndex);
     
    17111712}
    17121713
    1713 void SpeculativeJIT::compilePutByValForIntTypedArray(const TypedArrayDescriptor& descriptor, GPRReg base, GPRReg property, Node& node, size_t elementSize, TypedArraySpeculationRequirements speculationRequirements, TypedArraySignedness signedness)
    1714 {
    1715     NodeIndex baseIndex = node.child1();
    1716     NodeIndex valueIndex = node.child3();
    1717    
    1718     if (speculationRequirements != NoTypedArrayTypeSpecCheck)
    1719         speculationCheck(BadType, JSValueSource::unboxedCell(base), baseIndex, m_jit.branchPtr(MacroAssembler::NotEqual, MacroAssembler::Address(base, JSCell::classInfoOffset()), MacroAssembler::TrustedImmPtr(descriptor.m_classInfo)));
     1714void SpeculativeJIT::compilePutByValForIntTypedArray(const TypedArrayDescriptor& descriptor, Node& node, size_t elementSize, TypedArraySpeculationRequirements speculationRequirements, TypedArraySignedness signedness)
     1715{
     1716    NodeIndex baseIndex = m_jit.graph().m_varArgChildren[node.firstChild()];
     1717    NodeIndex propertyIndex = m_jit.graph().m_varArgChildren[node.firstChild() + 1];
     1718    NodeIndex valueIndex = m_jit.graph().m_varArgChildren[node.firstChild() + 2];
     1719    NodeIndex storageIndex = m_jit.graph().m_varArgChildren[node.firstChild() + 3];
     1720
     1721    if (speculationRequirements != NoTypedArrayTypeSpecCheck) {
     1722        SpeculateCellOperand base(this, baseIndex);
     1723        speculationCheck(BadType, JSValueSource::unboxedCell(base.gpr()), baseIndex, m_jit.branchPtr(MacroAssembler::NotEqual, MacroAssembler::Address(base.gpr()), MacroAssembler::TrustedImmPtr(descriptor.m_classInfo)));
     1724    }
     1725   
     1726    StorageOperand storage(this, storageIndex);
     1727    GPRReg storageReg = storage.gpr();
     1728    SpeculateIntegerOperand property(this, propertyIndex);
     1729    GPRReg propertyReg = property.gpr();
     1730    MacroAssembler::Jump outOfBounds;
     1731    if (speculationRequirements != NoTypedArrayTypeSpecCheck || speculationRequirements != NoTypedArraySpecCheck) {
     1732        SpeculateCellOperand base(this, baseIndex);
     1733        if (speculationRequirements != NoTypedArrayTypeSpecCheck)
     1734            speculationCheck(BadType, JSValueSource::unboxedCell(base.gpr()), baseIndex, m_jit.branchPtr(MacroAssembler::NotEqual, MacroAssembler::Address(base.gpr(), JSCell::classInfoOffset()), MacroAssembler::TrustedImmPtr(descriptor.m_classInfo)));
     1735        if (speculationRequirements != NoTypedArraySpecCheck)
     1736            outOfBounds = m_jit.branch32(MacroAssembler::AboveOrEqual, propertyReg, MacroAssembler::Address(base.gpr(), descriptor.m_lengthOffset));
     1737    }
    17201738    GPRTemporary value;
    17211739    GPRReg valueGPR;
     
    17591777        valueGPR = gpr;
    17601778    }
    1761     ASSERT_UNUSED(valueGPR, valueGPR != property);
    1762     ASSERT(valueGPR != base);
    1763     GPRTemporary storage(this);
    1764     GPRReg storageReg = storage.gpr();
    1765     ASSERT(valueGPR != storageReg);
    1766     m_jit.loadPtr(MacroAssembler::Address(base, descriptor.m_storageOffset), storageReg);
    1767     MacroAssembler::Jump outOfBounds;
    1768     if (speculationRequirements != NoTypedArraySpecCheck)
    1769         outOfBounds = m_jit.branch32(MacroAssembler::AboveOrEqual, property, MacroAssembler::Address(base, descriptor.m_lengthOffset));
    17701779
    17711780    switch (elementSize) {
    17721781    case 1:
    1773         m_jit.store8(value.gpr(), MacroAssembler::BaseIndex(storageReg, property, MacroAssembler::TimesOne));
     1782        m_jit.store8(value.gpr(), MacroAssembler::BaseIndex(storageReg, propertyReg, MacroAssembler::TimesOne));
    17741783        break;
    17751784    case 2:
    1776         m_jit.store16(value.gpr(), MacroAssembler::BaseIndex(storageReg, property, MacroAssembler::TimesTwo));
     1785        m_jit.store16(value.gpr(), MacroAssembler::BaseIndex(storageReg, propertyReg, MacroAssembler::TimesTwo));
    17771786        break;
    17781787    case 4:
    1779         m_jit.store32(value.gpr(), MacroAssembler::BaseIndex(storageReg, property, MacroAssembler::TimesFour));
     1788        m_jit.store32(value.gpr(), MacroAssembler::BaseIndex(storageReg, propertyReg, MacroAssembler::TimesFour));
    17801789        break;
    17811790    default:
     
    18321841}
    18331842
    1834 void SpeculativeJIT::compilePutByValForFloatTypedArray(const TypedArrayDescriptor& descriptor, GPRReg base, GPRReg property, Node& node, size_t elementSize, TypedArraySpeculationRequirements speculationRequirements)
    1835 {
    1836     NodeIndex baseIndex = node.child1();
    1837     NodeIndex valueIndex = node.child3();
     1843void SpeculativeJIT::compilePutByValForFloatTypedArray(const TypedArrayDescriptor& descriptor, Node& node, size_t elementSize, TypedArraySpeculationRequirements speculationRequirements)
     1844{
     1845    NodeIndex baseIndex = m_jit.graph().m_varArgChildren[node.firstChild()];
     1846    NodeIndex propertyIndex = m_jit.graph().m_varArgChildren[node.firstChild() + 1];
     1847    NodeIndex valueIndex = m_jit.graph().m_varArgChildren[node.firstChild() + 2];
     1848    NodeIndex storageIndex = m_jit.graph().m_varArgChildren[node.firstChild() + 3];
    18381849   
    18391850    SpeculateDoubleOperand valueOp(this, valueIndex);
    1840    
    1841     if (speculationRequirements != NoTypedArrayTypeSpecCheck)
    1842         speculationCheck(BadType, JSValueSource::unboxedCell(base), baseIndex, m_jit.branchPtr(MacroAssembler::NotEqual, MacroAssembler::Address(base, JSCell::classInfoOffset()), MacroAssembler::TrustedImmPtr(descriptor.m_classInfo)));
    1843    
    1844     GPRTemporary result(this);
    1845    
    1846     GPRTemporary storage(this);
     1851    SpeculateStrictInt32Operand property(this, propertyIndex);
     1852    StorageOperand storage(this, storageIndex);
    18471853    GPRReg storageReg = storage.gpr();
    1848    
    1849     m_jit.loadPtr(MacroAssembler::Address(base, descriptor.m_storageOffset), storageReg);
     1854    GPRReg propertyReg = property.gpr();
     1855   
    18501856    MacroAssembler::Jump outOfBounds;
    1851     if (speculationRequirements != NoTypedArraySpecCheck)
    1852         outOfBounds = m_jit.branch32(MacroAssembler::AboveOrEqual, property, MacroAssembler::Address(base, descriptor.m_lengthOffset));
     1857    if (speculationRequirements != NoTypedArrayTypeSpecCheck || speculationRequirements != NoTypedArraySpecCheck) {
     1858        SpeculateCellOperand base(this, baseIndex);
     1859        if (speculationRequirements != NoTypedArrayTypeSpecCheck)
     1860            speculationCheck(BadType, JSValueSource::unboxedCell(base.gpr()), baseIndex, m_jit.branchPtr(MacroAssembler::NotEqual, MacroAssembler::Address(base.gpr(), JSCell::classInfoOffset()), MacroAssembler::TrustedImmPtr(descriptor.m_classInfo)));
     1861        if (speculationRequirements != NoTypedArraySpecCheck)
     1862            outOfBounds = m_jit.branch32(MacroAssembler::AboveOrEqual, propertyReg, MacroAssembler::Address(base.gpr(), descriptor.m_lengthOffset));
     1863    }
     1864   
     1865
    18531866   
    18541867    switch (elementSize) {
     
    18571870        m_jit.moveDouble(valueOp.fpr(), scratch.fpr());
    18581871        m_jit.convertDoubleToFloat(valueOp.fpr(), scratch.fpr());
    1859         m_jit.storeFloat(scratch.fpr(), MacroAssembler::BaseIndex(storageReg, property, MacroAssembler::TimesFour));
     1872        m_jit.storeFloat(scratch.fpr(), MacroAssembler::BaseIndex(storageReg, propertyReg, MacroAssembler::TimesFour));
    18601873        break;
    18611874    }
    18621875    case 8:
    1863         m_jit.storeDouble(valueOp.fpr(), MacroAssembler::BaseIndex(storageReg, property, MacroAssembler::TimesEight));
     1876        m_jit.storeDouble(valueOp.fpr(), MacroAssembler::BaseIndex(storageReg, propertyReg, MacroAssembler::TimesEight));
    18641877        break;
    18651878    default:
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h

    r103138 r103250  
    19711971    void compileUInt32ToNumber(Node&);
    19721972    void compileGetByValOnByteArray(Node&);
    1973     void compilePutByValForByteArray(GPRReg base, GPRReg property, Node&);
     1973    void compilePutByValForByteArray(Node&);
    19741974    void compileArithMul(Node&);
    19751975    void compileArithMod(Node&);
     
    19871987    void compileGetIndexedPropertyStorage(Node&);
    19881988    void compileGetByValOnIntTypedArray(const TypedArrayDescriptor&, Node&, size_t elementSize, TypedArraySpeculationRequirements, TypedArraySignedness);
    1989     void compilePutByValForIntTypedArray(const TypedArrayDescriptor&, GPRReg base, GPRReg property, Node&, size_t elementSize, TypedArraySpeculationRequirements, TypedArraySignedness);
     1989    void compilePutByValForIntTypedArray(const TypedArrayDescriptor&, Node&, size_t elementSize, TypedArraySpeculationRequirements, TypedArraySignedness);
    19901990    void compileGetByValOnFloatTypedArray(const TypedArrayDescriptor&, Node&, size_t elementSize, TypedArraySpeculationRequirements);
    1991     void compilePutByValForFloatTypedArray(const TypedArrayDescriptor&, GPRReg base, GPRReg property, Node&, size_t elementSize, TypedArraySpeculationRequirements);
     1991    void compilePutByValForFloatTypedArray(const TypedArrayDescriptor&, Node&, size_t elementSize, TypedArraySpeculationRequirements);
    19921992   
    19931993    // It is acceptable to have structure be equal to scratch, so long as you're fine
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp

    r103218 r103250  
    26942694
    26952695    case PutByVal: {
    2696         PredictedType basePrediction = at(node.child2()).prediction();
     2696        NodeIndex child1 = m_jit.graph().m_varArgChildren[node.firstChild()];
     2697        NodeIndex child2 = m_jit.graph().m_varArgChildren[node.firstChild() + 1];
     2698        NodeIndex child3 = m_jit.graph().m_varArgChildren[node.firstChild() + 2];
     2699        NodeIndex child4 = m_jit.graph().m_varArgChildren[node.firstChild() + 3];
     2700
     2701        PredictedType basePrediction = at(child2).prediction();
    26972702        if (!(basePrediction & PredictInt32) && basePrediction) {
    2698             SpeculateCellOperand base(this, node.child1()); // Save a register, speculate cell. We'll probably be right.
    2699             JSValueOperand property(this, node.child2());
    2700             JSValueOperand value(this, node.child3());
     2703            SpeculateCellOperand base(this, child1); // Save a register, speculate cell. We'll probably be right.
     2704            JSValueOperand property(this, child2);
     2705            JSValueOperand value(this, child3);
    27012706            GPRReg baseGPR = base.gpr();
    27022707            GPRReg propertyTagGPR = property.tagGPR();
     
    27122717        }
    27132718
    2714         SpeculateCellOperand base(this, node.child1());
    2715         SpeculateStrictInt32Operand property(this, node.child2());
    2716         if (at(node.child1()).shouldSpeculateByteArray()) {
    2717             compilePutByValForByteArray(base.gpr(), property.gpr(), node);
     2719        if (at(child1).shouldSpeculateByteArray()) {
     2720            compilePutByValForByteArray(node);
    27182721            break;
    27192722        }
    2720         if (at(node.child1()).shouldSpeculateByteArray()) {
    2721             compilePutByValForByteArray(base.gpr(), property.gpr(), node);
    2722             break;
    2723         }
    2724        
    2725         if (at(node.child1()).shouldSpeculateInt8Array()) {
    2726             compilePutByValForIntTypedArray(m_jit.globalData()->int8ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(int8_t), isInt8ArrayPrediction(m_state.forNode(node.child1()).m_type) ? NoTypedArrayTypeSpecCheck : AllTypedArraySpecChecks, SignedTypedArray);
     2723       
     2724        if (at(child1).shouldSpeculateInt8Array()) {
     2725            compilePutByValForIntTypedArray(m_jit.globalData()->int8ArrayDescriptor(), node, sizeof(int8_t), isInt8ArrayPrediction(m_state.forNode(child1).m_type) ? NoTypedArrayTypeSpecCheck : AllTypedArraySpecChecks, SignedTypedArray);
    27272726            if (!m_compileOkay)
    27282727                return;
     
    27302729        }
    27312730       
    2732         if (at(node.child1()).shouldSpeculateInt16Array()) {
    2733             compilePutByValForIntTypedArray(m_jit.globalData()->int16ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(int16_t), isInt16ArrayPrediction(m_state.forNode(node.child1()).m_type) ? NoTypedArrayTypeSpecCheck : AllTypedArraySpecChecks, SignedTypedArray);
     2731        if (at(child1).shouldSpeculateInt16Array()) {
     2732            compilePutByValForIntTypedArray(m_jit.globalData()->int16ArrayDescriptor(), node, sizeof(int16_t), isInt16ArrayPrediction(m_state.forNode(child1).m_type) ? NoTypedArrayTypeSpecCheck : AllTypedArraySpecChecks, SignedTypedArray);
    27342733            if (!m_compileOkay)
    27352734                return;
     
    27372736        }
    27382737       
    2739         if (at(node.child1()).shouldSpeculateInt32Array()) {
    2740             compilePutByValForIntTypedArray(m_jit.globalData()->int32ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(int32_t), isInt32ArrayPrediction(m_state.forNode(node.child1()).m_type) ? NoTypedArrayTypeSpecCheck : AllTypedArraySpecChecks, SignedTypedArray);
     2738        if (at(child1).shouldSpeculateInt32Array()) {
     2739            compilePutByValForIntTypedArray(m_jit.globalData()->int32ArrayDescriptor(), node, sizeof(int32_t), isInt32ArrayPrediction(m_state.forNode(child1).m_type) ? NoTypedArrayTypeSpecCheck : AllTypedArraySpecChecks, SignedTypedArray);
    27412740            if (!m_compileOkay)
    27422741                return;
     
    27442743        }
    27452744       
    2746         if (at(node.child1()).shouldSpeculateUint8Array()) {
    2747             compilePutByValForIntTypedArray(m_jit.globalData()->uint8ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(uint8_t), isUint8ArrayPrediction(m_state.forNode(node.child1()).m_type) ? NoTypedArrayTypeSpecCheck : AllTypedArraySpecChecks, UnsignedTypedArray);
     2745        if (at(child1).shouldSpeculateUint8Array()) {
     2746            compilePutByValForIntTypedArray(m_jit.globalData()->uint8ArrayDescriptor(), node, sizeof(uint8_t), isUint8ArrayPrediction(m_state.forNode(child1).m_type) ? NoTypedArrayTypeSpecCheck : AllTypedArraySpecChecks, UnsignedTypedArray);
    27482747            if (!m_compileOkay)
    27492748                return;
     
    27512750        }
    27522751       
    2753         if (at(node.child1()).shouldSpeculateUint16Array()) {
    2754             compilePutByValForIntTypedArray(m_jit.globalData()->uint16ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(uint16_t), isUint16ArrayPrediction(m_state.forNode(node.child1()).m_type) ? NoTypedArrayTypeSpecCheck : AllTypedArraySpecChecks, UnsignedTypedArray);
     2752        if (at(child1).shouldSpeculateUint16Array()) {
     2753            compilePutByValForIntTypedArray(m_jit.globalData()->uint16ArrayDescriptor(), node, sizeof(uint16_t), isUint16ArrayPrediction(m_state.forNode(child1).m_type) ? NoTypedArrayTypeSpecCheck : AllTypedArraySpecChecks, UnsignedTypedArray);
    27552754            if (!m_compileOkay)
    27562755                return;
     
    27582757        }
    27592758       
    2760         if (at(node.child1()).shouldSpeculateUint32Array()) {
    2761             compilePutByValForIntTypedArray(m_jit.globalData()->uint32ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(uint32_t), isUint32ArrayPrediction(m_state.forNode(node.child1()).m_type) ? NoTypedArrayTypeSpecCheck : AllTypedArraySpecChecks, UnsignedTypedArray);
     2759        if (at(child1).shouldSpeculateUint32Array()) {
     2760            compilePutByValForIntTypedArray(m_jit.globalData()->uint32ArrayDescriptor(), node, sizeof(uint32_t), isUint32ArrayPrediction(m_state.forNode(child1).m_type) ? NoTypedArrayTypeSpecCheck : AllTypedArraySpecChecks, UnsignedTypedArray);
    27622761            if (!m_compileOkay)
    27632762                return;
     
    27652764        }
    27662765       
    2767         if (at(node.child1()).shouldSpeculateFloat32Array()) {
    2768             compilePutByValForFloatTypedArray(m_jit.globalData()->float32ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(float), isFloat32ArrayPrediction(m_state.forNode(node.child1()).m_type) ? NoTypedArrayTypeSpecCheck : AllTypedArraySpecChecks);
     2766        if (at(child1).shouldSpeculateFloat32Array()) {
     2767            compilePutByValForFloatTypedArray(m_jit.globalData()->float32ArrayDescriptor(), node, sizeof(float), isFloat32ArrayPrediction(m_state.forNode(child1).m_type) ? NoTypedArrayTypeSpecCheck : AllTypedArraySpecChecks);
    27692768            if (!m_compileOkay)
    27702769                return;
     
    27722771        }
    27732772       
    2774         if (at(node.child1()).shouldSpeculateFloat64Array()) {
    2775             compilePutByValForFloatTypedArray(m_jit.globalData()->float64ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(double), isFloat64ArrayPrediction(m_state.forNode(node.child1()).m_type) ? NoTypedArrayTypeSpecCheck : AllTypedArraySpecChecks);
     2773        if (at(child1).shouldSpeculateFloat64Array()) {
     2774            compilePutByValForFloatTypedArray(m_jit.globalData()->float64ArrayDescriptor(), node, sizeof(double), isFloat64ArrayPrediction(m_state.forNode(child1).m_type) ? NoTypedArrayTypeSpecCheck : AllTypedArraySpecChecks);
    27762775            if (!m_compileOkay)
    27772776                return;
     
    27792778        }
    27802779
    2781         JSValueOperand value(this, node.child3());
    2782         GPRTemporary scratch(this);
     2780        SpeculateCellOperand base(this, child1);
     2781        SpeculateStrictInt32Operand property(this, child2);
     2782        JSValueOperand value(this, child3);
    27832783
    27842784        // Map base, property & value into registers, allocate a scratch register.
     
    27872787        GPRReg valueTagReg = value.tagGPR();
    27882788        GPRReg valuePayloadReg = value.payloadGPR();
    2789         GPRReg scratchReg = scratch.gpr();
    27902789       
    27912790        if (!m_compileOkay)
    27922791            return;
    2793        
    2794         writeBarrier(baseReg, valueTagReg, node.child3(), WriteBarrierForPropertyAccess, scratchReg);
     2792
     2793        {
     2794            GPRTemporary scratch(this);
     2795            writeBarrier(baseReg, valueTagReg, child3, WriteBarrierForPropertyAccess, scratch.gpr());
     2796        }
    27952797
    27962798        // Check that base is an array, and that property is contained within m_vector (< m_vectorLength).
    27972799        // If we have predicted the base to be type array, we can skip the check.
    2798         if (!isArrayPrediction(m_state.forNode(node.child1()).m_type))
    2799             speculationCheck(BadType, JSValueSource::unboxedCell(baseReg), node.child1(), m_jit.branchPtr(MacroAssembler::NotEqual, MacroAssembler::Address(baseReg, JSCell::classInfoOffset()), MacroAssembler::TrustedImmPtr(&JSArray::s_info)));
     2800        if (!isArrayPrediction(m_state.forNode(child1).m_type))
     2801            speculationCheck(BadType, JSValueSource::unboxedCell(baseReg), child1, m_jit.branchPtr(MacroAssembler::NotEqual, MacroAssembler::Address(baseReg, JSCell::classInfoOffset()), MacroAssembler::TrustedImmPtr(&JSArray::s_info)));
     2802
     2803        StorageOperand storage(this, child4);
     2804        GPRReg storageReg = storage.gpr();
    28002805
    28012806        base.use();
    28022807        property.use();
    28032808        value.use();
     2809        storage.use();
    28042810       
    28052811        MacroAssembler::Jump withinArrayBounds = m_jit.branch32(MacroAssembler::Below, propertyReg, MacroAssembler::Address(baseReg, JSArray::vectorLengthOffset()));
    28062812
    28072813        // Code to handle put beyond array bounds.
    2808         silentSpillAllRegisters(scratchReg);
     2814        silentSpillAllRegisters(InvalidGPRReg);
    28092815        callOperation(operationPutByValBeyondArrayBounds, baseReg, propertyReg, valueTagReg, valuePayloadReg);
    2810         silentFillAllRegisters(scratchReg);
     2816        silentFillAllRegisters(InvalidGPRReg);
    28112817        JITCompiler::Jump wasBeyondArrayBounds = m_jit.jump();
    28122818
    28132819        withinArrayBounds.link(&m_jit);
    2814 
    2815         // Get the array storage.
    2816         GPRReg storageReg = scratchReg;
    2817         m_jit.loadPtr(MacroAssembler::Address(baseReg, JSArray::storageOffset()), storageReg);
    28182820
    28192821        // Check if we're writing to a hole; if so increment m_numValuesInVector.
     
    28412843
    28422844    case PutByValAlias: {
    2843         SpeculateCellOperand base(this, node.child1());
    2844         SpeculateStrictInt32Operand property(this, node.child2());
    2845 
    2846         if (at(node.child1()).shouldSpeculateByteArray()) {
    2847             compilePutByValForByteArray(base.gpr(), property.gpr(), node);
     2845        NodeIndex child1 = m_jit.graph().m_varArgChildren[node.firstChild()];
     2846        NodeIndex child2 = m_jit.graph().m_varArgChildren[node.firstChild() + 1];
     2847        NodeIndex child3 = m_jit.graph().m_varArgChildren[node.firstChild() + 2];
     2848        NodeIndex child4 = m_jit.graph().m_varArgChildren[node.firstChild() + 3];
     2849
     2850        if (at(child1).shouldSpeculateByteArray()) {
     2851            compilePutByValForByteArray(node);
    28482852            break;
    28492853        }
    28502854       
    2851         if (at(node.child1()).shouldSpeculateInt8Array()) {
    2852             compilePutByValForIntTypedArray(m_jit.globalData()->int8ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(int8_t), NoTypedArraySpecCheck, SignedTypedArray);
     2855        if (at(child1).shouldSpeculateInt8Array()) {
     2856            compilePutByValForIntTypedArray(m_jit.globalData()->int8ArrayDescriptor(), node, sizeof(int8_t), NoTypedArraySpecCheck, SignedTypedArray);
    28532857            if (!m_compileOkay)
    28542858                return;
     
    28562860        }
    28572861       
    2858         if (at(node.child1()).shouldSpeculateInt16Array()) {
    2859             compilePutByValForIntTypedArray(m_jit.globalData()->int16ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(int16_t), NoTypedArraySpecCheck, SignedTypedArray);
     2862        if (at(child1).shouldSpeculateInt16Array()) {
     2863            compilePutByValForIntTypedArray(m_jit.globalData()->int16ArrayDescriptor(), node, sizeof(int16_t), NoTypedArraySpecCheck, SignedTypedArray);
    28602864            if (!m_compileOkay)
    28612865                return;
     
    28632867        }
    28642868       
    2865         if (at(node.child1()).shouldSpeculateInt32Array()) {
    2866             compilePutByValForIntTypedArray(m_jit.globalData()->int32ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(int32_t), NoTypedArraySpecCheck, SignedTypedArray);
     2869        if (at(child1).shouldSpeculateInt32Array()) {
     2870            compilePutByValForIntTypedArray(m_jit.globalData()->int32ArrayDescriptor(), node, sizeof(int32_t), NoTypedArraySpecCheck, SignedTypedArray);
    28672871            if (!m_compileOkay)
    28682872                return;
     
    28702874        }
    28712875       
    2872         if (at(node.child1()).shouldSpeculateUint8Array()) {
    2873             compilePutByValForIntTypedArray(m_jit.globalData()->uint8ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(uint8_t), NoTypedArraySpecCheck, UnsignedTypedArray);
     2876        if (at(child1).shouldSpeculateUint8Array()) {
     2877            compilePutByValForIntTypedArray(m_jit.globalData()->uint8ArrayDescriptor(), node, sizeof(uint8_t), NoTypedArraySpecCheck, UnsignedTypedArray);
    28742878            if (!m_compileOkay)
    28752879                return;
     
    28772881        }
    28782882       
    2879         if (at(node.child1()).shouldSpeculateUint16Array()) {
    2880             compilePutByValForIntTypedArray(m_jit.globalData()->uint16ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(uint16_t), NoTypedArraySpecCheck, UnsignedTypedArray);
     2883        if (at(child1).shouldSpeculateUint16Array()) {
     2884            compilePutByValForIntTypedArray(m_jit.globalData()->uint16ArrayDescriptor(), node, sizeof(uint16_t), NoTypedArraySpecCheck, UnsignedTypedArray);
    28812885            if (!m_compileOkay)
    28822886                return;
     
    28842888        }
    28852889       
    2886         if (at(node.child1()).shouldSpeculateUint32Array()) {
    2887             compilePutByValForIntTypedArray(m_jit.globalData()->uint32ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(uint32_t), NoTypedArraySpecCheck, UnsignedTypedArray);
     2890        if (at(child1).shouldSpeculateUint32Array()) {
     2891            compilePutByValForIntTypedArray(m_jit.globalData()->uint32ArrayDescriptor(), node, sizeof(uint32_t), NoTypedArraySpecCheck, UnsignedTypedArray);
    28882892            if (!m_compileOkay)
    28892893                return;
     
    28912895        }
    28922896       
    2893         if (at(node.child1()).shouldSpeculateFloat32Array()) {
    2894             compilePutByValForFloatTypedArray(m_jit.globalData()->float32ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(float), NoTypedArraySpecCheck);
     2897        if (at(child1).shouldSpeculateFloat32Array()) {
     2898            compilePutByValForFloatTypedArray(m_jit.globalData()->float32ArrayDescriptor(), node, sizeof(float), NoTypedArraySpecCheck);
    28952899            if (!m_compileOkay)
    28962900                return;
     
    28982902        }
    28992903       
    2900         if (at(node.child1()).shouldSpeculateFloat64Array()) {
    2901             compilePutByValForFloatTypedArray(m_jit.globalData()->float64ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(double), NoTypedArraySpecCheck);
     2904        if (at(child1).shouldSpeculateFloat64Array()) {
     2905            compilePutByValForFloatTypedArray(m_jit.globalData()->float64ArrayDescriptor(), node, sizeof(double), NoTypedArraySpecCheck);
    29022906            if (!m_compileOkay)
    29032907                return;
    29042908            break;           
    29052909        }
    2906 
    2907         JSValueOperand value(this, node.child3());
    2908         GPRTemporary scratch(this, base);
    2909        
    2910         GPRReg baseReg = base.gpr();
    2911         GPRReg scratchReg = scratch.gpr();
    2912 
    2913         writeBarrier(baseReg, value.tagGPR(), node.child3(), WriteBarrierForPropertyAccess, scratchReg);
    2914 
    2915         // Get the array storage.
    2916         GPRReg storageReg = scratchReg;
    2917         m_jit.loadPtr(MacroAssembler::Address(baseReg, JSArray::storageOffset()), storageReg);
    2918 
     2910       
     2911        JSValueOperand value(this, child3);
     2912        {
     2913            SpeculateCellOperand base(this, child1);
     2914            GPRTemporary scratch(this, base);
     2915            GPRReg baseReg = base.gpr();
     2916            GPRReg scratchReg = scratch.gpr();
     2917            writeBarrier(baseReg, value.tagGPR(), child3, WriteBarrierForPropertyAccess, scratchReg);
     2918        }
     2919   
     2920        SpeculateStrictInt32Operand property(this, child2);
     2921        StorageOperand storage(this, child4);
    29192922        // Store the value to the array.
    29202923        GPRReg propertyReg = property.gpr();
    2921         m_jit.store32(value.tagGPR(), MacroAssembler::BaseIndex(storageReg, propertyReg, MacroAssembler::TimesEight, OBJECT_OFFSETOF(ArrayStorage, m_vector[0]) + OBJECT_OFFSETOF(JSValue, u.asBits.tag)));
    2922         m_jit.store32(value.payloadGPR(), MacroAssembler::BaseIndex(storageReg, propertyReg, MacroAssembler::TimesEight, OBJECT_OFFSETOF(ArrayStorage, m_vector[0]) + OBJECT_OFFSETOF(JSValue, u.asBits.payload)));
     2924        m_jit.store32(value.tagGPR(), MacroAssembler::BaseIndex(storage.gpr(), propertyReg, MacroAssembler::TimesEight, OBJECT_OFFSETOF(ArrayStorage, m_vector[0]) + OBJECT_OFFSETOF(JSValue, u.asBits.tag)));
     2925        m_jit.store32(value.payloadGPR(), MacroAssembler::BaseIndex(storage.gpr(), propertyReg, MacroAssembler::TimesEight, OBJECT_OFFSETOF(ArrayStorage, m_vector[0]) + OBJECT_OFFSETOF(JSValue, u.asBits.payload)));
    29232926
    29242927        noResult(m_compileIndex);
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp

    r103218 r103250  
    25982598            break;
    25992599        }
    2600        
     2600        ASSERT(node.child3() != NoNode);
    26012601        if (at(node.child1()).prediction() == PredictString) {
    26022602            compileGetByValOnString(node);
     
    26962696
    26972697    case PutByVal: {
    2698         PredictedType basePrediction = at(node.child2()).prediction();
     2698        NodeIndex child1 = m_jit.graph().m_varArgChildren[node.firstChild()];
     2699        NodeIndex child2 = m_jit.graph().m_varArgChildren[node.firstChild() + 1];
     2700        NodeIndex child3 = m_jit.graph().m_varArgChildren[node.firstChild() + 2];
     2701
     2702        PredictedType basePrediction = at(child2).prediction();
    26992703        if (!(basePrediction & PredictInt32) && basePrediction) {
    2700             JSValueOperand arg1(this, node.child1());
    2701             JSValueOperand arg2(this, node.child2());
    2702             JSValueOperand arg3(this, node.child3());
     2704            JSValueOperand arg1(this, child1);
     2705            JSValueOperand arg2(this, child2);
     2706            JSValueOperand arg3(this, child3);
    27032707            GPRReg arg1GPR = arg1.gpr();
    27042708            GPRReg arg2GPR = arg2.gpr();
     
    27122716        }
    27132717
    2714         SpeculateCellOperand base(this, node.child1());
    2715         SpeculateStrictInt32Operand property(this, node.child2());
    2716         if (at(node.child1()).shouldSpeculateByteArray()) {
    2717             compilePutByValForByteArray(base.gpr(), property.gpr(), node);
     2718        if (at(child1).shouldSpeculateByteArray()) {
     2719            compilePutByValForByteArray(node);
    27182720            break;
    27192721        }
    27202722       
    2721         if (at(node.child1()).shouldSpeculateInt8Array()) {
    2722             compilePutByValForIntTypedArray(m_jit.globalData()->int8ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(int8_t), isInt8ArrayPrediction(m_state.forNode(node.child1()).m_type) ? NoTypedArrayTypeSpecCheck : AllTypedArraySpecChecks, SignedTypedArray);
     2723        if (at(child1).shouldSpeculateInt8Array()) {
     2724            compilePutByValForIntTypedArray(m_jit.globalData()->int8ArrayDescriptor(), node, sizeof(int8_t), isInt8ArrayPrediction(m_state.forNode(child1).m_type) ? NoTypedArrayTypeSpecCheck : AllTypedArraySpecChecks, SignedTypedArray);
    27232725            if (!m_compileOkay)
    27242726                return;
     
    27262728        }
    27272729       
    2728         if (at(node.child1()).shouldSpeculateInt16Array()) {
    2729             compilePutByValForIntTypedArray(m_jit.globalData()->int16ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(int16_t), isInt16ArrayPrediction(m_state.forNode(node.child1()).m_type) ? NoTypedArrayTypeSpecCheck : AllTypedArraySpecChecks, SignedTypedArray);
     2730        if (at(child1).shouldSpeculateInt16Array()) {
     2731            compilePutByValForIntTypedArray(m_jit.globalData()->int16ArrayDescriptor(), node, sizeof(int16_t), isInt16ArrayPrediction(m_state.forNode(child1).m_type) ? NoTypedArrayTypeSpecCheck : AllTypedArraySpecChecks, SignedTypedArray);
    27302732            if (!m_compileOkay)
    27312733                return;
     
    27332735        }
    27342736
    2735         if (at(node.child1()).shouldSpeculateInt32Array()) {
    2736             compilePutByValForIntTypedArray(m_jit.globalData()->int32ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(int32_t), isInt32ArrayPrediction(m_state.forNode(node.child1()).m_type) ? NoTypedArrayTypeSpecCheck : AllTypedArraySpecChecks, SignedTypedArray);
     2737        if (at(child1).shouldSpeculateInt32Array()) {
     2738            compilePutByValForIntTypedArray(m_jit.globalData()->int32ArrayDescriptor(), node, sizeof(int32_t), isInt32ArrayPrediction(m_state.forNode(child1).m_type) ? NoTypedArrayTypeSpecCheck : AllTypedArraySpecChecks, SignedTypedArray);
    27372739            if (!m_compileOkay)
    27382740                return;
     
    27402742        }
    27412743       
    2742         if (at(node.child1()).shouldSpeculateUint8Array()) {
    2743             compilePutByValForIntTypedArray(m_jit.globalData()->uint8ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(uint8_t), isUint8ArrayPrediction(m_state.forNode(node.child1()).m_type) ? NoTypedArrayTypeSpecCheck : AllTypedArraySpecChecks, UnsignedTypedArray);
     2744        if (at(child1).shouldSpeculateUint8Array()) {
     2745            compilePutByValForIntTypedArray(m_jit.globalData()->uint8ArrayDescriptor(), node, sizeof(uint8_t), isUint8ArrayPrediction(m_state.forNode(child1).m_type) ? NoTypedArrayTypeSpecCheck : AllTypedArraySpecChecks, UnsignedTypedArray);
    27442746            if (!m_compileOkay)
    27452747                return;
     
    27472749        }
    27482750       
    2749         if (at(node.child1()).shouldSpeculateUint16Array()) {
    2750             compilePutByValForIntTypedArray(m_jit.globalData()->uint16ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(uint16_t), isUint16ArrayPrediction(m_state.forNode(node.child1()).m_type) ? NoTypedArrayTypeSpecCheck : AllTypedArraySpecChecks, UnsignedTypedArray);
     2751        if (at(child1).shouldSpeculateUint16Array()) {
     2752            compilePutByValForIntTypedArray(m_jit.globalData()->uint16ArrayDescriptor(), node, sizeof(uint16_t), isUint16ArrayPrediction(m_state.forNode(child1).m_type) ? NoTypedArrayTypeSpecCheck : AllTypedArraySpecChecks, UnsignedTypedArray);
    27512753            if (!m_compileOkay)
    27522754                return;
     
    27542756        }
    27552757       
    2756         if (at(node.child1()).shouldSpeculateUint32Array()) {
    2757             compilePutByValForIntTypedArray(m_jit.globalData()->uint32ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(uint32_t), isUint32ArrayPrediction(m_state.forNode(node.child1()).m_type) ? NoTypedArrayTypeSpecCheck : AllTypedArraySpecChecks, UnsignedTypedArray);
     2758        if (at(child1).shouldSpeculateUint32Array()) {
     2759            compilePutByValForIntTypedArray(m_jit.globalData()->uint32ArrayDescriptor(), node, sizeof(uint32_t), isUint32ArrayPrediction(m_state.forNode(child1).m_type) ? NoTypedArrayTypeSpecCheck : AllTypedArraySpecChecks, UnsignedTypedArray);
    27582760            if (!m_compileOkay)
    27592761                return;
     
    27612763        }
    27622764       
    2763         if (at(node.child1()).shouldSpeculateFloat32Array()) {
    2764             compilePutByValForFloatTypedArray(m_jit.globalData()->float32ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(float), isFloat32ArrayPrediction(m_state.forNode(node.child1()).m_type) ? NoTypedArrayTypeSpecCheck : AllTypedArraySpecChecks);
     2765        if (at(child1).shouldSpeculateFloat32Array()) {
     2766            compilePutByValForFloatTypedArray(m_jit.globalData()->float32ArrayDescriptor(), node, sizeof(float), isFloat32ArrayPrediction(m_state.forNode(child1).m_type) ? NoTypedArrayTypeSpecCheck : AllTypedArraySpecChecks);
    27652767            if (!m_compileOkay)
    27662768                return;
     
    27682770        }
    27692771       
    2770         if (at(node.child1()).shouldSpeculateFloat64Array()) {
    2771             compilePutByValForFloatTypedArray(m_jit.globalData()->float64ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(double), isFloat64ArrayPrediction(m_state.forNode(node.child1()).m_type) ? NoTypedArrayTypeSpecCheck : AllTypedArraySpecChecks);
     2772        if (at(child1).shouldSpeculateFloat64Array()) {
     2773            compilePutByValForFloatTypedArray(m_jit.globalData()->float64ArrayDescriptor(), node, sizeof(double), isFloat64ArrayPrediction(m_state.forNode(child1).m_type) ? NoTypedArrayTypeSpecCheck : AllTypedArraySpecChecks);
    27722774            if (!m_compileOkay)
    27732775                return;
    27742776            break;           
    27752777        }
    2776 
    2777         JSValueOperand value(this, node.child3());
     2778       
     2779        SpeculateCellOperand base(this, child1);
     2780        SpeculateStrictInt32Operand property(this, child2);
     2781        JSValueOperand value(this, child3);
     2782        NodeIndex child4 = m_jit.graph().m_varArgChildren[node.firstChild() + 3];
     2783        StorageOperand storage(this, child4);
    27782784        GPRTemporary scratch(this);
    2779 
     2785       
    27802786        // Map base, property & value into registers, allocate a scratch register.
    27812787        GPRReg baseReg = base.gpr();
    27822788        GPRReg propertyReg = property.gpr();
    27832789        GPRReg valueReg = value.gpr();
     2790        GPRReg storageReg = storage.gpr();
    27842791        GPRReg scratchReg = scratch.gpr();
    27852792       
     
    27872794            return;
    27882795       
    2789         writeBarrier(baseReg, value.gpr(), node.child3(), WriteBarrierForPropertyAccess, scratchReg);
     2796        writeBarrier(baseReg, value.gpr(), child3, WriteBarrierForPropertyAccess, scratchReg);
    27902797
    27912798        // Check that base is an array, and that property is contained within m_vector (< m_vectorLength).
    27922799        // If we have predicted the base to be type array, we can skip the check.
    2793         if (!isArrayPrediction(m_state.forNode(node.child1()).m_type))
    2794             speculationCheck(BadType, JSValueRegs(baseReg), node.child1(), m_jit.branchPtr(MacroAssembler::NotEqual, MacroAssembler::Address(baseReg, JSCell::classInfoOffset()), MacroAssembler::TrustedImmPtr(&JSArray::s_info)));
     2800        if (!isArrayPrediction(m_state.forNode(child1).m_type))
     2801            speculationCheck(BadType, JSValueRegs(baseReg), child1, m_jit.branchPtr(MacroAssembler::NotEqual, MacroAssembler::Address(baseReg, JSCell::classInfoOffset()), MacroAssembler::TrustedImmPtr(&JSArray::s_info)));
    27952802
    27962803        base.use();
    27972804        property.use();
    27982805        value.use();
    2799        
     2806        storage.use();
     2807
    28002808        MacroAssembler::Jump withinArrayBounds = m_jit.branch32(MacroAssembler::Below, propertyReg, MacroAssembler::Address(baseReg, JSArray::vectorLengthOffset()));
    28012809
     
    28082816        withinArrayBounds.link(&m_jit);
    28092817
    2810         // Get the array storage.
    2811         GPRReg storageReg = scratchReg;
    2812         m_jit.loadPtr(MacroAssembler::Address(baseReg, JSArray::storageOffset()), storageReg);
    2813 
    28142818        // Check if we're writing to a hole; if so increment m_numValuesInVector.
    28152819        MacroAssembler::Jump notHoleValue = m_jit.branchTestPtr(MacroAssembler::NonZero, MacroAssembler::BaseIndex(storageReg, propertyReg, MacroAssembler::ScalePtr, OBJECT_OFFSETOF(ArrayStorage, m_vector[0])));
     
    28352839
    28362840    case PutByValAlias: {
    2837         PredictedType basePrediction = at(node.child2()).prediction();
     2841        NodeIndex child1 = m_jit.graph().m_varArgChildren[node.firstChild()];
     2842        NodeIndex child2 = m_jit.graph().m_varArgChildren[node.firstChild() + 1];
     2843        NodeIndex child3 = m_jit.graph().m_varArgChildren[node.firstChild() + 2];
     2844        NodeIndex child4 = m_jit.graph().m_varArgChildren[node.firstChild() + 3];
     2845
     2846        PredictedType basePrediction = at(child2).prediction();
    28382847        ASSERT_UNUSED(basePrediction, (basePrediction & PredictInt32) || !basePrediction);
    28392848
    2840         SpeculateCellOperand base(this, node.child1());
    2841         SpeculateStrictInt32Operand property(this, node.child2());
    2842         if (at(node.child1()).shouldSpeculateByteArray()) {
    2843             compilePutByValForByteArray(base.gpr(), property.gpr(), node);
     2849        if (at(child1).shouldSpeculateByteArray()) {
     2850            compilePutByValForByteArray(node);
    28442851            break;
    28452852        }
    28462853
    2847         if (at(node.child1()).shouldSpeculateInt8Array()) {
    2848             compilePutByValForIntTypedArray(m_jit.globalData()->int8ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(int8_t), NoTypedArraySpecCheck, SignedTypedArray);
     2854        if (at(child1).shouldSpeculateInt8Array()) {
     2855            compilePutByValForIntTypedArray(m_jit.globalData()->int8ArrayDescriptor(), node, sizeof(int8_t), NoTypedArraySpecCheck, SignedTypedArray);
    28492856            if (!m_compileOkay)
    28502857                return;
    28512858            break;           
    28522859        }
    2853        
    2854         if (at(node.child1()).shouldSpeculateInt16Array()) {
    2855             compilePutByValForIntTypedArray(m_jit.globalData()->int16ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(int16_t), NoTypedArraySpecCheck, SignedTypedArray);
     2860   
     2861        if (at(child1).shouldSpeculateInt16Array()) {
     2862            compilePutByValForIntTypedArray(m_jit.globalData()->int16ArrayDescriptor(), node, sizeof(int16_t), NoTypedArraySpecCheck, SignedTypedArray);
    28562863            if (!m_compileOkay)
    28572864                return;
    28582865            break;           
    28592866        }
    2860        
    2861         if (at(node.child1()).shouldSpeculateInt32Array()) {
    2862             compilePutByValForIntTypedArray(m_jit.globalData()->int32ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(int32_t), NoTypedArraySpecCheck, SignedTypedArray);
     2867   
     2868        if (at(child1).shouldSpeculateInt32Array()) {
     2869            compilePutByValForIntTypedArray(m_jit.globalData()->int32ArrayDescriptor(), node, sizeof(int32_t), NoTypedArraySpecCheck, SignedTypedArray);
    28632870            if (!m_compileOkay)
    28642871                return;
    28652872            break;           
    28662873        }
    2867        
    2868         if (at(node.child1()).shouldSpeculateUint8Array()) {
    2869             compilePutByValForIntTypedArray(m_jit.globalData()->uint8ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(uint8_t), NoTypedArraySpecCheck, UnsignedTypedArray);
     2874   
     2875        if (at(child1).shouldSpeculateUint8Array()) {
     2876            compilePutByValForIntTypedArray(m_jit.globalData()->uint8ArrayDescriptor(), node, sizeof(uint8_t), NoTypedArraySpecCheck, UnsignedTypedArray);
    28702877            if (!m_compileOkay)
    28712878                return;
    28722879            break;           
    28732880        }
    2874        
    2875         if (at(node.child1()).shouldSpeculateUint16Array()) {
    2876             compilePutByValForIntTypedArray(m_jit.globalData()->uint16ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(uint16_t), NoTypedArraySpecCheck, UnsignedTypedArray);
     2881   
     2882        if (at(child1).shouldSpeculateUint16Array()) {
     2883            compilePutByValForIntTypedArray(m_jit.globalData()->uint16ArrayDescriptor(), node, sizeof(uint16_t), NoTypedArraySpecCheck, UnsignedTypedArray);
    28772884            if (!m_compileOkay)
    28782885                return;
    28792886            break;           
    28802887        }
    2881        
    2882         if (at(node.child1()).shouldSpeculateUint32Array()) {
    2883             compilePutByValForIntTypedArray(m_jit.globalData()->uint32ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(uint32_t), NoTypedArraySpecCheck, UnsignedTypedArray);
     2888   
     2889        if (at(child1).shouldSpeculateUint32Array()) {
     2890            compilePutByValForIntTypedArray(m_jit.globalData()->uint32ArrayDescriptor(), node, sizeof(uint32_t), NoTypedArraySpecCheck, UnsignedTypedArray);
    28842891            if (!m_compileOkay)
    28852892                return;
    28862893            break;           
    28872894        }
    2888        
    2889         if (at(node.child1()).shouldSpeculateFloat32Array()) {
    2890             compilePutByValForFloatTypedArray(m_jit.globalData()->float32ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(float), NoTypedArraySpecCheck);
     2895   
     2896        if (at(child1).shouldSpeculateFloat32Array()) {
     2897            compilePutByValForFloatTypedArray(m_jit.globalData()->float32ArrayDescriptor(), node, sizeof(float), NoTypedArraySpecCheck);
    28912898            if (!m_compileOkay)
    28922899                return;
    28932900            break;           
    28942901        }
    2895        
    2896         if (at(node.child1()).shouldSpeculateFloat64Array()) {
    2897             compilePutByValForFloatTypedArray(m_jit.globalData()->float64ArrayDescriptor(), base.gpr(), property.gpr(), node, sizeof(double), NoTypedArraySpecCheck);
     2902   
     2903        if (at(child1).shouldSpeculateFloat64Array()) {
     2904            compilePutByValForFloatTypedArray(m_jit.globalData()->float64ArrayDescriptor(), node, sizeof(double), NoTypedArraySpecCheck);
    28982905            if (!m_compileOkay)
    28992906                return;
     
    29012908        }
    29022909
    2903         JSValueOperand value(this, node.child3());
    2904         GPRTemporary scratch(this);
    2905        
    2906         GPRReg baseReg = base.gpr();
    2907         GPRReg scratchReg = scratch.gpr();
    2908 
    2909         writeBarrier(base.gpr(), value.gpr(), node.child3(), WriteBarrierForPropertyAccess, scratchReg);
    2910 
     2910        SpeculateCellOperand base(this, child1);
     2911        SpeculateStrictInt32Operand property(this, child2);
     2912        JSValueOperand value(this, child3);
     2913
     2914        {
     2915            GPRTemporary scratch(this);
     2916            GPRReg scratchReg = scratch.gpr();
     2917            writeBarrier(base.gpr(), value.gpr(), child3, WriteBarrierForPropertyAccess, scratchReg);
     2918        }
     2919        StorageOperand storage(this, child4);
    29112920        // Get the array storage.
    2912         GPRReg storageReg = scratchReg;
    2913         m_jit.loadPtr(MacroAssembler::Address(baseReg, JSArray::storageOffset()), storageReg);
     2921        GPRReg storageReg = storage.gpr();
    29142922
    29152923        // Store the value to the array.
Note: See TracChangeset for help on using the changeset viewer.