Ignore:
Timestamp:
Oct 16, 2009, 10:52:20 PM (16 years ago)
Author:
[email protected]
Message:

Rolled back in r49717 with the build maybe working now?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/jit/JITStubs.cpp

    r49726 r49734  
    701701    // Structure transition, cache transition info
    702702    if (slot.type() == PutPropertySlot::NewProperty) {
    703         StructureChain* prototypeChain = structure->prototypeChain(callFrame);
    704         if (!prototypeChain->isCacheable() || structure->isDictionary()) {
     703        if (structure->isDictionary()) {
    705704            ctiPatchCallByReturnAddress(codeBlock, returnAddress, FunctionPtr(cti_op_put_by_id_generic));
    706705            return;
    707706        }
     707
     708        // put_by_id_transition checks the prototype chain for setters.
     709        normalizePrototypeChain(callFrame, baseCell);
     710
     711        StructureChain* prototypeChain = structure->prototypeChain(callFrame);
    708712        stubInfo->initPutByIdTransition(structure->previousID(), structure, prototypeChain);
    709713        JIT::compilePutByIdTransition(callFrame->scopeChain()->globalData, codeBlock, stubInfo, structure->previousID(), structure, slot.cachedOffset(), prototypeChain, returnAddress);
     
    781785    }
    782786
    783     size_t count = countPrototypeChainEntriesAndCheckForProxies(callFrame, baseValue, slot);
     787    size_t count = normalizePrototypeChain(callFrame, baseValue, slot.slotBase());
    784788    if (!count) {
    785789        stubInfo->accessType = access_get_by_id_generic;
     
    788792
    789793    StructureChain* prototypeChain = structure->prototypeChain(callFrame);
    790     if (!prototypeChain->isCacheable()) {
    791         ctiPatchCallByReturnAddress(codeBlock, returnAddress, FunctionPtr(cti_op_get_by_id_generic));
    792         return;
    793     }
    794794    stubInfo->initGetByIdChain(structure, prototypeChain);
    795795    JIT::compileGetByIdChain(callFrame->scopeChain()->globalData, callFrame, codeBlock, stubInfo, structure, prototypeChain, count, slot.cachedOffset(), returnAddress);
     
    13331333        if (listIndex == (POLYMORPHIC_LIST_CACHE_SIZE - 1))
    13341334            ctiPatchCallByReturnAddress(codeBlock, STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_list_full));
    1335     } else if (size_t count = countPrototypeChainEntriesAndCheckForProxies(callFrame, baseValue, slot)) {
    1336         StructureChain* protoChain = structure->prototypeChain(callFrame);
    1337         if (!protoChain->isCacheable()) {
    1338             ctiPatchCallByReturnAddress(codeBlock, STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_fail));
    1339             return JSValue::encode(result);
    1340         }
    1341        
     1335    } else if (size_t count = normalizePrototypeChain(callFrame, baseValue, slot.slotBase())) {
    13421336        int listIndex;
    13431337        PolymorphicAccessStructureList* prototypeStructureList = getPolymorphicAccessStructureListSlot(stubInfo, listIndex);
     1338
     1339        StructureChain* protoChain = structure->prototypeChain(callFrame);
    13441340        JIT::compileGetByIdChainList(callFrame->scopeChain()->globalData, callFrame, codeBlock, stubInfo, prototypeStructureList, listIndex, structure, protoChain, count, slot.cachedOffset());
    13451341
     
    26722668    STUB_INIT_STACK_FRAME(stackFrame);
    26732669
    2674     return JSPropertyNameIterator::create(stackFrame.callFrame, stackFrame.args[0].jsValue());
    2675 }
    2676 
    2677 DEFINE_STUB_FUNCTION(EncodedJSValue, op_next_pname)
    2678 {
    2679     STUB_INIT_STACK_FRAME(stackFrame);
    2680 
    2681     JSPropertyNameIterator* it = stackFrame.args[0].propertyNameIterator();
    2682     JSValue temp = it->next(stackFrame.callFrame);
    2683     if (!temp)
    2684         it->invalidate();
    2685     return JSValue::encode(temp);
     2670    CallFrame* callFrame = stackFrame.callFrame;
     2671    JSObject* o = stackFrame.args[0].jsObject();
     2672    Structure* structure = o->structure();
     2673    JSPropertyNameIterator* jsPropertyNameIterator = structure->enumerationCache();
     2674    if (!jsPropertyNameIterator || jsPropertyNameIterator->cachedPrototypeChain() != structure->prototypeChain(callFrame))
     2675        jsPropertyNameIterator = JSPropertyNameIterator::create(callFrame, o);
     2676    return jsPropertyNameIterator;
     2677}
     2678
     2679DEFINE_STUB_FUNCTION(int, has_property)
     2680{
     2681    STUB_INIT_STACK_FRAME(stackFrame);
     2682
     2683    JSObject* base = stackFrame.args[0].jsObject();
     2684    JSString* property = stackFrame.args[1].jsString();
     2685    return base->hasProperty(stackFrame.callFrame, Identifier(stackFrame.callFrame, property->value()));
    26862686}
    26872687
     
    30243024}
    30253025
     3026DEFINE_STUB_FUNCTION(EncodedJSValue, to_object)
     3027{
     3028    STUB_INIT_STACK_FRAME(stackFrame);
     3029
     3030    CallFrame* callFrame = stackFrame.callFrame;
     3031    return JSValue::encode(stackFrame.args[0].jsValue().toObject(callFrame));
     3032}
     3033
    30263034} // namespace JSC
    30273035
Note: See TracChangeset for help on using the changeset viewer.