Ignore:
Timestamp:
Oct 16, 2009, 7:31:42 PM (16 years ago)
Author:
[email protected]
Message:

Roll out r49717 as it broke the build.

File:
1 edited

Legend:

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

    r49717 r49726  
    701701    // Structure transition, cache transition info
    702702    if (slot.type() == PutPropertySlot::NewProperty) {
    703         if (structure->isDictionary()) {
     703        StructureChain* prototypeChain = structure->prototypeChain(callFrame);
     704        if (!prototypeChain->isCacheable() || structure->isDictionary()) {
    704705            ctiPatchCallByReturnAddress(codeBlock, returnAddress, FunctionPtr(cti_op_put_by_id_generic));
    705706            return;
    706707        }
    707 
    708         // put_by_id_transition checks the prototype chain for setters.
    709         normalizePrototypeChain(callFrame, baseCell);
    710 
    711         StructureChain* prototypeChain = structure->prototypeChain(callFrame);
    712708        stubInfo->initPutByIdTransition(structure->previousID(), structure, prototypeChain);
    713709        JIT::compilePutByIdTransition(callFrame->scopeChain()->globalData, codeBlock, stubInfo, structure->previousID(), structure, slot.cachedOffset(), prototypeChain, returnAddress);
     
    785781    }
    786782
    787     size_t count = normalizePrototypeChain(callFrame, baseValue, slot.slotBase());
     783    size_t count = countPrototypeChainEntriesAndCheckForProxies(callFrame, baseValue, slot);
    788784    if (!count) {
    789785        stubInfo->accessType = access_get_by_id_generic;
     
    792788
    793789    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 = normalizePrototypeChain(callFrame, baseValue, slot.slotBase())) {
     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       
    13361342        int listIndex;
    13371343        PolymorphicAccessStructureList* prototypeStructureList = getPolymorphicAccessStructureListSlot(stubInfo, listIndex);
    1338 
    1339         StructureChain* protoChain = structure->prototypeChain(callFrame);
    13401344        JIT::compileGetByIdChainList(callFrame->scopeChain()->globalData, callFrame, codeBlock, stubInfo, prototypeStructureList, listIndex, structure, protoChain, count, slot.cachedOffset());
    13411345
     
    26682672    STUB_INIT_STACK_FRAME(stackFrame);
    26692673
    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 
    2679 DEFINE_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()));
     2674    return JSPropertyNameIterator::create(stackFrame.callFrame, stackFrame.args[0].jsValue());
     2675}
     2676
     2677DEFINE_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);
    26862686}
    26872687
     
    30243024}
    30253025
    3026 DEFINE_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 
    30343026} // namespace JSC
    30353027
Note: See TracChangeset for help on using the changeset viewer.