Ignore:
Timestamp:
Dec 31, 2008, 2:17:05 AM (16 years ago)
Author:
[email protected]
Message:

2008-12-31 Cameron Zwarich <[email protected]>

Reviewed by Oliver Hunt.

Bug 23054: Caching of global lookups occurs even when the global object has become a dictionary
<https://bugs.webkit.org/show_bug.cgi?id=23054>
<rdar://problem/6469905>

JavaScriptCore:

  • interpreter/Interpreter.cpp: (JSC::Interpreter::resolveGlobal): Do not cache lookup if the global object has transitioned to a dictionary. (JSC::Interpreter::cti_op_resolve_global): Do not cache lookup if the global object has transitioned to a dictionary.

LayoutTests:

  • fast/js/pic/delete-global-object-expected.txt: Added.
  • fast/js/pic/delete-global-object.html: Added.
File:
1 edited

Legend:

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

    r39524 r39525  
    391391    if (globalObject->getPropertySlot(callFrame, ident, slot)) {
    392392        JSValue* result = slot.getValue(callFrame, ident);
    393         if (slot.isCacheable()) {
     393        if (slot.isCacheable() && !globalObject->structure()->isDictionary()) {
    394394            if (vPC[4].u.structure)
    395395                vPC[4].u.structure->deref();
     
    53285328    if (globalObject->getPropertySlot(callFrame, ident, slot)) {
    53295329        JSValue* result = slot.getValue(callFrame, ident);
    5330         if (slot.isCacheable()) {
     5330        if (slot.isCacheable() && !globalObject->structure()->isDictionary()) {
    53315331            GlobalResolveInfo& globalResolveInfo = callFrame->codeBlock()->globalResolveInfo(globalResolveInfoIndex);
    53325332            if (globalResolveInfo.structure)
Note: See TracChangeset for help on using the changeset viewer.