Common.h 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  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. #include "CommonMinMemory.h"
  7. typedef _Return_type_success_(return >= 0) LONG NTSTATUS;
  8. #define NT_SUCCESS(Status) (((NTSTATUS)(Status)) >= 0)
  9. #include <wchar.h>
  10. // === C Runtime Header Files ===
  11. #include <stdarg.h>
  12. #include <float.h>
  13. #include <limits.h>
  14. #if defined(_UCRT)
  15. #include <cmath>
  16. #else
  17. #include <math.h>
  18. #endif
  19. #include <time.h>
  20. #include <io.h>
  21. #include <malloc.h>
  22. extern "C" void * _AddressOfReturnAddress(void);
  23. #include "Common\GetCurrentFrameID.h"
  24. namespace Js
  25. {
  26. typedef int32 PropertyId;
  27. typedef unsigned long ModuleID;
  28. }
  29. #define IsTrueOrFalse(value) ((value) ? L"True" : L"False")
  30. // Header files
  31. #include "core\BinaryFeatureControl.h"
  32. #include "TemplateParameter.h"
  33. #include "Common\vtinfo.h"
  34. #include "EnumClassHelp.h"
  35. #include "Common\Tick.h"
  36. #include "Common\Int16Math.h"
  37. #include "Common\Int32Math.h"
  38. #include "Common\UInt16Math.h"
  39. #include "Common\UInt32Math.h"
  40. #include "common\Int64Math.h"
  41. template<typename T> struct IntMath { using Type = void; };
  42. template<> struct IntMath<int16> { using Type = Int16Math; };
  43. template<> struct IntMath<int32> { using Type = Int32Math; };
  44. template<> struct IntMath<uint16> { using Type = UInt16Math; };
  45. template<> struct IntMath<uint32> { using Type = UInt32Math; };
  46. template<> struct IntMath<int64> { using Type = Int64Math; };
  47. #include "Common\DaylightTimeHelper.h"
  48. #include "Common\DateUtilities.h"
  49. #include "Common\NumberUtilitiesBase.h"
  50. #include "Common\NumberUtilities.h"
  51. #include <codex\Utf8Codex.h>
  52. #include "Common\unicode.h"
  53. #include "core\DelayLoadLibrary.h"
  54. #include "core\EtwTraceCore.h"
  55. #include "Common\RejitReason.h"
  56. #include "Common\ThreadService.h"
  57. // Exceptions
  58. #include "Exceptions\Exceptionbase.h"
  59. #include "Exceptions\InternalErrorException.h"
  60. #include "Exceptions\OutOfMemoryException.h"
  61. #include "Exceptions\OperationAbortedException.h"
  62. #include "Exceptions\RejitException.h"
  63. #include "Exceptions\ScriptAbortException.h"
  64. #include "Exceptions\StackOverflowException.h"
  65. #include "Exceptions\NotImplementedException.h"
  66. #include "Exceptions\AsmJsParseException.h"
  67. #include "Memory\AutoPtr.h"
  68. #include "Memory\AutoAllocatorObjectPtr.h"
  69. #include "Memory\leakreport.h"
  70. #include "DataStructures\DoublyLinkedListElement.h"
  71. #include "DataStructures\DoublyLinkedList.h"
  72. #include "DataStructures\SimpleHashTable.h"
  73. #include "Memory\XDataAllocator.h"
  74. #include "Memory\CustomHeap.h"
  75. #include "Core\FinalizableObject.h"
  76. #include "Memory\RecyclerRootPtr.h"
  77. #include "Memory\RecyclerFastAllocator.h"
  78. #include "Memory\RecyclerPointers.h"
  79. #include "util\pinned.h"
  80. // Data Structures 2
  81. #include "DataStructures\StringBuilder.h"
  82. #include "DataStructures\WeakReferenceDictionary.h"
  83. #include "DataStructures\LeafValueDictionary.h"
  84. #include "DataStructures\Dictionary.h"
  85. #include "DataStructures\List.h"
  86. #include "DataStructures\Stack.h"
  87. #include "DataStructures\Queue.h"
  88. #include "DataStructures\CharacterBuffer.h"
  89. #include "DataStructures\InternalString.h"
  90. #include "DataStructures\Interval.h"
  91. #include "DataStructures\InternalStringNoCaseComparer.h"
  92. #include "DataStructures\SparseArray.h"
  93. #include "DataStructures\growingArray.h"
  94. #include "DataStructures\EvalMapString.h"
  95. #include "DataStructures\RegexKey.h"
  96. #include "DataStructures\LineOffsetCache.h"
  97. #include "core\ICustomConfigFlags.h"
  98. #include "core\CmdParser.h"
  99. #include "core\ProfileInstrument.h"
  100. #include "core\ProfileMemory.h"
  101. #include "core\StackBackTrace.h"
  102. #include "Common\Event.h"
  103. #include "Common\Jobs.h"
  104. #include "common\vtregistry.h" // Depends on SimpleHashTable.h
  105. #include "DataStructures\Cache.h" // Depends on config flags
  106. #include "DataStructures\MruDictionary.h" // Depends on DoublyLinkedListElement
  107. #include "common\SmartFPUControl.h"
  108. // This class is only used by AutoExp.dat
  109. class AutoExpDummyClass
  110. {
  111. };
  112. #pragma warning(push)
  113. #if defined(PROFILE_RECYCLER_ALLOC) || defined(HEAP_TRACK_ALLOC) || defined(ENABLE_DEBUG_CONFIG_OPTIONS)
  114. #include <typeinfo.h>
  115. #endif
  116. #pragma warning(pop)