Changeset 283129 in webkit for trunk/Source/JavaScriptCore/jit/JITCompilationKey.h
- Timestamp:
- Sep 27, 2021, 12:33:18 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/jit/JITCompilationKey.h
r283102 r283129 31 31 namespace JSC { 32 32 33 class JSCell; 33 class CodeBlock; 34 class CodeBlockSet; 34 35 35 36 class JITCompilationKey { 36 37 public: 37 38 JITCompilationKey() 38 : m_ codeBlock(nullptr)39 : m_profiledBlock(nullptr) 39 40 , m_mode(JITCompilationMode::InvalidCompilation) 40 41 { … … 42 43 43 44 JITCompilationKey(WTF::HashTableDeletedValueType) 44 : m_ codeBlock(nullptr)45 : m_profiledBlock(nullptr) 45 46 , m_mode(JITCompilationMode::DFG) 46 47 { 47 48 } 48 49 49 JITCompilationKey( JSCell* profiledBlock, JITCompilationMode mode)50 : m_ codeBlock(profiledBlock)50 JITCompilationKey(CodeBlock* profiledBlock, JITCompilationMode mode) 51 : m_profiledBlock(profiledBlock) 51 52 , m_mode(mode) 52 53 { … … 55 56 bool operator!() const 56 57 { 57 return !m_ codeBlock && m_mode == JITCompilationMode::InvalidCompilation;58 return !m_profiledBlock && m_mode == JITCompilationMode::InvalidCompilation; 58 59 } 59 60 60 61 bool isHashTableDeletedValue() const 61 62 { 62 return !m_ codeBlock && m_mode != JITCompilationMode::InvalidCompilation;63 return !m_profiledBlock && m_mode != JITCompilationMode::InvalidCompilation; 63 64 } 64 65 66 CodeBlock* profiledBlock() const { return m_profiledBlock; } 65 67 JITCompilationMode mode() const { return m_mode; } 66 68 67 69 bool operator==(const JITCompilationKey& other) const 68 70 { 69 return m_ codeBlock == other.m_codeBlock71 return m_profiledBlock == other.m_profiledBlock 70 72 && m_mode == other.m_mode; 71 73 } … … 73 75 unsigned hash() const 74 76 { 75 return WTF::pairIntHash(WTF::PtrHash< JSCell*>::hash(m_codeBlock), static_cast<std::underlying_type<JITCompilationMode>::type>(m_mode));77 return WTF::pairIntHash(WTF::PtrHash<CodeBlock*>::hash(m_profiledBlock), static_cast<std::underlying_type<JITCompilationMode>::type>(m_mode)); 76 78 } 77 79 … … 79 81 80 82 private: 81 // Either CodeBlock* or UnlinkedCodeBlock* for basleline JIT. 82 JSCell* m_codeBlock; 83 CodeBlock* m_profiledBlock; 83 84 JITCompilationMode m_mode; 84 85 };
Note:
See TracChangeset
for help on using the changeset viewer.