Ignore:
Timestamp:
Oct 17, 2017, 4:34:29 PM (8 years ago)
Author:
Ryan Haddad
Message:

Unreviewed, rolling out r223523.

A test for this change is failing on debug JSC bots.

Reverted changeset:

"[JSC] proto getter should be fast"
https://bugs.webkit.org/show_bug.cgi?id=178067
https://trac.webkit.org/changeset/223523

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp

    r223523 r223584  
    239239    bool handleDOMJITCall(Node* callee, int resultOperand, const DOMJIT::Signature*, int registerOffset, int argumentCountIncludingThis, SpeculatedType prediction, const ChecksFunctor& insertChecks);
    240240    template<typename ChecksFunctor>
    241     bool handleIntrinsicGetter(int resultOperand, SpeculatedType prediction, const GetByIdVariant& intrinsicVariant, Node* thisNode, const ChecksFunctor& insertChecks);
     241    bool handleIntrinsicGetter(int resultOperand, const GetByIdVariant& intrinsicVariant, Node* thisNode, const ChecksFunctor& insertChecks);
    242242    template<typename ChecksFunctor>
    243243    bool handleTypedArrayConstructor(int resultOperand, InternalFunction*, int registerOffset, int argumentCountIncludingThis, TypedArrayType, const ChecksFunctor& insertChecks);
     
    26002600    }
    26012601
    2602     case ObjectGetPrototypeOfIntrinsic: {
    2603         if (argumentCountIncludingThis != 2)
    2604             return false;
    2605 
    2606         insertChecks();
    2607         set(VirtualRegister(resultOperand), addToGraph(GetPrototypeOf, OpInfo(0), OpInfo(prediction), get(virtualRegisterForArgument(1, registerOffset))));
    2608         return true;
    2609     }
    2610 
    2611     case ReflectGetPrototypeOfIntrinsic: {
    2612         if (argumentCountIncludingThis != 2)
    2613             return false;
    2614 
    2615         insertChecks();
    2616         set(VirtualRegister(resultOperand), addToGraph(GetPrototypeOf, OpInfo(0), OpInfo(prediction), Edge(get(virtualRegisterForArgument(1, registerOffset)), ObjectUse)));
    2617         return true;
    2618     }
    2619 
    26202602    case IsTypedArrayViewIntrinsic: {
    26212603        ASSERT(argumentCountIncludingThis == 2);
     
    29652947
    29662948template<typename ChecksFunctor>
    2967 bool ByteCodeParser::handleIntrinsicGetter(int resultOperand, SpeculatedType prediction, const GetByIdVariant& variant, Node* thisNode, const ChecksFunctor& insertChecks)
     2949bool ByteCodeParser::handleIntrinsicGetter(int resultOperand, const GetByIdVariant& variant, Node* thisNode, const ChecksFunctor& insertChecks)
    29682950{
    29692951    switch (variant.intrinsic()) {
     
    30293011        set(VirtualRegister(resultOperand), addToGraph(GetTypedArrayByteOffset, OpInfo(ArrayMode(arrayType).asWord()), thisNode));
    30303012
    3031         return true;
    3032     }
    3033 
    3034     case UnderscoreProtoIntrinsic: {
    3035         insertChecks();
    3036 
    3037         bool canFold = !variant.structureSet().isEmpty();
    3038         JSValue prototype;
    3039         variant.structureSet().forEach([&] (Structure* structure) {
    3040             auto getPrototypeMethod = structure->classInfo()->methodTable.getPrototype;
    3041             MethodTable::GetPrototypeFunctionPtr defaultGetPrototype = JSObject::getPrototype;
    3042             if (getPrototypeMethod != defaultGetPrototype) {
    3043                 canFold = false;
    3044                 return;
    3045             }
    3046 
    3047             if (structure->hasPolyProto()) {
    3048                 canFold = false;
    3049                 return;
    3050             }
    3051             if (!prototype)
    3052                 prototype = structure->storedPrototype();
    3053             else if (prototype != structure->storedPrototype())
    3054                 canFold = false;
    3055         });
    3056 
    3057         // OK, only one prototype is found. We perform constant folding here.
    3058         // This information is important for super's constructor call to get new.target constant.
    3059         if (prototype && canFold) {
    3060             set(VirtualRegister(resultOperand), weakJSConstant(prototype));
    3061             return true;
    3062         }
    3063 
    3064         set(VirtualRegister(resultOperand), addToGraph(GetPrototypeOf, OpInfo(0), OpInfo(prediction), thisNode));
    30653013        return true;
    30663014    }
     
    38493797    Node* getter = addToGraph(GetGetter, loadedValue);
    38503798
    3851     if (handleIntrinsicGetter(destinationOperand, prediction, variant, base,
     3799    if (handleIntrinsicGetter(destinationOperand, variant, base,
    38523800            [&] () {
    38533801                addToGraph(CheckCell, OpInfo(m_graph.freeze(variant.intrinsicFunction())), getter);
Note: See TracChangeset for help on using the changeset viewer.