EHBailoutData.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  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. namespace Js
  7. {
  8. class EHBailoutData
  9. {
  10. public:
  11. int32 nestingDepth;
  12. int32 catchOffset;
  13. EHBailoutData * parent;
  14. EHBailoutData * child;
  15. public:
  16. EHBailoutData() : nestingDepth(-1), catchOffset(0), parent(nullptr), child(nullptr) {}
  17. EHBailoutData(int32 nestingDepth, int32 catchOffset, EHBailoutData * parent)
  18. {
  19. this->nestingDepth = nestingDepth;
  20. this->catchOffset = catchOffset;
  21. this->parent = parent;
  22. this->child = nullptr;
  23. }
  24. #if ENABLE_NATIVE_CODEGEN
  25. void Fixup(NativeCodeData::DataChunk* chunkList)
  26. {
  27. FixupNativeDataPointer(parent, chunkList);
  28. FixupNativeDataPointer(child, chunkList);
  29. }
  30. #endif
  31. };
  32. }