Changeset 172961 in webkit for trunk/Source/JavaScriptCore/bytecode/CallLinkStatus.h
- Timestamp:
- Aug 26, 2014, 9:46:10 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/bytecode/CallLinkStatus.h
r172940 r172961 47 47 public: 48 48 CallLinkStatus() 49 : m_couldTakeSlowPath(false) 49 : m_executable(0) 50 , m_couldTakeSlowPath(false) 50 51 , m_isProved(false) 51 , m_canTrustCounts(false)52 52 { 53 53 } … … 62 62 explicit CallLinkStatus(JSValue); 63 63 64 CallLinkStatus( CallVariant variant)65 : m_e dges(1, CallEdge(variant, 1))64 CallLinkStatus(ExecutableBase* executable) 65 : m_executable(executable) 66 66 , m_couldTakeSlowPath(false) 67 67 , m_isProved(false) 68 , m_canTrustCounts(false)69 68 { 70 69 } … … 94 93 // Computes the status assuming that we never took slow path and never previously 95 94 // exited. 96 static CallLinkStatus computeFor(const ConcurrentJITLocker&, CodeBlock*, CallLinkInfo&); 97 static CallLinkStatus computeFor( 98 const ConcurrentJITLocker&, CodeBlock*, CallLinkInfo&, ExitSiteData); 95 static CallLinkStatus computeFor(const ConcurrentJITLocker&, CallLinkInfo&); 96 static CallLinkStatus computeFor(const ConcurrentJITLocker&, CallLinkInfo&, ExitSiteData); 99 97 #endif 100 98 … … 110 108 CodeBlock*, CodeOrigin, const CallLinkInfoMap&, const ContextMap&); 111 109 112 bool isSet() const { return !m_edges.isEmpty()|| m_couldTakeSlowPath; }110 bool isSet() const { return m_callTarget || m_executable || m_couldTakeSlowPath; } 113 111 114 112 bool operator!() const { return !isSet(); } 115 113 116 114 bool couldTakeSlowPath() const { return m_couldTakeSlowPath; } 115 bool isClosureCall() const { return m_executable && !m_callTarget; } 117 116 118 CallEdgeList edges() const { return m_edges; } 119 unsigned size() const { return m_edges.size(); } 120 CallEdge at(unsigned i) const { return m_edges[i]; } 121 CallEdge operator[](unsigned i) const { return at(i); } 117 JSValue callTarget() const { return m_callTarget; } 118 JSFunction* function() const; 119 InternalFunction* internalFunction() const; 120 Intrinsic intrinsicFor(CodeSpecializationKind) const; 121 ExecutableBase* executable() const { return m_executable; } 122 122 bool isProved() const { return m_isProved; } 123 bool canOptimize() const { return !m_edges.isEmpty(); } 124 bool canTrustCounts() const { return m_canTrustCounts; } 125 126 bool isClosureCall() const; // Returns true if any callee is a closure call. 123 bool canOptimize() const { return (m_callTarget || m_executable) && !m_couldTakeSlowPath; } 127 124 128 125 void dump(PrintStream&) const; 129 126 130 127 private: 131 void makeClosureCall(); 128 void makeClosureCall() 129 { 130 ASSERT(!m_isProved); 131 // Turn this into a closure call. 132 m_callTarget = JSValue(); 133 } 132 134 133 135 static CallLinkStatus computeFromLLInt(const ConcurrentJITLocker&, CodeBlock*, unsigned bytecodeIndex); 134 #if ENABLE(JIT)135 static CallLinkStatus computeFromCallEdgeProfile(CallEdgeProfile*);136 static CallLinkStatus computeFromCallLinkInfo(137 const ConcurrentJITLocker&, CallLinkInfo&);138 #endif139 136 140 CallEdgeList m_edges; 137 JSValue m_callTarget; 138 ExecutableBase* m_executable; 141 139 bool m_couldTakeSlowPath; 142 140 bool m_isProved; 143 bool m_canTrustCounts;144 141 }; 145 142
Note:
See TracChangeset
for help on using the changeset viewer.