X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/6fe7ccc865dc7d7541b93c5bcaf6368d2c98a174..8b637bb680022adfddad653280734877951535a9:/bytecode/CallLinkInfo.h?ds=sidebyside diff --git a/bytecode/CallLinkInfo.h b/bytecode/CallLinkInfo.h index 44d50a9..36eb84b 100644 --- a/bytecode/CallLinkInfo.h +++ b/bytecode/CallLinkInfo.h @@ -26,7 +26,9 @@ #ifndef CallLinkInfo_h #define CallLinkInfo_h +#include "ClosureCallStubRoutine.h" #include "CodeLocation.h" +#include "CodeSpecializationKind.h" #include "JITWriteBarrier.h" #include "JSFunction.h" #include "Opcode.h" @@ -55,6 +57,7 @@ struct CallLinkInfo : public BasicRawSentinelNode { CallLinkInfo() : hasSeenShouldRepatch(false) , isDFG(false) + , hasSeenClosure(false) , callType(None) { } @@ -64,19 +67,27 @@ struct CallLinkInfo : public BasicRawSentinelNode { if (isOnList()) remove(); } + + CodeSpecializationKind specializationKind() const + { + return specializationFromIsConstruct(callType == Construct); + } - CodeLocationLabel callReturnLocation; // it's a near call in the old JIT, or a normal call in DFG + CodeLocationNearCall callReturnLocation; CodeLocationDataLabelPtr hotPathBegin; CodeLocationNearCall hotPathOther; JITWriteBarrier callee; WriteBarrier lastSeenCallee; + RefPtr stub; bool hasSeenShouldRepatch : 1; bool isDFG : 1; - CallType callType : 6; - unsigned bytecodeIndex; + bool hasSeenClosure : 1; + CallType callType : 5; + unsigned calleeGPR : 8; + CodeOrigin codeOrigin; - bool isLinked() { return callee; } - void unlink(JSGlobalData&, RepatchBuffer&); + bool isLinked() { return stub || callee; } + void unlink(VM&, RepatchBuffer&); bool seenOnce() { @@ -96,7 +107,7 @@ inline void* getCallLinkInfoReturnLocation(CallLinkInfo* callLinkInfo) inline unsigned getCallLinkInfoBytecodeIndex(CallLinkInfo* callLinkInfo) { - return callLinkInfo->bytecodeIndex; + return callLinkInfo->codeOrigin.bytecodeIndex; } #endif // ENABLE(JIT)