Changeset 42065 in webkit for trunk/JavaScriptCore/parser/Nodes.h


Ignore:
Timestamp:
Mar 27, 2009, 8:50:39 PM (16 years ago)
Author:
[email protected]
Message:

Improve performance of Function.prototype.call
<https://bugs.webkit.org/show_bug.cgi?id=24907>

Reviewed by Gavin Barraclough

Optimistically assume that expression.call(..) is going to be a call to
Function.prototype.call, and handle it specially to attempt to reduce the
degree of VM reentrancy.

When everything goes right this removes the vm reentry improving .call()
by around a factor of 10.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/parser/Nodes.h

    r41343 r42065  
    764764        virtual RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) JSC_FAST_CALL;
    765765
    766     private:
     766    protected:
    767767        RefPtr<ExpressionNode> m_base;
    768768        Identifier m_ident;
    769769        RefPtr<ArgumentsNode> m_args;
     770    };
     771
     772    class CallFunctionCallDotNode : public FunctionCallDotNode {
     773    public:
     774        CallFunctionCallDotNode(JSGlobalData* globalData, ExpressionNode* base, const Identifier& ident, ArgumentsNode* args, unsigned divot, unsigned startOffset, unsigned endOffset) JSC_FAST_CALL
     775            : FunctionCallDotNode(globalData, base, ident, args, divot, startOffset, endOffset)
     776        {
     777        }
     778        virtual RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) JSC_FAST_CALL;
    770779    };
    771780
Note: See TracChangeset for help on using the changeset viewer.