Changeset 103981 in webkit for trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
- Timestamp:
- Jan 3, 2012, 4:06:42 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
r103255 r103981 81 81 // Handle calls. This resolves issues surrounding inlining and intrinsics. 82 82 void handleCall(Interpreter*, Instruction* currentInstruction, NodeType op, CodeSpecializationKind); 83 void emitFunctionCheck(JSFunction* expectedFunction, NodeIndex callTarget, int registerOffset, CodeSpecializationKind); 83 84 // Handle inlining. Return true if it succeeded, false if we need to plant a call. 84 85 bool handleInlining(bool usesResult, int callTarget, NodeIndex callTargetNodeIndex, int resultOperand, bool certainAboutExpectedFunction, JSFunction*, int registerOffset, int argumentCountIncludingThis, unsigned nextOffset, CodeSpecializationKind); … … 941 942 if (intrinsic != NoIntrinsic) { 942 943 if (!certainAboutExpectedFunction) 943 addToGraph(CheckFunction, OpInfo(expectedFunction), callTarget);944 emitFunctionCheck(expectedFunction, callTarget, registerOffset, kind); 944 945 945 946 if (handleIntrinsic(usesResult, resultOperand, intrinsic, registerOffset, argumentCountIncludingThis, prediction)) { … … 960 961 } 961 962 963 void ByteCodeParser::emitFunctionCheck(JSFunction* expectedFunction, NodeIndex callTarget, int registerOffset, CodeSpecializationKind kind) 964 { 965 NodeIndex thisArgument; 966 if (kind == CodeForCall) 967 thisArgument = get(registerOffset + argumentToOperand(0)); 968 else 969 thisArgument = NoNode; 970 addToGraph(CheckFunction, OpInfo(expectedFunction), callTarget, thisArgument); 971 } 972 962 973 bool ByteCodeParser::handleInlining(bool usesResult, int callTarget, NodeIndex callTargetNodeIndex, int resultOperand, bool certainAboutExpectedFunction, JSFunction* expectedFunction, int registerOffset, int argumentCountIncludingThis, unsigned nextOffset, CodeSpecializationKind kind) 963 974 { … … 1009 1020 // are flushed. 1010 1021 if (!certainAboutExpectedFunction) 1011 addToGraph(CheckFunction, OpInfo(expectedFunction), callTargetNodeIndex);1022 emitFunctionCheck(expectedFunction, callTargetNodeIndex, registerOffset, kind); 1012 1023 1013 1024 // FIXME: Don't flush constants!
Note:
See TracChangeset
for help on using the changeset viewer.