Changeset 163027 in webkit for trunk/Source/JavaScriptCore/jit/JITCode.h
- Timestamp:
- Jan 29, 2014, 11:18:54 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/jit/JITCode.h
r162139 r163027 27 27 #define JITCode_h 28 28 29 #i f ENABLE(JIT) || ENABLE(LLINT)29 #include "ArityCheckMode.h" 30 30 #include "CallFrame.h" 31 31 #include "Disassembler.h" … … 34 34 #include "LegacyProfiler.h" 35 35 #include "MacroAssemblerCodeRef.h" 36 # endif36 #include "RegisterPreservationMode.h" 37 37 38 38 namespace JSC { … … 55 55 typedef MacroAssemblerCodePtr CodePtr; 56 56 57 enum JITType { None, HostCallThunk, InterpreterThunk, BaselineJIT, DFGJIT, FTLJIT }; 57 enum JITType : uint8_t { 58 None, 59 HostCallThunk, 60 InterpreterThunk, 61 BaselineJIT, 62 DFGJIT, 63 FTLJIT 64 }; 58 65 59 66 static JITType bottomTierJIT() … … 165 172 } 166 173 167 virtual CodePtr addressForCall( ) = 0;174 virtual CodePtr addressForCall(VM&, ExecutableBase*, ArityCheckMode, RegisterPreservationMode) = 0; 168 175 virtual void* executableAddressAtOffset(size_t offset) = 0; 169 176 void* executableAddress() { return executableAddressAtOffset(0); } … … 176 183 virtual FTL::ForOSREntryJITCode* ftlForOSREntry(); 177 184 178 JSValue execute(VM*, ProtoCallFrame* , Register*);185 JSValue execute(VM*, ProtoCallFrame*); 179 186 180 187 void* start() { return dataAddressAtOffset(0); } … … 184 191 virtual bool contains(void*) = 0; 185 192 186 static PassRefPtr<JITCode> hostFunction(CodeRef);187 188 193 private: 189 194 JITType m_jitType; 190 195 }; 191 196 192 class DirectJITCode : public JITCode { 193 public: 194 DirectJITCode(JITType); 195 DirectJITCode(const CodeRef, JITType); 196 virtual ~DirectJITCode(); 197 198 void initializeCodeRef(CodeRef ref); 199 200 virtual CodePtr addressForCall() override; 197 class JITCodeWithCodeRef : public JITCode { 198 protected: 199 JITCodeWithCodeRef(JITType); 200 JITCodeWithCodeRef(CodeRef, JITType); 201 202 public: 203 virtual ~JITCodeWithCodeRef(); 204 201 205 virtual void* executableAddressAtOffset(size_t offset) override; 202 206 virtual void* dataAddressAtOffset(size_t offset) override; … … 205 209 virtual bool contains(void*) override; 206 210 211 protected: 212 CodeRef m_ref; 213 }; 214 215 class DirectJITCode : public JITCodeWithCodeRef { 216 public: 217 DirectJITCode(JITType); 218 DirectJITCode(CodeRef, CodePtr withArityCheck, JITType); 219 virtual ~DirectJITCode(); 220 221 void initializeCodeRef(CodeRef, CodePtr withArityCheck); 222 223 virtual CodePtr addressForCall(VM&, ExecutableBase*, ArityCheckMode, RegisterPreservationMode) override; 224 207 225 private: 208 CodeRef m_ref; 226 struct RegisterPreservationWrappers { 227 CodeRef withoutArityCheck; 228 CodeRef withArityCheck; 229 }; 230 231 RegisterPreservationWrappers* ensureWrappers(); 232 233 CodePtr m_withArityCheck; 234 235 std::unique_ptr<RegisterPreservationWrappers> m_wrappers; 236 }; 237 238 class NativeJITCode : public JITCodeWithCodeRef { 239 public: 240 NativeJITCode(JITType); 241 NativeJITCode(CodeRef, JITType); 242 virtual ~NativeJITCode(); 243 244 void initializeCodeRef(CodeRef); 245 246 virtual CodePtr addressForCall(VM&, ExecutableBase*, ArityCheckMode, RegisterPreservationMode) override; 209 247 }; 210 248
Note:
See TracChangeset
for help on using the changeset viewer.