Ignore:
Timestamp:
Jun 1, 2015, 7:59:39 PM (10 years ago)
Author:
[email protected]
Message:

If a call has ever taken the virtual slow path, make sure that the DFG knows this
https://bugs.webkit.org/show_bug.cgi?id=145501

Reviewed by Geoffrey Garen.

Now now return higher fidelity information in the case of no polymorphic call stub. If the
virtual slow path was ever taken, we note this, and we note either zero or one call variant
based on the IC's last callee.

  • bytecode/CallLinkStatus.cpp:

(JSC::CallLinkStatus::computeFromCallLinkInfo):
(JSC::CallLinkStatus::computeFor):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/bytecode/CallLinkStatus.cpp

    r180279 r185099  
    151151    // is probably OK for now.
    152152   
     153    // FIXME: If the GC often clears this call, we should probably treat it like it always takes the
     154    // slow path. We could be smart about this; for example if we cleared a specific callee but the
     155    // despecified executable was alive then we could note that separately.
     156    // https://bugs.webkit.org/show_bug.cgi?id=145502
     157   
    153158    // PolymorphicCallStubRoutine is a GCAwareJITStubRoutine, so if non-null, it will stay alive
    154159    // until next GC even if the CallLinkInfo is concurrently cleared. Also, the variants list is
     
    210215    }
    211216   
    212     if (callLinkInfo.slowPathCount >= Options::couldTakeSlowCaseMinimumCount())
    213         return takesSlowPath();
    214    
    215     JSFunction* target = callLinkInfo.lastSeenCallee.get();
    216     if (!target)
    217         return takesSlowPath();
    218    
    219     if (callLinkInfo.hasSeenClosure)
    220         return CallLinkStatus(target->executable());
    221 
    222     return CallLinkStatus(target);
     217    CallLinkStatus result;
     218   
     219    if (JSFunction* target = callLinkInfo.lastSeenCallee.get()) {
     220        CallVariant variant(target);
     221        if (callLinkInfo.hasSeenClosure)
     222            variant = variant.despecifiedClosure();
     223        result.m_variants.append(variant);
     224    }
     225   
     226    result.m_couldTakeSlowPath = !!callLinkInfo.slowPathCount;
     227
     228    return result;
    223229}
    224230
Note: See TracChangeset for help on using the changeset viewer.