Changeset 53341 in webkit for trunk/JavaScriptCore/interpreter


Ignore:
Timestamp:
Jan 15, 2010, 12:48:52 PM (15 years ago)
Author:
[email protected]
Message:

2010-01-14 Geoffrey Garen <[email protected]>

Reviewed by Oliver Hunt.

REGRESISON: Google maps buttons not working properly
https://bugs.webkit.org/show_bug.cgi?id=31871

REGRESSION(r52948): JavaScript exceptions thrown on Google Maps when
getting directions for a second time
https://bugs.webkit.org/show_bug.cgi?id=33446


SunSpider and v8 report no change.

  • interpreter/Interpreter.cpp: (JSC::Interpreter::tryCacheGetByID): Update our cached offset in case flattening the dictionary changed any of its offsets.
  • jit/JITStubs.cpp: (JSC::JITThunks::tryCacheGetByID): (JSC::DEFINE_STUB_FUNCTION):
  • runtime/Operations.h: (JSC::normalizePrototypeChain): ditto

2010-01-15 Geoffrey Garen <[email protected]>

Reviewed by Oliver Hunt.

REGRESISON: Google maps buttons not working properly
https://bugs.webkit.org/show_bug.cgi?id=31871

REGRESSION(r52948): JavaScript exceptions thrown on Google Maps when
getting directions for a second time
https://bugs.webkit.org/show_bug.cgi?id=33446


Added a test for these bugs.

  • fast/js/pic/undictionary-expected.txt: Added.
  • fast/js/pic/undictionary.html: Added.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/interpreter/Interpreter.cpp

    r52231 r53341  
    10451045
    10461046        JSObject* baseObject = asObject(slot.slotBase());
     1047        size_t offset = slot.cachedOffset();
    10471048
    10481049        // Since we're accessing a prototype in a loop, it's a good bet that it
    10491050        // should not be treated as a dictionary.
    1050         if (baseObject->structure()->isDictionary())
     1051        if (baseObject->structure()->isDictionary()) {
    10511052            baseObject->flattenDictionaryObject();
     1053            offset = baseObject->structure()->get(propertyName);
     1054        }
    10521055
    10531056        ASSERT(!baseObject->structure()->isUncacheableDictionary());
     
    10551058        vPC[0] = getOpcode(op_get_by_id_proto);
    10561059        vPC[5] = baseObject->structure();
    1057         vPC[6] = slot.cachedOffset();
     1060        vPC[6] = offset;
    10581061
    10591062        codeBlock->refStructures(vPC);
     
    10611064    }
    10621065
    1063     size_t count = normalizePrototypeChain(callFrame, baseValue, slot.slotBase());
     1066    size_t offset = slot.cachedOffset();
     1067    size_t count = normalizePrototypeChain(callFrame, baseValue, slot.slotBase(), propertyName, offset);
    10641068    if (!count) {
    10651069        vPC[0] = getOpcode(op_get_by_id_generic);
     
    10711075    vPC[5] = structure->prototypeChain(callFrame);
    10721076    vPC[6] = count;
    1073     vPC[7] = slot.cachedOffset();
     1077    vPC[7] = offset;
    10741078    codeBlock->refStructures(vPC);
    10751079}
Note: See TracChangeset for help on using the changeset viewer.