CommonDefines.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540
  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 "TargetVer.h"
  7. #include "Warnings.h"
  8. //----------------------------------------------------------------------------------------------------
  9. // Chakra Core version
  10. //----------------------------------------------------------------------------------------------------
  11. #define CHAKRA_CORE_MAJOR_VERSION 1
  12. #define CHAKRA_CORE_MINOR_VERSION 1
  13. #define CHAKRA_CORE_VERSION_RELEASE 1
  14. #define CHAKRA_CORE_VERSION_PRERELEASE 0
  15. #define CHAKRA_CORE_VERSION_RELEASE_QFE 5
  16. #define CHAKRA_VERSION_RELEASE 0
  17. #define CHAKRA_VERSION_PRERELEASE 1
  18. // NOTE: need to update the GUID in ByteCodeCacheReleaseFileVersion.h as well
  19. //----------------------------------------------------------------------------------------------------
  20. // Default debug/fretest/release flags values
  21. // - Set the default values of debug/fretest/release flags if it is not set by the command line
  22. //----------------------------------------------------------------------------------------------------
  23. #ifndef DBG_DUMP
  24. #define DBG_DUMP 0
  25. #endif
  26. #ifdef _DEBUG
  27. #ifdef DEBUG
  28. #undef DEBUG
  29. #endif
  30. #define DEBUG 1
  31. #endif
  32. // if test hook is enabled, debug config options are enabled too
  33. #ifdef ENABLE_TEST_HOOKS
  34. #ifndef ENABLE_DEBUG_CONFIG_OPTIONS
  35. #define ENABLE_DEBUG_CONFIG_OPTIONS 1
  36. #endif
  37. #endif
  38. // ENABLE_DEBUG_CONFIG_OPTIONS is enabled in debug build when DBG or DBG_DUMP is defined
  39. // It is enabled in fretest build (jscript9test.dll and jc.exe) in the build script
  40. #if DBG || DBG_DUMP
  41. #ifndef ENABLE_DEBUG_CONFIG_OPTIONS
  42. #define ENABLE_DEBUG_CONFIG_OPTIONS 1
  43. #endif
  44. // Flag to control availability of other flags to control regex debugging, tracing, profiling, etc. This is separate from
  45. // ENABLE_DEBUG_CONFIG_OPTIONS because enabling this flag may affect performance significantly, even with default values for
  46. // the regex flags this flag would make available.
  47. #ifndef ENABLE_REGEX_CONFIG_OPTIONS
  48. #define ENABLE_REGEX_CONFIG_OPTIONS 1
  49. #endif
  50. #endif
  51. // TODO: consider removing before RTM: keep for CHK/FRETEST but remove from FRE.
  52. // This will cause terminate process on AV/Assert rather that letting PDM (F12/debugger scenarios) eat exceptions.
  53. // At least for now, enable this even in FRE builds. See ReportError.h.
  54. #define ENABLE_DEBUG_API_WRAPPER 1
  55. //----------------------------------------------------------------------------------------------------
  56. // Define Architectures' aliases for Simplicity
  57. //----------------------------------------------------------------------------------------------------
  58. #if defined(_M_ARM) || defined(_M_ARM64)
  59. #define _M_ARM32_OR_ARM64 1
  60. #endif
  61. #if defined(_M_IX86) || defined(_M_ARM)
  62. #define _M_IX86_OR_ARM32 1
  63. #define TARGET_32 1
  64. #endif
  65. #if defined(_M_X64) || defined(_M_ARM64)
  66. #define _M_X64_OR_ARM64 1
  67. #define TARGET_64 1
  68. #endif
  69. //----------------------------------------------------------------------------------------------------
  70. // Enabled features
  71. //----------------------------------------------------------------------------------------------------
  72. // NOTE: Disabling these might not work and are not fully supported and maintained
  73. // Even if it builds, it may not work properly. Disable at your own risk
  74. // ByteCode
  75. #define VARIABLE_INT_ENCODING 1 // Byte code serialization variable size int field encoding
  76. #define BYTECODE_BRANCH_ISLAND // Byte code short branch and branch island
  77. // Language features
  78. #define ENABLE_INTL_OBJECT // Intl support
  79. #define ENABLE_ES6_CHAR_CLASSIFIER // ES6 Unicode character classifier support
  80. // Type system features
  81. #define PERSISTENT_INLINE_CACHES // *** TODO: Won't build if disabled currently
  82. #define SUPPORT_FIXED_FIELDS_ON_PATH_TYPES // *** TODO: Won't build if disabled currently
  83. // GC features
  84. #define CONCURRENT_GC_ENABLED 1 // *** TODO: Won't build if disabled currently
  85. #define PARTIAL_GC_ENABLED 1 // *** TODO: Won't build if disabled currently
  86. #define BUCKETIZE_MEDIUM_ALLOCATIONS 1 // *** TODO: Won't build if disabled currently
  87. #define SMALLBLOCK_MEDIUM_ALLOC 1 // *** TODO: Won't build if disabled currently
  88. #define LARGEHEAPBLOCK_ENCODING 1 // Large heap block metadata encoding
  89. #define RECYCLER_WRITE_BARRIER // Write Barrier support
  90. #define IDLE_DECOMMIT_ENABLED 1 // Idle Decommit
  91. #define RECYCLER_PAGE_HEAP // PageHeap support
  92. // JIT features
  93. #if DISABLE_JIT
  94. #define ENABLE_NATIVE_CODEGEN 0
  95. #define ENABLE_PROFILE_INFO 0
  96. #define ENABLE_BACKGROUND_PARSING 0 // Disable background parsing in this mode
  97. // We need to decouple the Jobs infrastructure out of
  98. // Backend to make background parsing work with JIT disabled
  99. #define DYNAMIC_INTERPRETER_THUNK 0
  100. #define DISABLE_DYNAMIC_PROFILE_DEFER_PARSE
  101. #define ENABLE_COPYONACCESS_ARRAY 0
  102. // Used to temporarily disable ASMjs related code to get nonative compiling
  103. #define TEMP_DISABLE_ASMJS
  104. #else
  105. // By default, enable the JIT
  106. #define ENABLE_NATIVE_CODEGEN 1
  107. #define ENABLE_PROFILE_INFO 1
  108. #define ENABLE_BACKGROUND_PARSING 1
  109. #define ENABLE_COPYONACCESS_ARRAY 1
  110. #ifndef DYNAMIC_INTERPRETER_THUNK
  111. #if defined(_M_IX86_OR_ARM32) || defined(_M_X64_OR_ARM64)
  112. #define DYNAMIC_INTERPRETER_THUNK 1
  113. #else
  114. #define DYNAMIC_INTERPRETER_THUNK 0
  115. #endif
  116. #endif
  117. #endif
  118. // Other features
  119. // #define CHAKRA_CORE_DOWN_COMPAT 1
  120. #if defined(ENABLE_DEBUG_CONFIG_OPTIONS) || defined(CHAKRA_CORE_DOWN_COMPAT)
  121. #define DELAYLOAD_SET_CFG_TARGET 1
  122. #endif
  123. #ifdef NTBUILD
  124. #define ENABLE_PROJECTION
  125. #define ENABLE_FOUNDATION_OBJECT
  126. #define ENABLE_EXPERIMENTAL_FLAGS
  127. #define ENABLE_WININET_PROFILE_DATA_CACHE
  128. #define ENABLE_BASIC_TELEMETRY
  129. #define ENABLE_DOM_FAST_PATH
  130. #define ENABLE_JS_ETW // ETW support
  131. #define EDIT_AND_CONTINUE
  132. #endif
  133. // Telemetry flags
  134. #ifdef ENABLE_BASIC_TELEMETRY
  135. #define ENABLE_DIRECTCALL_TELEMETRY
  136. #endif
  137. // Telemetry features (non-DEBUG related)
  138. #ifdef ENABLE_BASIC_TELEMETRY
  139. // These defines can be "overridden" in other headers (e.g. ESBuiltInsTelemetryProvider.h) in case a specific telemetry provider wants to change an option for performance.
  140. #define TELEMETRY_OPCODE_OFFSET_ENABLED true // If the BytecodeOffset and FunctionId are logged.
  141. #define TELEMETRY_PROPERTY_OPCODE_FILTER(propertyId) true // Any filter to apply on a per propertyId basis in the opcode handler for GetProperty/TypeofProperty/GetMethodProperty/etc.
  142. #define TELEMETRY_OPCODE_GET_PROPERTY_VALUES true // If no telemetry providers need the values of properties then this option skips getting the value in the TypeofProperty opcode handler.
  143. // #define TELEMETRY_PROFILED // If telemetry should capture "Profiled*" operations
  144. // #define TELEMETRY_CACHEHIT // If telemetry should capture data that was gotten with a Cache Hit
  145. // #define TELEMETRY_JSO // If telemetry should capture JavascriptOperators (expensive, as it happens during JITed code too, not just interpreted mode)
  146. #define TELEMETRY_AddToCache // If telemetry should capture property-gets only when the propertyId is added to the cache (generally this means only the first usage of any feature is logged)
  147. // #define TELEMETRY_INTERPRETER // If telemetry should capture more interpreter events compared to just TELEMETRY_AddToCache
  148. #define TELEMETRY_TRACELOGGING // Telemetry output using TraceLogging
  149. // #define TELEMETRY_OUTPUTPRINT // Telemetry output using Output::Print
  150. // Enable/disable specific telemetry providers:
  151. #define TELEMETRY_ESB // Telemetry of ECMAScript Built-Ins usage or detection.
  152. // #define TELEMETRY_ARRAY_USAGE // Telemetry of Array usage statistics
  153. #define TELEMETRY_DateParse // Telemetry of `Date.parse`
  154. #ifdef TELEMETRY_ESB
  155. // Because ESB telemetry is in-production and has major performance implications, this redefines some of the #defines above to disable non-critical functionality to get more performance.
  156. #undef TELEMETRY_OPCODE_OFFSET_ENABLED // Disable the FunctionId+Offset tracker.
  157. #define TELEMETRY_OPCODE_OFFSET_ENABLED false
  158. #undef TELEMETRY_PROPERTY_OPCODE_FILTER // Redefine the Property Opcode filter to ignore non-built-in properties.
  159. #define TELEMETRY_PROPERTY_OPCODE_FILTER(propertyId) (propertyId < Js::PropertyIds::_countJSOnlyProperty)
  160. #undef TELEMETRY_OPCODE_GET_PROPERTY_VALUES
  161. #define TELEMETRY_OPCODE_GET_PROPERTY_VALUES false
  162. //#define TELEMETRY_ESB_STRINGS // Telemetry that uses strings (slow), used for constructor detection for ECMAScript Built-Ins polyfills and Constructor-properties of Chakra-built-ins.
  163. //#define TELEMETRY_ESB_GetConstructorPropertyPolyfillDetection // Whether telemetry will inspect the `.constructor` property of every Object instance to determine if it's a polyfill of a known ES built-in.
  164. #endif
  165. #else
  166. #define TELEMETRY_OPCODE_OFFSET_ENABLED false
  167. #define TELEMETRY_OPCODE_FILTER(propertyId) false
  168. #endif
  169. #if ENABLE_DEBUG_CONFIG_OPTIONS
  170. #define ENABLE_DIRECTCALL_TELEMETRY_STATS
  171. #endif
  172. //----------------------------------------------------------------------------------------------------
  173. // Debug and fretest features
  174. //----------------------------------------------------------------------------------------------------
  175. #ifdef ENABLE_DEBUG_CONFIG_OPTIONS
  176. #define BAILOUT_INJECTION
  177. #if ENABLE_PROFILE_INFO
  178. #define DYNAMIC_PROFILE_STORAGE
  179. #define DYNAMIC_PROFILE_MUTATOR
  180. #endif
  181. #define RUNTIME_DATA_COLLECTION
  182. #define SECURITY_TESTING
  183. #define PROFILE_EXEC
  184. #define BGJIT_STATS
  185. #define REJIT_STATS
  186. #define PERF_HINT
  187. #define POLY_INLINE_CACHE_SIZE_STATS
  188. #define JS_PROFILE_DATA_INTERFACE 1
  189. #define EXCEPTION_RECOVERY 1
  190. #define RECYCLER_TEST_SUPPORT
  191. #define ARENA_ALLOCATOR_FREE_LIST_SIZE
  192. // TODO (t-doilij) combine IR_VIEWER and ENABLE_IR_VIEWER
  193. #ifdef _M_IX86
  194. #if ENABLE_NATIVE_CODEGEN
  195. #define IR_VIEWER
  196. #define ENABLE_IR_VIEWER
  197. #define ENABLE_IR_VIEWER_DBG_DUMP // TODO (t-doilij) disable this before check-in
  198. #endif
  199. #endif
  200. #ifdef ENABLE_JS_ETW
  201. #define TEST_ETW_EVENTS
  202. // VTUNE profiling requires ETW trace
  203. #if defined(_M_IX86) || defined(_M_X64)
  204. #define VTUNE_PROFILING
  205. #endif
  206. #endif
  207. #ifdef NTBUILD
  208. #define PERF_COUNTERS
  209. #define ENABLE_MUTATION_BREAKPOINT
  210. #endif
  211. #ifdef _CONTROL_FLOW_GUARD
  212. #define CONTROL_FLOW_GUARD_LOGGER
  213. #endif
  214. #ifndef ENABLE_TEST_HOOKS
  215. #define ENABLE_TEST_HOOKS
  216. #endif
  217. #endif // ENABLE_DEBUG_CONFIG_OPTIONS
  218. //----------------------------------------------------------------------------------------------------
  219. // Debug only features
  220. //----------------------------------------------------------------------------------------------------
  221. #ifdef DEBUG
  222. #define BYTECODE_TESTING
  223. #define FAULT_INJECTION
  224. #define RECYCLER_NO_PAGE_REUSE
  225. #ifdef NTBUILD
  226. #define INTERNAL_MEM_PROTECT_HEAP_ALLOC
  227. #define INTERNAL_MEM_PROTECT_HEAP_CMDLINE
  228. #endif
  229. #endif
  230. #ifdef DBG
  231. #define VALIDATE_ARRAY
  232. #define GENERATE_DUMP
  233. #endif
  234. #if DBG_DUMP
  235. #undef DBG_EXTRAFIELD // make sure we don't extra fields in free build.
  236. #define TRACK_DISPATCH
  237. #define BGJIT_STATS
  238. #define REJIT_STATS
  239. #define POLY_INLINE_CACHE_SIZE_STATS
  240. #define INLINE_CACHE_STATS
  241. #define FIELD_ACCESS_STATS
  242. #define MISSING_PROPERTY_STATS
  243. #define EXCEPTION_RECOVERY 1
  244. #define EXCEPTION_CHECK // Check exception handling.
  245. #define PROFILE_EXEC
  246. #define PROFILE_MEM
  247. #define PROFILE_TYPES
  248. #define PROFILE_EVALMAP
  249. #define PROFILE_OBJECT_LITERALS
  250. #define PROFILE_BAILOUT_RECORD_MEMORY
  251. #define MEMSPECT_TRACKING
  252. #define PROFILE_RECYCLER_ALLOC
  253. #define PROFILE_STRINGS
  254. #define PROFILE_DICTIONARY 1
  255. #define RECYCLER_SLOW_CHECK_ENABLED // This can be disabled to speed up the debug build's GC
  256. #define RECYCLER_STRESS
  257. #define RECYCLER_STATS
  258. #define RECYCLER_FINALIZE_CHECK
  259. #define RECYCLER_FREE_MEM_FILL
  260. #define RECYCLER_DUMP_OBJECT_GRAPH
  261. #define RECYCLER_MEMORY_VERIFY
  262. #define RECYCLER_ZERO_MEM_CHECK
  263. #define RECYCLER_TRACE
  264. #define RECYCLER_VERIFY_MARK
  265. #ifdef PERF_COUNTERS
  266. #define RECYCLER_PERF_COUNTERS
  267. #define HEAP_PERF_COUNTERS
  268. #endif // PERF_COUNTERS
  269. #define PAGEALLOCATOR_PROTECT_FREEPAGE
  270. #define ARENA_MEMORY_VERIFY
  271. #define SEPARATE_ARENA
  272. #define HEAP_TRACK_ALLOC
  273. #define CHECK_MEMORY_LEAK
  274. #define LEAK_REPORT
  275. #define PROJECTION_METADATA_TRACE
  276. #define ERROR_TRACE
  277. #define DEBUGGER_TRACE
  278. #define PROPERTY_RECORD_TRACE
  279. #define ARENA_ALLOCATOR_FREE_LIST_SIZE
  280. #ifdef DBG_EXTRAFIELD
  281. #define HEAP_ENUMERATION_VALIDATION
  282. #endif
  283. #endif // DBG_DUMP
  284. //----------------------------------------------------------------------------------------------------
  285. // Special build features
  286. // - features that can be enabled on private builds for debugging
  287. //----------------------------------------------------------------------------------------------------
  288. #ifdef ENABLE_JS_ETW
  289. // #define ETW_MEMORY_TRACKING // ETW events for internal allocations
  290. #endif
  291. // #define OLD_ITRACKER // Switch to the old IE8 ITracker GUID
  292. // #define LOG_BYTECODE_AST_RATIO // log the ratio between AST size and bytecode generated.
  293. // #define DUMP_FRAGMENTATION_STATS // Display HeapBucket fragmentation stats after sweep
  294. // ----- Fretest or free build special build features (already enabled in debug builds) -----
  295. // #define TRACK_DISPATCH
  296. // #define BGJIT_STATS
  297. // Profile defines that can be enabled in release build
  298. // #define PROFILE_EXEC
  299. // #define PROFILE_MEM
  300. // #define PROFILE_STRINGS
  301. // #define PROFILE_TYPES
  302. // #define PROFILE_OBJECT_LITERALS
  303. // #define PROFILE_RECYCLER_ALLOC
  304. // #define MEMSPECT_TRACKING
  305. // #define HEAP_TRACK_ALLOC
  306. // Recycler defines that can be enabled in release build
  307. // #define RECYCLER_STRESS
  308. // #define RECYCLER_STATS
  309. // #define RECYCLER_FINALIZE_CHECK
  310. // #define RECYCLER_FREE_MEM_FILL
  311. // #define RECYCLER_DUMP_OBJECT_GRAPH
  312. // #define RECYCLER_MEMORY_VERIFY
  313. // #define RECYCLER_TRACE
  314. // #define RECYCLER_VERIFY_MARK
  315. // #ifdef PERF_COUNTERS
  316. // #define RECYCLER_PERF_COUNTERS
  317. // #define HEAP_PERF_COUNTERS
  318. // #endif //PERF_COUNTERS
  319. // Other defines that can be enabled in release build
  320. // #define PAGEALLOCATOR_PROTECT_FREEPAGE
  321. // #define ARENA_MEMORY_VERIFY
  322. // #define SEPARATE_ARENA
  323. // #define LEAK_REPORT
  324. // #define CHECK_MEMORY_LEAK
  325. // #define RECYCLER_MARK_TRACK
  326. // #define INTERNAL_MEM_PROTECT_HEAP_ALLOC
  327. //----------------------------------------------------------------------------------------------------
  328. // Disabled features
  329. //----------------------------------------------------------------------------------------------------
  330. //Enable/disable dom properties
  331. #define DOMEnabled 0
  332. //----------------------------------------------------------------------------------------------------
  333. // Platform dependent flags
  334. //----------------------------------------------------------------------------------------------------
  335. #ifndef INT32VAR
  336. #if defined(_M_X64_OR_ARM64)
  337. #define INT32VAR 1
  338. #else
  339. #define INT32VAR 0
  340. #endif
  341. #endif
  342. #ifndef FLOATVAR
  343. #if defined(_M_X64)
  344. #define FLOATVAR 1
  345. #else
  346. #define FLOATVAR 0
  347. #endif
  348. #endif
  349. #if defined(_M_IX86) || defined(_M_X64)
  350. #ifndef TEMP_DISABLE_ASMJS
  351. #define ASMJS_PLAT
  352. #endif
  353. #endif
  354. #if _WIN32 || _WIN64
  355. #if _M_IX86
  356. #define I386_ASM 1
  357. #endif //_M_IX86
  358. #endif // _WIN32 || _WIN64
  359. #ifndef PDATA_ENABLED
  360. #if defined(_M_ARM32_OR_ARM64) || defined(_M_X64)
  361. #define PDATA_ENABLED 1
  362. #else
  363. #define PDATA_ENABLED 0
  364. #endif
  365. #endif
  366. //----------------------------------------------------------------------------------------------------
  367. // Dependent flags
  368. // - flags values that are dependent on other flags
  369. //----------------------------------------------------------------------------------------------------
  370. #ifndef CONCURRENT_GC_ENABLED
  371. #undef IDLE_DECOMMIT_ENABLED // Currently idle decommit can only be enabled if concurrent gc is enabled
  372. #endif
  373. #ifdef BAILOUT_INJECTION
  374. #define ENABLE_PREJIT
  375. #endif
  376. #if defined(ENABLE_DEBUG_CONFIG_OPTIONS)
  377. // Enable Output::Trace
  378. #define ENABLE_TRACE
  379. #endif
  380. #if DBG || defined(CHECK_MEMORY_LEAK) || defined(LEAK_REPORT) || defined(TRACK_DISPATCH) || defined(ENABLE_TRACE) || defined(RECYCLER_PAGE_HEAP)
  381. #define STACK_BACK_TRACE
  382. #endif
  383. #if defined(STACK_BACK_TRACE) || defined(CONTROL_FLOW_GUARD_LOGGER)
  384. #define DBGHELP_SYMBOL_MANAGER
  385. #endif
  386. #if defined(TRACK_DISPATCH) || defined(CHECK_MEMORY_LEAK) || defined(LEAK_REPORT)
  387. #define TRACK_JS_DISPATCH
  388. #endif
  389. // LEAK_REPORT and CHECK_MEMORY_LEAK requires RECYCLER_DUMP_OBJECT_GRAPH
  390. // HEAP_TRACK_ALLOC and RECYCLER_STATS
  391. #if defined(LEAK_REPORT) || defined(CHECK_MEMORY_LEAK)
  392. #define RECYCLER_DUMP_OBJECT_GRAPH
  393. #define HEAP_TRACK_ALLOC
  394. #define RECYCLER_STATS
  395. #endif
  396. // PROFILE_RECYCLER_ALLOC requires PROFILE_MEM
  397. #if defined(PROFILE_RECYCLER_ALLOC) && !defined(PROFILE_MEM)
  398. #define PROFILE_MEM
  399. #endif
  400. // RECYCLER_DUMP_OBJECT_GRAPH is needed when using PROFILE_RECYCLER_ALLOC
  401. #if defined(PROFILE_RECYCLER_ALLOC) && !defined(RECYCLER_DUMP_OBJECT_GRAPH)
  402. #define RECYCLER_DUMP_OBJECT_GRAPH
  403. #endif
  404. #if defined(HEAP_TRACK_ALLOC) || defined(PROFILE_RECYCLER_ALLOC)
  405. #define TRACK_ALLOC
  406. #define TRACE_OBJECT_LIFETIME // track a particular object's lifetime
  407. #endif
  408. #if defined(USED_IN_STATIC_LIB)
  409. #undef FAULT_INJECTION
  410. #undef RECYCLER_DUMP_OBJECT_GRAPH
  411. #undef HEAP_TRACK_ALLOC
  412. #undef RECYCLER_STATS
  413. #undef PERF_COUNTERS
  414. #endif
  415. // Not having the config options enabled trumps all the above logic for these switches
  416. #ifndef ENABLE_DEBUG_CONFIG_OPTIONS
  417. #undef ARENA_MEMORY_VERIFY
  418. #undef RECYCLER_MEMORY_VERIFY
  419. #undef PROFILE_MEM
  420. #undef PROFILE_DICTIONARY
  421. #undef PROFILE_RECYCLER_ALLOC
  422. #undef PROFILE_EXEC
  423. #undef PROFILE_EVALMAP
  424. #undef FAULT_INJECTION
  425. #undef RECYCLER_STRESS
  426. #undef RECYCLER_SLOW_VERIFY
  427. #undef RECYCLER_VERIFY_MARK
  428. #undef RECYCLER_STATS
  429. #undef RECYCLER_FINALIZE_CHECK
  430. #undef RECYCLER_DUMP_OBJECT_GRAPH
  431. #undef DBG_DUMP
  432. #undef BGJIT_STATS
  433. #undef EXCEPTION_RECOVERY
  434. #undef PROFILE_STRINGS
  435. #undef PROFILE_TYPES
  436. #undef PROFILE_OBJECT_LITERALS
  437. #undef SECURITY_TESTING
  438. #undef LEAK_REPORT
  439. #endif
  440. //----------------------------------------------------------------------------------------------------
  441. // Default flags values
  442. // - Set the default values of flags if it is not set by the command line or above
  443. //----------------------------------------------------------------------------------------------------
  444. #ifndef JS_PROFILE_DATA_INTERFACE
  445. #define JS_PROFILE_DATA_INTERFACE 0
  446. #endif
  447. #ifndef PROFILE_DICTIONARY
  448. #define PROFILE_DICTIONARY 0
  449. #endif