JITTimeWorkItem.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. #pragma once
  6. // class for the backend to use to access CodeGenWorkItem properties
  7. class JITTimeWorkItem
  8. {
  9. public:
  10. JITTimeWorkItem(CodeGenWorkItemIDL * workItemData);
  11. CodeGenWorkItemType Type() const;
  12. ExecutionMode GetJitMode() const;
  13. uint GetLoopNumber() const;
  14. const JITLoopHeaderIDL * GetLoopHeader() const;
  15. intptr_t GetLoopHeaderAddr() const;
  16. bool IsLoopBody() const;
  17. bool IsJitInDebugMode() const;
  18. intptr_t GetCallsCountAddress() const;
  19. intptr_t GetJittedLoopIterationsSinceLastBailoutAddr() const;
  20. void InitializeReader(
  21. Js::ByteCodeReader * reader,
  22. Js::StatementReader<Js::FunctionBody::ArenaStatementMapList> * statementReader, ArenaAllocator* alloc);
  23. JITTimeFunctionBody * GetJITFunctionBody();
  24. uint16 GetProfiledIterations() const;
  25. CodeGenWorkItemIDL* GetWorkItemData();
  26. JITTimePolymorphicInlineCacheInfo * GetPolymorphicInlineCacheInfo();
  27. JITTimePolymorphicInlineCacheInfo * GetInlineePolymorphicInlineCacheInfo(intptr_t funcBodyAddr);
  28. void SetJITTimeData(FunctionJITTimeDataIDL * jitData);
  29. FunctionJITTimeInfo * GetJITTimeInfo() const;
  30. bool TryGetValueType(uint symId, ValueType * valueType) const;
  31. bool HasSymIdToValueTypeMap() const;
  32. private:
  33. Js::FunctionBody::ArenaStatementMapList * m_fullStatementList;
  34. CodeGenWorkItemIDL * m_workItemData;
  35. JITTimeFunctionBody m_jitBody;
  36. Js::SmallSpanSequence m_statementMap;
  37. };