ConfigFlagsList.h 107 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft Corporation and contributors. All rights reserved.
  3. // Copyright (c) 2021 ChakraCore Project Contributors. All rights reserved.
  4. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  5. //-------------------------------------------------------------------------------------------------------
  6. #if defined(PHASE) || defined(PHASE_DEFAULT_ON) || defined(PHASE_DEFAULT_OFF)
  7. #ifndef PHASE
  8. #define PHASE(name)
  9. #endif
  10. #ifndef PHASE_DEFAULT_ON
  11. #define PHASE_DEFAULT_ON PHASE
  12. #endif
  13. #ifndef PHASE_DEFAULT_OFF
  14. #define PHASE_DEFAULT_OFF PHASE
  15. #endif
  16. PHASE(All)
  17. PHASE(BGJit)
  18. PHASE(Module)
  19. PHASE(LibInit)
  20. PHASE(JsLibInit)
  21. PHASE(Parse)
  22. PHASE(RegexCompile)
  23. PHASE_DEFAULT_ON(DeferParse)
  24. PHASE(Redeferral)
  25. PHASE(DeferEventHandlers)
  26. PHASE(FunctionSourceInfoParse)
  27. PHASE(StringTemplateParse)
  28. PHASE(CreateParserState)
  29. PHASE(SkipNestedDeferred)
  30. PHASE(CacheScopeInfoNames)
  31. PHASE(ScanAhead)
  32. PHASE_DEFAULT_OFF(ParallelParse)
  33. PHASE(EarlyReferenceErrors)
  34. PHASE(EarlyErrorOnAssignToCall)
  35. PHASE(BgParse)
  36. PHASE(ByteCode)
  37. PHASE(CachedScope)
  38. PHASE(StackFunc)
  39. PHASE(StackClosure)
  40. PHASE(DisableStackFuncOnDeferredEscape)
  41. PHASE(DelayCapture)
  42. PHASE(DebuggerScope)
  43. PHASE(ByteCodeSerialization)
  44. PHASE(VariableIntEncoding)
  45. PHASE(NativeCodeSerialization)
  46. PHASE(OptimizeBlockScope)
  47. PHASE(Delay)
  48. PHASE(Speculation)
  49. PHASE(GatherCodeGenData)
  50. PHASE_DEFAULT_ON(Wasm)
  51. // Wasm frontend
  52. PHASE(WasmBytecode) // Supports -off,-dump,-trace,-profile
  53. PHASE(WasmReader) // Support -trace,-profile
  54. PHASE(WasmSection) // Supports -trace
  55. PHASE(WasmOpCodeDistribution) // Support -dump
  56. // Wasm features per functions
  57. PHASE_DEFAULT_ON(WasmDeferred)
  58. PHASE_DEFAULT_OFF(WasmValidatePrejit)
  59. PHASE(WasmInOut) // Trace input and output of wasm calls
  60. PHASE(WasmMemWrites) // Trace memory writes
  61. PHASE(Asmjs)
  62. PHASE(AsmjsTmpRegisterAllocation)
  63. PHASE(AsmjsEncoder)
  64. PHASE(AsmjsInterpreter)
  65. PHASE(AsmJsJITTemplate)
  66. PHASE_DEFAULT_OFF(AsmjsFunctionEntry)
  67. PHASE(AsmjsInterpreterStack)
  68. PHASE(AsmjsEntryPointInfo)
  69. PHASE(AsmjsCallDebugBreak)
  70. PHASE(BackEnd)
  71. PHASE(IRBuilder)
  72. PHASE(SwitchOpt)
  73. PHASE(BailOnNoProfile)
  74. PHASE(BackendConcatExprOpt)
  75. PHASE(ClosureRangeCheck)
  76. PHASE(ClosureRegCheck)
  77. PHASE(Inline)
  78. PHASE(InlineRecursive)
  79. PHASE(InlineAtEveryCaller) //Inlines a function, say, foo at every caller of foo. Doesn't guarantee all the calls within foo are inlined too.
  80. PHASE(InlineTree) //Inlines every function within a top function, say, foo (which needs to be top function) Note: -force:inline achieves the effect of both -force:InlineTree & -force:InlineAtEveryCaller
  81. PHASE(TryAggressiveInlining)
  82. PHASE(InlineConstructors)
  83. PHASE(InlineBuiltIn)
  84. PHASE(InlineInJitLoopBody)
  85. PHASE(InlineAccessors)
  86. PHASE(InlineGetters)
  87. PHASE(InlineSetters)
  88. PHASE(InlineApply)
  89. PHASE(InlineApplyTarget)
  90. PHASE(InlineApplyWithoutArrayArg)
  91. PHASE(InlineAnyCallApplyTarget)
  92. PHASE(BailOutOnNotStackArgs)
  93. PHASE(InlineCall)
  94. PHASE(InlineCallTarget)
  95. PHASE(PartialPolymorphicInline)
  96. PHASE(PolymorphicInline)
  97. PHASE(PolymorphicInlineFixedMethods)
  98. PHASE(InlineOutsideLoops)
  99. PHASE(InlineFunctionsWithLoops)
  100. PHASE(EliminateArgoutForInlinee)
  101. PHASE(InlineBuiltInCaller)
  102. PHASE(InlineArgsOpt)
  103. PHASE(RemoveInlineFrame)
  104. PHASE(InlinerConstFold)
  105. PHASE_DEFAULT_ON(InlineCallbacks)
  106. PHASE(ExecBOIFastPath)
  107. PHASE(FGBuild)
  108. PHASE(OptimizeTryFinally)
  109. PHASE(RemoveBreakBlock)
  110. PHASE(TailDup)
  111. PHASE(FGPeeps)
  112. PHASE(GlobOpt)
  113. PHASE(PathDepBranchFolding)
  114. PHASE(OptimizeTryCatch)
  115. PHASE_DEFAULT_ON(CaptureByteCodeRegUse)
  116. PHASE(Backward)
  117. PHASE(TrackIntUsage)
  118. PHASE(TrackNegativeZero)
  119. PHASE(TypedArrayVirtual)
  120. PHASE(TrackIntOverflow)
  121. PHASE(TrackCompoundedIntOverflow)
  122. PHASE(Forward)
  123. PHASE(ValueTable)
  124. PHASE(ValueNumbering)
  125. PHASE(AVTInPrePass)
  126. PHASE(PathDependentValues)
  127. PHASE(TrackRelativeIntBounds)
  128. PHASE(BoundCheckElimination)
  129. PHASE(BoundCheckHoist)
  130. PHASE(LoopCountBasedBoundCheckHoist)
  131. PHASE(CopyProp)
  132. PHASE(ObjPtrCopyProp)
  133. PHASE(ConstProp)
  134. PHASE(Int64ConstProp)
  135. PHASE(ConstFold)
  136. PHASE(CSE)
  137. PHASE(HoistConstInt)
  138. PHASE(TypeSpec)
  139. PHASE(AggressiveIntTypeSpec)
  140. PHASE(AggressiveMulIntTypeSpec)
  141. PHASE(LossyIntTypeSpec)
  142. PHASE(FloatTypeSpec)
  143. PHASE(StringTypeSpec)
  144. PHASE(InductionVars)
  145. PHASE(Invariants)
  146. PHASE(FieldCopyProp)
  147. PHASE(FieldPRE)
  148. PHASE(MakeObjSymLiveInLandingPad)
  149. PHASE(HostOpt)
  150. PHASE(ObjTypeSpec)
  151. PHASE(ObjTypeSpecNewObj)
  152. PHASE(ObjTypeSpecIsolatedFldOps)
  153. PHASE(ObjTypeSpecIsolatedFldOpsWithBailOut)
  154. PHASE(ObjTypeSpecStore)
  155. PHASE(EquivObjTypeSpec)
  156. PHASE(EquivObjTypeSpecByDefault)
  157. PHASE(TraceObjTypeSpecTypeGuards)
  158. PHASE(TraceObjTypeSpecWriteGuards)
  159. PHASE(LiveOutFields)
  160. PHASE(DisabledObjTypeSpec)
  161. PHASE(DepolymorphizeInlinees)
  162. PHASE(ReuseAuxSlotPtr)
  163. PHASE(PolyEquivTypeGuard)
  164. PHASE(DeadStoreTypeChecksOnStores)
  165. #if DBG
  166. PHASE(SimulatePolyCacheWithOneTypeForFunction)
  167. #endif
  168. PHASE(CheckThis)
  169. PHASE(StackArgOpt)
  170. PHASE(StackArgFormalsOpt)
  171. PHASE(StackArgLenConstOpt)
  172. PHASE(IndirCopyProp)
  173. PHASE(ArrayCheckHoist)
  174. PHASE(ArrayMissingValueCheckHoist)
  175. PHASE(ArraySegmentHoist)
  176. PHASE(JsArraySegmentHoist)
  177. PHASE(ArrayLengthHoist)
  178. PHASE(EliminateArrayAccessHelperCall)
  179. PHASE(NativeArray)
  180. PHASE(NativeNewScArray)
  181. PHASE(NativeArrayConversion)
  182. PHASE(CopyOnAccessArray)
  183. PHASE(NativeArrayLeafSegment)
  184. PHASE(TypedArrayTypeSpec)
  185. PHASE(LdLenIntSpec)
  186. PHASE(FixDataProps)
  187. PHASE(FixMethodProps)
  188. PHASE(FixAccessorProps)
  189. PHASE(FixDataVarProps)
  190. PHASE(UseFixedDataProps)
  191. PHASE(UseFixedDataPropsInInliner)
  192. PHASE(LazyBailout)
  193. PHASE(LazyBailoutOnImplicitCalls)
  194. PHASE(LazyFixedDataBailout)
  195. PHASE(LazyFixedTypeBailout)
  196. PHASE(FixedMethods)
  197. PHASE(FEFixedMethods)
  198. PHASE(FixedFieldGuardCheck)
  199. PHASE(FixedNewObj)
  200. PHASE(JitAllocNewObj)
  201. PHASE(FixedCtorInlining)
  202. PHASE(FixedCtorCalls)
  203. PHASE(FixedScriptMethodInlining)
  204. PHASE(FixedScriptMethodCalls)
  205. PHASE(FixedBuiltInMethodInlining)
  206. PHASE(FixedBuiltInMethodCalls)
  207. PHASE(SplitNewScObject)
  208. PHASE(OptTagChecks)
  209. PHASE(MemOp)
  210. PHASE(MemSet)
  211. PHASE(MemCopy)
  212. PHASE(IncrementalBailout)
  213. PHASE(DeadStore)
  214. PHASE(ReverseCopyProp)
  215. PHASE(MarkTemp)
  216. PHASE(MarkTempNumber)
  217. PHASE(MarkTempObject)
  218. PHASE(MarkTempNumberOnTempObject)
  219. PHASE(SpeculationPropagationAnalysis)
  220. PHASE(DumpGlobOptInstr) // Print the Globopt instr string in post lower dumps
  221. PHASE(Lowerer)
  222. PHASE(FastPath)
  223. PHASE(LoopFastPath)
  224. PHASE(MathFastPath)
  225. PHASE(Atom)
  226. PHASE(MulStrengthReduction)
  227. PHASE(AgenPeeps)
  228. PHASE(BranchFastPath)
  229. PHASE(CallFastPath)
  230. PHASE(BitopsFastPath)
  231. PHASE(OtherFastPath)
  232. PHASE(ObjectFastPath)
  233. PHASE(ProfileBasedFldFastPath)
  234. PHASE(AddFldFastPath)
  235. PHASE(RootObjectFldFastPath)
  236. PHASE(ArrayLiteralFastPath)
  237. PHASE(ArrayCtorFastPath)
  238. PHASE(NewScopeSlotFastPath)
  239. PHASE(FrameDisplayFastPath)
  240. PHASE(HoistMarkTempInit)
  241. PHASE(HoistConstAddr)
  242. PHASE(JitWriteBarrier)
  243. PHASE(PreLowererPeeps)
  244. PHASE(CFGInJit)
  245. PHASE(TypedArray)
  246. PHASE(TracePinnedTypes)
  247. PHASE(InterruptProbe)
  248. PHASE(EncodeConstants)
  249. PHASE(RegAlloc)
  250. PHASE(Liveness)
  251. PHASE(RegParams)
  252. PHASE(LinearScan)
  253. PHASE(OpHelperRegOpt)
  254. PHASE(StackPack)
  255. PHASE(SecondChance)
  256. PHASE(RegionUseCount)
  257. PHASE(RegHoistLoads)
  258. PHASE(ClearRegLoopExit)
  259. PHASE(Peeps)
  260. PHASE(Layout)
  261. PHASE(EHBailoutPatchUp)
  262. PHASE(FinalLower)
  263. PHASE(PrologEpilog)
  264. PHASE(InsertNOPs)
  265. PHASE(Encoder)
  266. PHASE(Assembly)
  267. PHASE(Emitter)
  268. PHASE(DebugBreak)
  269. #if defined(_M_IX86) || defined(_M_X64)
  270. PHASE(BrShorten)
  271. PHASE(LoopAlign)
  272. #endif
  273. #ifdef RECYCLER_WRITE_BARRIER
  274. #if DBG_DUMP
  275. PHASE(SWB)
  276. #endif
  277. #endif
  278. PHASE(Run)
  279. PHASE(Interpreter)
  280. PHASE(EvalCompile)
  281. PHASE(FastIndirectEval)
  282. PHASE(IdleDecommit)
  283. PHASE(IdleCollect)
  284. PHASE(Marshal)
  285. PHASE(MemoryAllocation)
  286. #ifdef RECYCLER_PAGE_HEAP
  287. PHASE(PageHeap)
  288. #endif
  289. PHASE(LargeMemoryAllocation)
  290. PHASE(PageAllocatorAlloc)
  291. PHASE(Recycler)
  292. PHASE(ThreadCollect)
  293. PHASE(ExplicitFree)
  294. PHASE(ExpirableCollect)
  295. PHASE(GarbageCollect)
  296. PHASE(ConcurrentCollect)
  297. PHASE(BackgroundResetMarks)
  298. PHASE(BackgroundFindRoots)
  299. PHASE(BackgroundRescan)
  300. PHASE(BackgroundRepeatMark)
  301. PHASE(BackgroundFinishMark)
  302. PHASE(ConcurrentPartialCollect)
  303. PHASE(ParallelMark)
  304. PHASE(PartialCollect)
  305. PHASE(ResetMarks)
  306. PHASE(ResetWriteWatch)
  307. PHASE(FindRoot)
  308. PHASE(FindRootArena)
  309. PHASE(FindImplicitRoot)
  310. PHASE(FindRootExt)
  311. PHASE(ScanStack)
  312. PHASE(ConcurrentMark)
  313. PHASE(ConcurrentWait)
  314. PHASE(Rescan)
  315. PHASE(Mark)
  316. PHASE(Sweep)
  317. PHASE(SweepWeak)
  318. PHASE(SweepSmall)
  319. PHASE(SweepLarge)
  320. PHASE(SweepPartialReuse)
  321. PHASE(ConcurrentSweep)
  322. PHASE(Finalize)
  323. PHASE(Dispose)
  324. PHASE(FinishPartial)
  325. PHASE(Host)
  326. PHASE(BailOut)
  327. PHASE(BailIn)
  328. PHASE(GeneratorGlobOpt)
  329. PHASE(RegexQc)
  330. PHASE(RegexOptBT)
  331. PHASE(InlineCache)
  332. PHASE(PolymorphicInlineCache)
  333. PHASE(MissingPropertyCache)
  334. PHASE(PropertyCache) // Trace caching of property lookups using PropertyString and JavascriptSymbol
  335. PHASE(CloneCacheInCollision)
  336. PHASE(ConstructorCache)
  337. PHASE(InlineCandidate)
  338. PHASE(ScriptFunctionWithInlineCache)
  339. PHASE(IsConcatSpreadableCache)
  340. PHASE(Arena)
  341. PHASE(ApplyUsage)
  342. PHASE(ObjectHeaderInlining)
  343. PHASE(ObjectHeaderInliningForConstructors)
  344. PHASE(ObjectHeaderInliningForObjectLiterals)
  345. PHASE(ObjectHeaderInliningForEmptyObjects)
  346. PHASE(OptUnknownElementName)
  347. PHASE(TypePropertyCache)
  348. #if DBG_DUMP
  349. PHASE(InlineSlots)
  350. #endif
  351. PHASE(DynamicProfile)
  352. #ifdef DYNAMIC_PROFILE_STORAGE
  353. PHASE(DynamicProfileStorage)
  354. #endif
  355. PHASE(JITLoopBody)
  356. PHASE(JITLoopBodyInTryCatch)
  357. PHASE(JITLoopBodyInTryFinally)
  358. PHASE(ReJIT)
  359. PHASE(ExecutionMode)
  360. PHASE(SimpleJitDynamicProfile)
  361. PHASE(SimpleJit)
  362. PHASE(FullJit)
  363. PHASE(FailNativeCodeInstall)
  364. PHASE(PixelArray)
  365. PHASE(Etw)
  366. PHASE(Profiler)
  367. PHASE(CustomHeap)
  368. PHASE(XDataAllocator)
  369. PHASE(PageAllocator)
  370. PHASE(StringConcat)
  371. #if DBG_DUMP
  372. PHASE(PRNG)
  373. #endif
  374. PHASE(PreReservedHeapAlloc)
  375. PHASE(CFG)
  376. PHASE(ExceptionStackTrace)
  377. PHASE(ExtendedExceptionInfoStackTrace)
  378. PHASE(TypeHandlerTransition)
  379. PHASE(Debugger)
  380. PHASE(ENC)
  381. PHASE(ConsoleScope)
  382. PHASE(ScriptProfiler)
  383. PHASE(JSON)
  384. PHASE(Intl)
  385. PHASE(RegexResultNotUsed)
  386. PHASE(Error)
  387. PHASE(PropertyRecord)
  388. PHASE(TypePathDynamicSize)
  389. PHASE(ObjectCopy)
  390. PHASE(ShareTypesWithAttributes)
  391. PHASE(ShareAccessorTypes)
  392. PHASE(ShareFuncTypes)
  393. PHASE(ShareCrossSiteFuncTypes)
  394. PHASE(ConditionalCompilation)
  395. PHASE(InterpreterProfile)
  396. PHASE(InterpreterAutoProfile)
  397. PHASE(ByteCodeConcatExprOpt)
  398. PHASE(TraceInlineCacheInvalidation)
  399. PHASE(TracePropertyGuards)
  400. #ifdef ENABLE_JS_ETW
  401. PHASE(StackFramesEvent)
  402. #endif
  403. PHASE(PerfHint)
  404. PHASE(TypeShareForChangePrototype)
  405. PHASE(DeferSourceLoad)
  406. PHASE(DataCache)
  407. PHASE(ObjectMutationBreakpoint)
  408. PHASE(NativeCodeData)
  409. PHASE(XData)
  410. #undef PHASE
  411. #undef PHASE_DEFAULT_ON
  412. #undef PHASE_DEFAULT_OFF
  413. #endif
  414. #ifndef DEFAULT_CONFIG_BgJitDelay
  415. #if _M_ARM
  416. #define DEFAULT_CONFIG_BgJitDelay (70)
  417. #else
  418. #define DEFAULT_CONFIG_BgJitDelay (30)
  419. #endif
  420. #endif // DEFAULT_CONFIG_BgJitDelay
  421. #define DEFAULT_CONFIG_AsmJs (true)
  422. #define DEFAULT_CONFIG_AsmJsEdge (false)
  423. #define DEFAULT_CONFIG_AsmJsStopOnError (false)
  424. #define DEFAULT_CONFIG_Wasm (true)
  425. #define DEFAULT_CONFIG_WasmI64 (false)
  426. #if ENABLE_FAST_ARRAYBUFFER
  427. #define DEFAULT_CONFIG_WasmFastArray (true)
  428. #else
  429. #define DEFAULT_CONFIG_WasmFastArray (false)
  430. #endif
  431. #define DEFAULT_CONFIG_WasmSharedArrayVirtualBuffer (true)
  432. #define DEFAULT_CONFIG_WasmCheckVersion (true)
  433. #define DEFAULT_CONFIG_WasmAssignModuleID (false)
  434. #define DEFAULT_CONFIG_WasmIgnoreLimits (false)
  435. #define DEFAULT_CONFIG_WasmFold (true)
  436. #define DEFAULT_CONFIG_WasmMathExFilter (false)
  437. #define DEFAULT_CONFIG_WasmIgnoreResponse (false)
  438. #define DEFAULT_CONFIG_WasmMaxTableSize (10000000)
  439. #define DEFAULT_CONFIG_WasmThreads (false)
  440. #define DEFAULT_CONFIG_WasmMultiValue (false)
  441. #define DEFAULT_CONFIG_WasmSignExtends (true)
  442. #define DEFAULT_CONFIG_WasmNontrapping (true)
  443. #define DEFAULT_CONFIG_WasmExperimental (false)
  444. #define DEFAULT_CONFIG_BgParse (false)
  445. #define DEFAULT_CONFIG_BgJitDelayFgBuffer (0)
  446. #define DEFAULT_CONFIG_BgJitPendingFuncCap (31)
  447. #define DEFAULT_CONFIG_CurrentSourceInfo (true)
  448. #define DEFAULT_CONFIG_CreateFunctionProxy (true)
  449. #define DEFAULT_CONFIG_HybridFgJit (false)
  450. #define DEFAULT_CONFIG_HybridFgJitBgQueueLengthThreshold (32)
  451. #define DEFAULT_CONFIG_Prejit (false)
  452. #define DEFAULT_CONFIG_ParserStateCache (true)
  453. #define DEFAULT_CONFIG_CompressParserStateCache (false)
  454. #define DEFAULT_CONFIG_DeferTopLevelTillFirstCall (true)
  455. #define DEFAULT_CONFIG_DirectCallTelemetryStats (false)
  456. #define DEFAULT_CONFIG_errorStackTrace (true)
  457. #define DEFAULT_CONFIG_FastLineColumnCalculation (true)
  458. #define DEFAULT_CONFIG_PrintLineColumnInfo (false)
  459. #define DEFAULT_CONFIG_ForceDecommitOnCollect (false)
  460. #define DEFAULT_CONFIG_ForceDeferParse (false)
  461. #define DEFAULT_CONFIG_NoDeferParse (false)
  462. #define DEFAULT_CONFIG_ForceDynamicProfile (false)
  463. #define DEFAULT_CONFIG_ForceExpireOnNonCacheCollect (false)
  464. #define DEFAULT_CONFIG_ForceFastPath (false)
  465. #define DEFAULT_CONFIG_ForceJITLoopBody (false)
  466. #define DEFAULT_CONFIG_ForceStaticInterpreterThunk (false)
  467. #define DEFAULT_CONFIG_ForceCleanPropertyOnCollect (false)
  468. #define DEFAULT_CONFIG_ForceCleanCacheOnCollect (false)
  469. #define DEFAULT_CONFIG_ForceGCAfterJSONParse (false)
  470. #define DEFAULT_CONFIG_ForceSerialized (false)
  471. #define DEFAULT_CONFIG_ForceES5Array (false)
  472. #define DEFAULT_CONFIG_ForceAsmJsLinkFail (false)
  473. #define DEFAULT_CONFIG_StrongArraySort (false)
  474. #define DEFAULT_CONFIG_DumpCommentsFromReferencedFiles (false)
  475. #define DEFAULT_CONFIG_ExtendedErrorStackForTestHost (false)
  476. #define DEFAULT_CONFIG_ForceSplitScope (false)
  477. #define DEFAULT_CONFIG_DelayFullJITSmallFunc (0)
  478. #define DEFAULT_CONFIG_EnableFatalErrorOnOOM (true)
  479. #define DEFAULT_CONFIG_RedeferralCap (3)
  480. //Following determines inline thresholds
  481. #define DEFAULT_CONFIG_InlineThreshold (35) //Default start
  482. #define DEFAULT_CONFIG_AggressiveInlineThreshold (80) //Limit for aggressive inlining.
  483. #define DEFAULT_CONFIG_InlineThresholdAdjustCountInLargeFunction (20)
  484. #define DEFAULT_CONFIG_InlineThresholdAdjustCountInMediumSizedFunction (6)
  485. #define DEFAULT_CONFIG_InlineThresholdAdjustCountInSmallFunction (10)
  486. #define DEFAULT_CONFIG_ConstructorInlineThreshold (21) //Monomorphic constructor threshold
  487. #define DEFAULT_CONFIG_AsmJsInlineAdjust (35) // wasm functions are cheaper to inline, so worth being more aggressive
  488. #define DEFAULT_CONFIG_ConstructorCallsRequiredToFinalizeCachedType (2)
  489. #define DEFAULT_CONFIG_OutsideLoopInlineThreshold (16) //Threshold to inline outside loops
  490. #define DEFAULT_CONFIG_LeafInlineThreshold (60) //Inlinee threshold for function which is leaf (irrespective of it has loops or not)
  491. #define DEFAULT_CONFIG_LoopInlineThreshold (25) //Inlinee threshold for function with loops
  492. #define DEFAULT_CONFIG_PolymorphicInlineThreshold (35) //Polymorphic inline threshold
  493. #define DEFAULT_CONFIG_InlineCountMax (1200) //Max sum of bytecodes of inlinees inlined into a function (excluding built-ins)
  494. #define DEFAULT_CONFIG_InlineCountMaxInLoopBodies (500) // Max sum of bytecodes of inlinees that can be inlined into a jitted loop body (excluding built-ins)
  495. #define DEFAULT_CONFIG_AggressiveInlineCountMax (8000) //Max sum of bytecodes of inlinees inlined into a function (excluding built-ins) when inlined aggressively
  496. #define DEFAULT_CONFIG_MaxFuncInlineDepth (2) //Maximum number of times a function can be inlined within a top function
  497. #define DEFAULT_CONFIG_MaxNumberOfInlineesWithLoop (40) //Inlinee with a loop is controlled by LoopInlineThreshold, though we don't want to inline lot of inlinees with loop, this ensures a limit.
  498. #define DEFAULT_CONFIG_ConstantArgumentInlineThreshold (157) // Bytecode threshold for functions with constant arguments which are used for branching
  499. #define DEFAULT_CONFIG_RecursiveInlineThreshold (2000) // Bytecode threshold recursive call at a call site
  500. #define DEFAULT_CONFIG_RecursiveInlineDepthMax (8) // Maximum inline depth for recursive calls
  501. #define DEFAULT_CONFIG_RecursiveInlineDepthMin (2) // Minimum inline depth for recursive call
  502. #define DEFAULT_CONFIG_InlineInLoopBodyScaleDownFactor (4)
  503. #define DEFAULT_CONFIG_PropertyCacheMissPenalty (10)
  504. #define DEFAULT_CONFIG_PropertyCacheMissThreshold (-100)
  505. #define DEFAULT_CONFIG_PropertyCacheMissReset (-5000)
  506. #define DEFAULT_CONFIG_CloneInlinedPolymorphicCaches (true)
  507. #define DEFAULT_CONFIG_HighPrecisionDate (false)
  508. #define DEFAULT_CONFIG_ForceOldDateAPI (false)
  509. #define DEFAULT_CONFIG_Loop (1)
  510. #define DEFAULT_CONFIG_ForceDiagnosticsMode (false)
  511. #define DEFAULT_CONFIG_UseFullName (true)
  512. #define DEFAULT_CONFIG_EnableContinueAfterExceptionWrappersForHelpers (true)
  513. #define DEFAULT_CONFIG_EnableContinueAfterExceptionWrappersForBuiltIns (true)
  514. #define DEFAULT_CONFIG_EnableFunctionSourceReportForHeapEnum (true)
  515. #define DEFAULT_CONFIG_LoopInterpretCount (150)
  516. #define DEFAULT_CONFIG_LoopProfileIterations (25)
  517. #define DEFAULT_CONFIG_JitLoopBodyHotLoopThreshold (20000)
  518. #define DEFAULT_CONFIG_LoopBodySizeThresholdToDisableOpts (255)
  519. #define DEFAULT_CONFIG_MaxJitThreadCount (2)
  520. #define DEFAULT_CONFIG_ForceMaxJitThreadCount (false)
  521. #ifdef ENABLE_SPECTRE_RUNTIME_MITIGATIONS
  522. #define DEFAULT_CONFIG_MitigateSpectre (true)
  523. #define DEFAULT_CONFIG_AddMaskingBlocks (true)
  524. #define DEFAULT_CONFIG_PoisonVarArrayLoad (true)
  525. #define DEFAULT_CONFIG_PoisonIntArrayLoad (true)
  526. #define DEFAULT_CONFIG_PoisonFloatArrayLoad (true)
  527. #define DEFAULT_CONFIG_PoisonTypedArrayLoad (true)
  528. #define DEFAULT_CONFIG_PoisonStringLoad (true)
  529. #define DEFAULT_CONFIG_PoisonObjectsForLoads (true)
  530. #define DEFAULT_CONFIG_PoisonVarArrayStore (true)
  531. #define DEFAULT_CONFIG_PoisonIntArrayStore (true)
  532. #define DEFAULT_CONFIG_PoisonFloatArrayStore (true)
  533. #define DEFAULT_CONFIG_PoisonTypedArrayStore (true)
  534. #define DEFAULT_CONFIG_PoisonStringStore (true)
  535. #define DEFAULT_CONFIG_PoisonObjectsForStores (true)
  536. #else
  537. #define DEFAULT_CONFIG_MitigateSpectre (false)
  538. #define DEFAULT_CONFIG_AddMaskingBlocks (false)
  539. #define DEFAULT_CONFIG_PoisonVarArrayLoad (false)
  540. #define DEFAULT_CONFIG_PoisonIntArrayLoad (false)
  541. #define DEFAULT_CONFIG_PoisonFloatArrayLoad (false)
  542. #define DEFAULT_CONFIG_PoisonTypedArrayLoad (false)
  543. #define DEFAULT_CONFIG_PoisonStringLoad (false)
  544. #define DEFAULT_CONFIG_PoisonObjectsForLoads (false)
  545. #define DEFAULT_CONFIG_PoisonVarArrayStore (false)
  546. #define DEFAULT_CONFIG_PoisonIntArrayStore (false)
  547. #define DEFAULT_CONFIG_PoisonFloatArrayStore (false)
  548. #define DEFAULT_CONFIG_PoisonTypedArrayStore (false)
  549. #define DEFAULT_CONFIG_PoisonStringStore (false)
  550. #define DEFAULT_CONFIG_PoisonObjectsForStores (false)
  551. #endif
  552. #ifdef RECYCLER_PAGE_HEAP
  553. #define DEFAULT_CONFIG_PageHeap ((Js::Number) PageHeapMode::PageHeapModeOff)
  554. #define DEFAULT_CONFIG_PageHeapAllocStack (false)
  555. #define DEFAULT_CONFIG_PageHeapFreeStack (false)
  556. #define DEFAULT_CONFIG_PageHeapBlockType ((Js::Number) PageHeapBlockTypeFilter::PageHeapBlockTypeFilterAll)
  557. #endif
  558. #define DEFAULT_CONFIG_LowMemoryCap (0xB900000) // 185 MB - based on memory cap for process on low-capacity device
  559. #define DEFAULT_CONFIG_NewPagesCapDuringBGSweeping (15000 * 4)
  560. #define DEFAULT_CONFIG_MaxSingleAllocSizeInMB (2048)
  561. #define DEFAULT_CONFIG_AllocationPolicyLimit (-1)
  562. #define DEFAULT_CONFIG_MaxCodeFill (500)
  563. #define DEFAULT_CONFIG_MaxLoopsPerFunction (10)
  564. #define DEFAULT_CONFIG_NopFrequency (8)
  565. #define DEFAULT_CONFIG_SpeculationCap (1) // Needs to be 1 and not 0 since the compiler complains about a condition being always false
  566. #define DEFAULT_CONFIG_ProfileBasedSpeculationCap (1600)
  567. #define DEFAULT_CONFIG_Verbose (false)
  568. #define DEFAULT_CONFIG_ForceStrictMode (false)
  569. #define DEFAULT_CONFIG_EnableEvalMapCleanup (true)
  570. #define DEFAULT_CONFIG_ExpirableCollectionGCCount (5) // Number of GCs during which entry point profiling occurs
  571. #define DEFAULT_CONFIG_ExpirableCollectionTriggerThreshold (50) // Threshold at which Entry Point Collection is triggered
  572. #define DEFAULT_CONFIG_RegexTracing (false)
  573. #define DEFAULT_CONFIG_RegexProfile (false)
  574. #define DEFAULT_CONFIG_RegexDebug (false)
  575. #define DEFAULT_CONFIG_RegexDebugAST (true)
  576. #define DEFAULT_CONFIG_RegexDebugAnnotatedAST (true)
  577. #define DEFAULT_CONFIG_RegexBytecodeDebug (false)
  578. #define DEFAULT_CONFIG_RegexOptimize (true)
  579. #define DEFAULT_CONFIG_DynamicRegexMruListSize (16)
  580. #define DEFAULT_CONFIG_GoptCleanupThreshold (25)
  581. #define DEFAULT_CONFIG_AsmGoptCleanupThreshold (500)
  582. #define DEFAULT_CONFIG_OptimizeForManyInstances (false)
  583. #define DEFAULT_CONFIG_EnableArrayTypeMutation (false)
  584. #define DEFAULT_CONFIG_DeferParseThreshold (4 * 1024) // Unit is number of characters
  585. #define DEFAULT_CONFIG_ProfileBasedDeferParseThreshold (100) // Unit is number of characters
  586. #define DEFAULT_CONFIG_ProfileBasedSpeculativeJit (true)
  587. #define DEFAULT_CONFIG_WininetProfileCache (true)
  588. #define DEFAULT_CONFIG_MinProfileCacheSize (5) // Minimum number of functions before profile is saved.
  589. #define DEFAULT_CONFIG_ProfileDifferencePercent (15) // If 15% of the functions have different profile we will trigger a save.
  590. #define DEFAULT_CONFIG_Intl (true)
  591. #define DEFAULT_CONFIG_IntlBuiltIns (true)
  592. #define DEFAULT_CONFIG_IntlPlatform (false) // Makes the EngineExtension.Intl object visible to user code as Intl.platform, meant for testing
  593. #ifdef ENABLE_JS_BUILTINS
  594. #define DEFAULT_CONFIG_JsBuiltIn (true)
  595. #else
  596. #define DEFAULT_CONFIG_JsBuiltIn (false)
  597. #endif
  598. #define DEFAULT_CONFIG_JitRepro (false)
  599. #define DEFAULT_CONFIG_LdChakraLib (false)
  600. #define DEFAULT_CONFIG_TestChakraLib (false)
  601. #define DEFAULT_CONFIG_EntryPointInfoRpcData (false)
  602. // ES6 DEFAULT BEHAVIOR
  603. #define DEFAULT_CONFIG_ES6 (true) // master flag to gate all P0-spec-test compliant ES6 features
  604. //CollectGarbage is legacy IE specific global function disabled in Microsoft Edge.
  605. #define DEFAULT_CONFIG_CollectGarbage (false)
  606. // ES6 sub-feature gate - to enable-disable ES6 sub-feature when ES6 flag is enabled
  607. #define DEFAULT_CONFIG_ES6DateParseFix (true)
  608. #define DEFAULT_CONFIG_ES6FunctionNameFull (true)
  609. #define DEFAULT_CONFIG_ES6Generators (true)
  610. #define DEFAULT_CONFIG_ES6IsConcatSpreadable (true)
  611. #define DEFAULT_CONFIG_ES6Math (true)
  612. #ifdef COMPILE_DISABLE_ES6Module
  613. // If ES6Module needs to be disabled by compile flag, DEFAULT_CONFIG_ES6Module should be false
  614. #define DEFAULT_CONFIG_ES6Module (false)
  615. #else
  616. #define DEFAULT_CONFIG_ES6Module (true)
  617. #endif
  618. #define DEFAULT_CONFIG_ES6Object (true)
  619. #define DEFAULT_CONFIG_ES6Number (true)
  620. #define DEFAULT_CONFIG_ES6ObjectLiterals (true)
  621. #define DEFAULT_CONFIG_ES6Proxy (true)
  622. #define DEFAULT_CONFIG_ES6Rest (true)
  623. #define DEFAULT_CONFIG_ES6Spread (true)
  624. #define DEFAULT_CONFIG_ES6String (true)
  625. #define DEFAULT_CONFIG_ES6StringPrototypeFixes (true)
  626. #define DEFAULT_CONFIG_ES2018ObjectRestSpread (true)
  627. #ifndef DEFAULT_CONFIG_ES6PrototypeChain
  628. #ifdef COMPILE_DISABLE_ES6PrototypeChain
  629. // If ES6PrototypeChain needs to be disabled by compile flag, DEFAULT_CONFIG_ES6PrototypeChain should be false
  630. #define DEFAULT_CONFIG_ES6PrototypeChain (false)
  631. #else
  632. #define DEFAULT_CONFIG_ES6PrototypeChain (true)
  633. #endif
  634. #endif
  635. #define DEFAULT_CONFIG_ES6ToPrimitive (true)
  636. #define DEFAULT_CONFIG_ES6ToLength (true)
  637. #define DEFAULT_CONFIG_ES6ToStringTag (true)
  638. #define DEFAULT_CONFIG_ES6Unicode (true)
  639. #define DEFAULT_CONFIG_ES6UnicodeVerbose (true)
  640. #define DEFAULT_CONFIG_ES6Unscopables (true)
  641. #define DEFAULT_CONFIG_ES6RegExSticky (true)
  642. #define DEFAULT_CONFIG_ES2018RegExDotAll (true)
  643. #define DEFAULT_CONFIG_ESBigInt (false)
  644. #define DEFAULT_CONFIG_ESNumericSeparator (true)
  645. #define DEFAULT_CONFIG_ESHashbang (true)
  646. #define DEFAULT_CONFIG_ESSymbolDescription (true)
  647. #define DEFAULT_CONFIG_ESArrayFindFromLast (false)
  648. #define DEFAULT_CONFIG_ESPromiseAny (true)
  649. #define DEFAULT_CONFIG_ESNullishCoalescingOperator (true)
  650. #define DEFAULT_CONFIG_ESGlobalThis (true)
  651. // Jitting generators has not been tested on ARM
  652. // enabled only for x86 and x64 for now
  653. #ifdef _M_ARM32_OR_ARM64
  654. #define DEFAULT_CONFIG_JitES6Generators (false)
  655. #else
  656. #define DEFAULT_CONFIG_JitES6Generators (true)
  657. #endif
  658. #ifdef COMPILE_DISABLE_ES6RegExPrototypeProperties
  659. // If ES6RegExPrototypeProperties needs to be disabled by compile flag, DEFAULT_CONFIG_ES6RegExPrototypeProperties should be false
  660. #define DEFAULT_CONFIG_ES6RegExPrototypeProperties (false)
  661. #else
  662. #define DEFAULT_CONFIG_ES6RegExPrototypeProperties (false)
  663. #endif
  664. #ifdef COMPILE_DISABLE_ES6RegExSymbols
  665. // If ES6RegExSymbols needs to be disabled by compile flag, DEFAULT_CONFIG_ES6RegExSymbols should be false
  666. #define DEFAULT_CONFIG_ES6RegExSymbols (false)
  667. #else
  668. #define DEFAULT_CONFIG_ES6RegExSymbols (false)
  669. #endif
  670. #define DEFAULT_CONFIG_ES6HasInstance (true)
  671. #define DEFAULT_CONFIG_ES7AsyncAwait (true)
  672. #define DEFAULT_CONFIG_ES7ExponentionOperator (true)
  673. #define DEFAULT_CONFIG_ES7TrailingComma (true)
  674. #define DEFAULT_CONFIG_ES7ValuesEntries (true)
  675. #define DEFAULT_CONFIG_ESObjectGetOwnPropertyDescriptors (true)
  676. #define DEFAULT_CONFIG_ESDynamicImport (true)
  677. #define DEFAULT_CONFIG_ESImportMeta (true)
  678. #define DEFAULT_CONFIG_ESExportNsAs (true)
  679. #define DEFAULT_CONFIG_ES2018AsyncIteration (true)
  680. #define DEFAULT_CONFIG_ESTopLevelAwait (true)
  681. #define DEFAULT_CONFIG_ESSharedArrayBuffer (false)
  682. #define DEFAULT_CONFIG_ES6Verbose (false)
  683. #define DEFAULT_CONFIG_ES6All (false)
  684. // ES6 DEFAULT BEHAVIOR
  685. #define DEFAULT_CONFIG_AsyncDebugging (true)
  686. #define DEFAULT_CONFIG_TraceAsyncDebugCalls (false)
  687. #define DEFAULT_CONFIG_ForcePostLowerGlobOptInstrString (false)
  688. #define DEFAULT_CONFIG_EnumerateSpecialPropertiesInDebugger (true)
  689. #define DEFAULT_CONFIG_MaxJITFunctionBytecodeByteLength (4800000)
  690. #define DEFAULT_CONFIG_MaxJITFunctionBytecodeCount (120000)
  691. #define DEFAULT_CONFIG_JitQueueThreshold (6)
  692. #define DEFAULT_CONFIG_FullJitRequeueThreshold (25) // Minimum number of times a function needs to be executed before it is re-added to the jit queue
  693. #define DEFAULT_CONFIG_MinTemplatizedJitRunCount (100) // Minimum number of times a function needs to be interpreted before it is jitted
  694. #define DEFAULT_CONFIG_MinAsmJsInterpreterRunCount (10) // Minimum number of times a function needs to be Asm interpreted before it is jitted
  695. #define DEFAULT_CONFIG_MinTemplatizedJitLoopRunCount (500) // Minimum number of times a function needs to be interpreted before it is jitted
  696. #define DEFAULT_CONFIG_MaxTemplatizedJitRunCount (-1) // Maximum number of times a function can be TJ before it is jitted
  697. #define DEFAULT_CONFIG_MaxAsmJsInterpreterRunCount (-1) // Maximum number of times a function can be Asm interpreted before it is jitted
  698. // Note: The following defaults only apply when the NewSimpleJit is on. The defaults for when it's off are computed in
  699. // ConfigFlagsTable::TranslateFlagConfiguration.
  700. #define DEFAULT_CONFIG_AutoProfilingInterpreter0Limit (12)
  701. #define DEFAULT_CONFIG_ProfilingInterpreter0Limit (4)
  702. #define DEFAULT_CONFIG_AutoProfilingInterpreter1Limit (0)
  703. #define DEFAULT_CONFIG_SimpleJitLimit (132)
  704. #define DEFAULT_CONFIG_ProfilingInterpreter1Limit (12)
  705. // These are used to compute the above defaults for when NewSimpleJit is off
  706. #define DEFAULT_CONFIG_AutoProfilingInterpreterLimit_OldSimpleJit (80)
  707. #define DEFAULT_CONFIG_SimpleJitLimit_OldSimpleJit (25)
  708. #define DEFAULT_CONFIG_MinProfileIterations (16)
  709. #define DEFAULT_CONFIG_MinProfileIterations_OldSimpleJit (25)
  710. #define DEFAULT_CONFIG_MinSimpleJitIterations (16)
  711. #define DEFAULT_CONFIG_NewSimpleJit (false)
  712. #define DEFAULT_CONFIG_MaxLinearIntCaseCount (3) // Maximum number of cases (in switch statement) for which instructions can be generated linearly.
  713. #define DEFAULT_CONFIG_MaxSingleCharStrJumpTableRatio (2) // Maximum single char string jump table size as multiples of the actual case arm
  714. #define DEFAULT_CONFIG_MaxSingleCharStrJumpTableSize (128) // Maximum single char string jump table size
  715. #define DEFAULT_CONFIG_MinSwitchJumpTableSize (9) // Minimum number of case target entries in the jump table(this may also include values that are missing in the consecutive set of integer case arms)
  716. #define DEFAULT_CONFIG_SwitchOptHolesThreshold (50) // Maximum percentage of holes (missing case values in a switch statement) with which a jump table can be created
  717. #define DEFAULT_CONFIG_MaxLinearStringCaseCount (4) // Maximum number of String cases (in switch statement) for which instructions can be generated linearly.
  718. #define DEFAULT_CONFIG_MinDeferredFuncTokenCount (20) // Minimum size in tokens of a defer-parsed function
  719. #if DBG
  720. #define DEFAULT_CONFIG_SkipFuncCountForBailOnNoProfile (0) //Initial Number of functions in a func body to be skipped from forcibly inserting BailOnNoProfile.
  721. #endif
  722. #define DEFAULT_CONFIG_BailOnNoProfileLimit 200 // The limit of bailout on no profile info before triggering a rejit
  723. #define DEFAULT_CONFIG_BailOnNoProfileRejitLimit (50) // The limit of bailout on no profile info before disable all the no profile bailouts
  724. #define DEFAULT_CONFIG_CallsToBailoutsRatioForRejit 10 // Ratio of function calls to bailouts above which a rejit is considered
  725. #define DEFAULT_CONFIG_LoopIterationsToBailoutsRatioForRejit 50 // Ratio of loop iteration count to bailouts above which a rejit of the loop body is considered
  726. #define DEFAULT_CONFIG_MinBailOutsBeforeRejit 2 // Minimum number of bailouts for a single bailout record after which a rejit is considered
  727. #define DEFAULT_CONFIG_MinBailOutsBeforeRejitForLoops 2 // Minimum number of bailouts for a single bailout record after which a rejit is considered
  728. #define DEFAULT_CONFIG_RejitMaxBailOutCount 500 // Maximum number of bailouts for a single bailout record after which rejit is forced.
  729. #if DBG
  730. #define DEFAULT_CONFIG_ValidateIntRanges (false)
  731. #endif
  732. #define DEFAULT_CONFIG_Sse (-1)
  733. #define DEFAULT_CONFIG_DeletedPropertyReuseThreshold (32)
  734. #define DEFAULT_CONFIG_BigDictionaryTypeHandlerThreshold (0xffff)
  735. #define DEFAULT_CONFIG_ForceStringKeyedSimpleDictionaryTypeHandler (false)
  736. #define DEFAULT_CONFIG_TypeSnapshotEnumeration (true)
  737. #define DEFAULT_CONFIG_ConcurrentRuntime (false)
  738. #define DEFAULT_CONFIG_PrimeRecycler (false)
  739. #if defined(_WIN32)
  740. #define DEFAULT_CONFIG_PrivateHeap (true)
  741. #else // defined(_WIN32)
  742. // Don't use PrivateHeap on xplat where we statically link and override new/delete
  743. #define DEFAULT_CONFIG_PrivateHeap (false)
  744. #endif // defined(_WIN32)
  745. #define DEFAULT_CONFIG_DisableRentalThreading (false)
  746. #define DEFAULT_CONFIG_DisableDebugObject (false)
  747. #define DEFAULT_CONFIG_DumpHeap (false)
  748. #define DEFAULT_CONFIG_PerfHintLevel (1)
  749. #define DEFAULT_CONFIG_OOPJITMissingOpts (false)
  750. #define DEFAULT_CONFIG_OOPCFGRegistration (true)
  751. #define DEFAULT_CONFIG_CrashOnOOPJITFailure (false)
  752. #define DEFAULT_CONFIG_ForceJITCFGCheck (false)
  753. #define DEFAULT_CONFIG_UseJITTrampoline (true)
  754. #define DEFAULT_CONFIG_IsolatePrototypes (true)
  755. #define DEFAULT_CONFIG_ChangeTypeOnProto (true)
  756. #define DEFAULT_CONFIG_FixPropsOnPathTypes (true)
  757. #define DEFAULT_CONFIG_BailoutTraceFilter (-1)
  758. #define DEFAULT_CONFIG_TempMin (0)
  759. #define DEFAULT_CONFIG_TempMax (INT_MAX)
  760. #define DEFAULT_CONFIG_LibraryStackFrame (true)
  761. #define DEFAULT_CONFIG_LibraryStackFrameDebugger (false)
  762. #define DEFAULT_CONFIG_FuncObjectInlineCacheThreshold (2) // Maximum number of inline caches a function body may have to allow for inline caches to be allocated on the function object.
  763. #define DEFAULT_CONFIG_ShareInlineCaches (false)
  764. #define DEFAULT_CONFIG_InlineCacheInvalidationListCompactionThreshold (4)
  765. #define DEFAULT_CONFIG_ConstructorCacheInvalidationThreshold (500)
  766. #define DEFAULT_CONFIG_InMemoryTrace (false)
  767. #define DEFAULT_CONFIG_InMemoryTraceBufferSize (1024)
  768. #define DEFAULT_CONFIG_RichTraceFormat (false)
  769. #define DEFAULT_CONFIG_TraceWithStack (false)
  770. #define DEFAULT_CONFIG_InjectPartiallyInitializedInterpreterFrameError (0)
  771. #define DEFAULT_CONFIG_InjectPartiallyInitializedInterpreterFrameErrorType (0)
  772. #define DEFAULT_CONFIG_DeferLoadingAvailableSource (false)
  773. #define DEFAULT_CONFIG_RecyclerForceMarkInterior (false)
  774. #define DEFAULT_CONFIG_MemProtectHeap (false)
  775. #define DEFAULT_CONFIG_InduceCodeGenFailure (30) // When -InduceCodeGenFailure is passed in, 30% of JIT allocations will fail
  776. #define DEFAULT_CONFIG_SkipSplitWhenResultIgnored (false)
  777. #define DEFAULT_CONFIG_MinMemOpCount (16U)
  778. #if ENABLE_COPYONACCESS_ARRAY
  779. #define DEFAULT_CONFIG_MaxCopyOnAccessArrayLength (32U)
  780. #define DEFAULT_CONFIG_MinCopyOnAccessArrayLength (5U)
  781. #define DEFAULT_CONFIG_CopyOnAccessArraySegmentCacheSize (16U)
  782. #endif
  783. #if defined(_M_IX86) || defined(_M_X64)
  784. #define DEFAULT_CONFIG_LoopAlignNopLimit (6)
  785. #endif
  786. #if defined(_M_IX86) || defined(_M_X64)
  787. #define DEFAULT_CONFIG_ZeroMemoryWithNonTemporalStore (true)
  788. #endif
  789. #define DEFAULT_CONFIG_StrictWriteBarrierCheck (false)
  790. #define DEFAULT_CONFIG_KeepRecyclerTrackData (false)
  791. #define DEFAULT_CONFIG_EnableBGFreeZero (true)
  792. #if !GLOBAL_ENABLE_WRITE_BARRIER
  793. #define DEFAULT_CONFIG_ForceSoftwareWriteBarrier (false)
  794. #else
  795. #define DEFAULT_CONFIG_ForceSoftwareWriteBarrier (true)
  796. #endif
  797. #define DEFAULT_CONFIG_WriteBarrierTest (false)
  798. #define DEFAULT_CONFIG_VerifyBarrierBit (false)
  799. #define TraceLevel_Error (1)
  800. #define TraceLevel_Warning (2)
  801. #define TraceLevel_Info (3)
  802. #define TEMP_ENABLE_FLAG_FOR_APPX_BETA_ONLY 1
  803. #define INMEMORY_CACHE_MAX_URL (5) // This is the max number of URLs that the in-memory profile cache can hold.
  804. #define INMEMORY_CACHE_MAX_PROFILE_MANAGER (50) // This is the max number of dynamic scripts that the in-memory profile cache can have
  805. #ifdef SUPPORT_INTRUSIVE_TESTTRACES
  806. #define INTRUSIVE_TESTTRACE_PolymorphicInlineCache (1)
  807. #endif
  808. //
  809. //FLAG(type, name, description, defaultValue)
  810. //
  811. // types:
  812. // String
  813. // Phases
  814. // Number
  815. // Boolean
  816. //
  817. // If the default value is not required it should be left empty
  818. // For Phases, there is no default value. it should always be empty
  819. // Default values for stings must be prefixed with 'L'. See AsmDumpMode
  820. // Scroll till the extreme right to see the default values
  821. #if defined(FLAG) || defined(FLAG_EXPERIMENTAL) || defined(FLAG_REGOVR_EXP)
  822. #ifndef FLAG
  823. #define FLAG(...)
  824. #endif
  825. #ifndef FLAG_EXPERIMENTAL
  826. #define FLAG_EXPERIMENTAL FLAG
  827. #endif
  828. #ifndef FLAG_REGOVR_EXP
  829. #define FLAG_REGOVR_EXP FLAG_EXPERIMENTAL
  830. #endif
  831. // NON-RELEASE FLAGS
  832. #ifdef ENABLE_DEBUG_CONFIG_OPTIONS
  833. // Regular FLAG
  834. #define FLAGNR(Type, Name, String, Default) FLAG(Type, Name, String, Default, NoParent, FALSE)
  835. // Regular flag with acronym
  836. #ifndef FLAGNRA
  837. #define FLAGNRA(Type, Name, Acronym, String, Default) \
  838. FLAGNR(Type, Name, String, Default) \
  839. FLAGNR(Type, Acronym, String, Default)
  840. #endif
  841. // Child FLAG with PARENT FLAG
  842. #define FLAGPNR(Type, ParentName, Name, String, Default) FLAG(Type, Name, String, Default, ParentName, FALSE)
  843. // Regular FLAG with callback function
  844. #define FLAGNRC(Type, Name, String, Default) FLAG(Type, Name, String, Default, NoParent, TRUE)
  845. #else
  846. #define FLAGNR(Type, Name, String, Default)
  847. #ifdef FLAGNRA
  848. #undef FLAGNRA
  849. #endif
  850. #define FLAGNRA(Type, Name, Acronym, String, Default)
  851. #define FLAGPNR(Type, ParentName, Name, String, Default)
  852. #define FLAGNRC(Type, Name, String, Default)
  853. #endif
  854. // RELEASE FLAGS
  855. #define FLAGPR(Type, ParentName, Name, String, Default) FLAG(Type, Name, String, Default, ParentName, FALSE)
  856. #define FLAGR(Type, Name, String, Default) FLAG(Type, Name, String, Default, NoParent, FALSE)
  857. // Release flags with parent and acronym
  858. #ifndef FLAGPRA
  859. #define FLAGPRA(Type, ParentName, Name, Acronym, String, Default) \
  860. FLAG_REGOVR_EXP(Type, Name, String, Default, ParentName, FALSE) \
  861. FLAGNR(Type, Acronym, String, Default)
  862. #endif
  863. // RELEASE Flags enabled by Edge experimental flag
  864. #define FLAGPR_EXPERIMENTAL_WASM(Type, Name, String) FLAG_EXPERIMENTAL(Type, Name, String, true, WasmExperimental, FALSE)
  865. // RELEASE FLAGS WITH REGISTRY OVERRIDE AND EDGE
  866. #define FLAGPR_REGOVR_EXP(Type, ParentName, Name, String, Default) FLAG_REGOVR_EXP(Type, Name, String, Default, ParentName, FALSE)
  867. // Release flag with non-release acronym
  868. #ifndef FLAGRA
  869. #define FLAGRA(Type, Name, Acronym, String, Default) \
  870. FLAGR(Type, Name, String, Default) \
  871. FLAGNR(Type, Acronym, String, Default)
  872. #endif
  873. // Please keep this list alphabetically sorted
  874. #if DBG
  875. FLAGNR(Boolean, ArrayValidate , "Validate each array for valid elements (default: false)", false)
  876. FLAGNR(Boolean, MemOpMissingValueValidate, "Validate Missing Value Tracking on memset/memcopy", false)
  877. FLAGNR(Boolean, OOPJITFixupValidate, "Validate that all entries in fixup list are allocated as NativeCodeData and that all NativeCodeData gets fixed up", false)
  878. #endif
  879. #ifdef ARENA_MEMORY_VERIFY
  880. FLAGNR(Boolean, ArenaNoFreeList , "Do not free list in arena", false)
  881. FLAGNR(Boolean, ArenaNoPageReuse , "Do not reuse page in arena", false)
  882. FLAGNR(Boolean, ArenaUseHeapAlloc , "Arena use heap to allocate memory instead of page allocator", false)
  883. #endif
  884. FLAGNR(Boolean, ValidateInlineStack, "Does a stack walk on helper calls to validate inline stack is correctly restored", false)
  885. FLAGNR(Boolean, AsmDiff , "Dump the IR without memory locations and varying parameters.", false)
  886. FLAGNR(String, AsmDumpMode , "Dump the final assembly to a file without memory locations and varying parameters\n\t\t\t\t\tThe 'filename' is the file where the assembly will be dumped. Dump to console if no file is specified", nullptr)
  887. FLAGNR(Boolean, AsmJs , "Enable Asmjs", DEFAULT_CONFIG_AsmJs)
  888. FLAGNR(Boolean, AsmJsStopOnError , "Stop execution on any AsmJs validation errors", DEFAULT_CONFIG_AsmJsStopOnError)
  889. FLAGNR(Boolean, AsmJsEdge , "Enable asm.js features which may have backward incompatible changes or not validate on old demos", DEFAULT_CONFIG_AsmJsEdge)
  890. FLAGNR(Boolean, Wasm , "Enable WebAssembly", DEFAULT_CONFIG_Wasm)
  891. FLAGNR(Boolean, WasmI64 , "Enable Int64 testing for WebAssembly. ArgIns can be [number,string,{low:number,high:number}]. Return values will be {low:number,high:number}", DEFAULT_CONFIG_WasmI64)
  892. FLAGNR(Boolean, WasmFastArray , "Enable fast array implementation for WebAssembly", DEFAULT_CONFIG_WasmFastArray)
  893. FLAGNR(Boolean, WasmSharedArrayVirtualBuffer, "Use Virtual allocation for WebAssemblySharedArrayBuffer (Windows only)", DEFAULT_CONFIG_WasmSharedArrayVirtualBuffer)
  894. FLAGNR(Boolean, WasmMathExFilter , "Enable Math exception filter for WebAssembly", DEFAULT_CONFIG_WasmMathExFilter)
  895. FLAGNR(Boolean, WasmCheckVersion , "Check the binary version for WebAssembly", DEFAULT_CONFIG_WasmCheckVersion)
  896. FLAGNR(Boolean, WasmAssignModuleID , "Assign an individual ID for WebAssembly module", DEFAULT_CONFIG_WasmAssignModuleID)
  897. FLAGNR(Boolean, WasmIgnoreLimits , "Ignore the WebAssembly binary limits ", DEFAULT_CONFIG_WasmIgnoreLimits)
  898. FLAGNR(Boolean, WasmFold , "Enable i32/i64 const folding", DEFAULT_CONFIG_WasmFold)
  899. FLAGNR(Boolean, WasmIgnoreResponse , "Ignore the type of the Response object", DEFAULT_CONFIG_WasmIgnoreResponse)
  900. FLAGNR(Number, WasmMaxTableSize , "Maximum size allowed to the WebAssembly.Table", DEFAULT_CONFIG_WasmMaxTableSize)
  901. FLAGNR(Boolean, WasmThreads , "Enable WebAssembly threads feature", DEFAULT_CONFIG_WasmThreads)
  902. FLAGNR(Boolean, WasmMultiValue , "Use new WebAssembly multi-value", DEFAULT_CONFIG_WasmMultiValue)
  903. FLAGNR(Boolean, WasmSignExtends , "Use new WebAssembly sign extension operators", DEFAULT_CONFIG_WasmSignExtends)
  904. FLAGNR(Boolean, WasmNontrapping, "Enable non-trapping float-to-int conversions in WebAssembly", DEFAULT_CONFIG_WasmNontrapping)
  905. // WebAssembly Experimental Features
  906. // Master WasmExperimental flag to activate WebAssembly experimental features
  907. FLAGR(Boolean, WasmExperimental, "Enable WebAssembly experimental features", DEFAULT_CONFIG_WasmExperimental)
  908. // The default value of the experimental features will be off because the parent is off
  909. // Turning on the parent causes the child flag to take on their default value (aka on)
  910. // In Edge, we manually turn on the individual child flags
  911. // Not having the DEFAULT_CONFIG_XXXX macro ensures we use CONFIG_FLAG_RELEASE instead of CONFIG_FLAG
  912. FLAGPR_EXPERIMENTAL_WASM(Boolean, WasmSimd , "Enable SIMD in WebAssembly")
  913. FLAGNR(Boolean, AssertBreak , "Debug break on assert", false)
  914. FLAGNR(Boolean, AssertPopUp , "Pop up asserts (default: false)", false)
  915. FLAGNR(Boolean, AssertIgnore , "Ignores asserts if set", false)
  916. FLAGNR(Boolean, AsyncDebugging, "Enable async debugging feature (default: false)", DEFAULT_CONFIG_AsyncDebugging)
  917. FLAGNR(Number, BailOnNoProfileLimit, "The limit of bailout on no profile info before triggering a rejit", DEFAULT_CONFIG_BailOnNoProfileLimit)
  918. FLAGNR(Number, BailOnNoProfileRejitLimit, "The limit of bailout on no profile info before we disable the bailouts", DEFAULT_CONFIG_BailOnNoProfileRejitLimit)
  919. FLAGNR(Boolean, BaselineMode , "Dump only stable content that can be used for baseline comparison", false)
  920. FLAGNR(String, DumpOnCrash , "generate heap dump on asserts or unhandled exception if set", nullptr)
  921. FLAGNR(String, FullMemoryDump , "Will perform a full memory dump when -DumpOnCrash is supplied.", nullptr)
  922. #ifdef BAILOUT_INJECTION
  923. FLAGR (NumberPairSet, BailOut , "Source location to insert BailOut", )
  924. FLAGNR(Boolean, BailOutAtEveryLine , "Inserts BailOut at every line of source (default: false)", false)
  925. FLAGNR(Boolean, BailOutAtEveryByteCode, "Inserts BailOut at every Byte code (default: false)", false)
  926. FLAGNR(Boolean, BailOutAtEveryImplicitCall, "Force generating implicit call bailout even when we don't need it", false)
  927. FLAGR (NumberSet, BailOutByteCode , "Byte code location to insert BailOut. Use with -prejit only", )
  928. #endif
  929. FLAGNR(Boolean, Benchmark , "Disable security code which introduce variability in benchmarks", false)
  930. FLAGR (Boolean, BgJit , "Background JIT. Disable to force heuristic-based foreground JITting. (default: true)", true)
  931. FLAGR (Boolean, BgParse , "Background Parse. Disable to force all parsing to occur on UI thread. (default: true)", DEFAULT_CONFIG_BgParse)
  932. FLAGNR(Number, BgJitDelay , "Delay to wait for speculative jitting before starting script execution", DEFAULT_CONFIG_BgJitDelay)
  933. FLAGNR(Number, BgJitDelayFgBuffer , "When speculatively jitting in the foreground thread, do so for (BgJitDelay - BgJitDelayBuffer) milliseconds", DEFAULT_CONFIG_BgJitDelayFgBuffer)
  934. FLAGNR(Number, BgJitPendingFuncCap , "Disable delay if pending function count larger then cap", DEFAULT_CONFIG_BgJitPendingFuncCap)
  935. FLAGNR(Boolean, CreateFunctionProxy , "Create function proxies instead of full function bodies", DEFAULT_CONFIG_CreateFunctionProxy)
  936. FLAGNR(Boolean, HybridFgJit , "When background JIT is enabled, enable jitting in the foreground based on heuristics. This flag is only effective when OptimizeForManyInstances is disabled (UI threads).", DEFAULT_CONFIG_HybridFgJit)
  937. FLAGNR(Number, HybridFgJitBgQueueLengthThreshold, "The background job queue length must exceed this threshold to consider jitting in the foreground", DEFAULT_CONFIG_HybridFgJitBgQueueLengthThreshold)
  938. FLAGNR(Boolean, BytecodeHist , "Provide a histogram of the bytecodes run by the script. (NoNative required).", false)
  939. FLAGNR(Boolean, CurrentSourceInfo , "Enable IASD get current script source info", DEFAULT_CONFIG_CurrentSourceInfo)
  940. FLAGNR(Boolean, CFGLog , "Log CFG checks", false)
  941. FLAGNR(Boolean, CheckAlignment , "Insert checks in the native code to verify 8-byte alignment of stack", false)
  942. FLAGNR(Boolean, CheckEmitBufferPermissions, "Check JIT code buffers at commit and decommit time to ensure no PAGE_EXECUTE_READWRITE pages.", false)
  943. #ifdef CHECK_MEMORY_LEAK
  944. FLAGR (Boolean, CheckMemoryLeak , "Check for heap memory leak", false)
  945. FLAGR (String, DumpOnLeak , "Create a dump on failed memory leak check", nullptr)
  946. #endif
  947. FLAGNR(Boolean, CheckOpHelpers , "Verify opHelper labels in the JIT are set properly", false)
  948. FLAGNR(Boolean, CloneInlinedPolymorphicCaches, "Clones polymorphic inline caches in inlined functions", DEFAULT_CONFIG_CloneInlinedPolymorphicCaches)
  949. FLAGNR(Boolean, ConcurrentRuntime , "Enable Concurrent GC and background JIT when creating runtime", DEFAULT_CONFIG_ConcurrentRuntime)
  950. #if CONFIG_CONSOLE_AVAILABLE
  951. FLAGNR(Boolean, Console , "Create console window in GUI app", false)
  952. FLAGNR(Boolean, ConsoleExitPause , "Pause on exit when a console window is created in GUI app", false)
  953. #endif
  954. FLAGNR(Number, ConstructorInlineThreshold , "Maximum size in bytecodes of a constructor inline candidate with monomorphic field access", DEFAULT_CONFIG_ConstructorInlineThreshold)
  955. FLAGNR(Number, ConstructorCallsRequiredToFinalizeCachedType, "Number of calls to a constructor required before the type cached in the constructor cache is finalized", DEFAULT_CONFIG_ConstructorCallsRequiredToFinalizeCachedType)
  956. FLAGNR(Number, PropertyCacheMissPenalty, "Number of string or symbol cache hits per miss needed to be worth using cache", DEFAULT_CONFIG_PropertyCacheMissPenalty)
  957. FLAGNR(Number, PropertyCacheMissThreshold, "Point at which we disable string or symbol property cache", DEFAULT_CONFIG_PropertyCacheMissThreshold)
  958. FLAGNR(Number, PropertyCacheMissReset, "Point at which we try to start using string or symbol cache after giving up", DEFAULT_CONFIG_PropertyCacheMissReset)
  959. #ifdef SECURITY_TESTING
  960. FLAGNR(Boolean, CrashOnException , "Removes the top-level exception handler, allowing jc.exe to crash on an unhandled exception. No effect on IE. (default: false)", false)
  961. #endif
  962. FLAGNR(Boolean, Debug , "Disable phases (layout, security code, etc) which makes JIT output harder to debug", false)
  963. FLAGNR(NumberSet, DebugBreak , "Index of the function where you want to break", )
  964. FLAGNR(NumberTrioSet, StatementDebugBreak, "Index of the statement where you want to break", )
  965. FLAGNR(Phases, DebugBreakOnPhaseBegin, "Break into debugger at the beginning of given phase for listed function", )
  966. FLAGNR(Boolean, DebugWindow , "Send console output to debugger window", false)
  967. FLAGNR(Boolean, ParserStateCache , "Enable creation of parser state cache", DEFAULT_CONFIG_ParserStateCache)
  968. FLAGNR(Boolean, CompressParserStateCache, "Enable compression of the parser state cache", DEFAULT_CONFIG_CompressParserStateCache)
  969. FLAGNR(Boolean, DeferTopLevelTillFirstCall , "Enable tracking of deferred top level functions in a script file, until the first function of the script context is parsed.", DEFAULT_CONFIG_DeferTopLevelTillFirstCall)
  970. FLAGNR(Number, DeferParse , "Minimum size of defer-parsed script (non-zero only: use /nodeferparse do disable", 0)
  971. FLAGNR(Boolean, DirectCallTelemetryStats, "Enables logging stats for direct call telemetry", DEFAULT_CONFIG_DirectCallTelemetryStats)
  972. FLAGNR(Boolean, DisableArrayBTree , "Disable creation of BTree for Arrays", false)
  973. FLAGNR(Boolean, DisableRentalThreading, "Disable rental threading when creating runtime", DEFAULT_CONFIG_DisableRentalThreading)
  974. FLAGNR(Boolean, DisableVTuneSourceLineInfo, "Disable VTune Source line info for Dynamic JITted code", false)
  975. FLAGNR(Boolean, DisplayMemStats, "Display memory usage statistics", false)
  976. FLAGNR(Phases, Dump , "What All to dump", )
  977. #ifdef DUMP_FRAGMENTATION_STATS
  978. FLAGR (Boolean, DumpFragmentationStats, "Dump bucket state after every GC", false)
  979. #endif
  980. FLAGNR(Boolean, DumpIRAddresses, "Print addresses in IR dumps", false)
  981. FLAGNR(Boolean, DumpLineNoInColor, "Print the source code in high intensity color for better readability", false)
  982. #ifdef RECYCLER_DUMP_OBJECT_GRAPH
  983. FLAGR (Boolean, DumpObjectGraphOnExit , "Dump object graph on recycler destructor", false)
  984. FLAGR (Boolean, DumpObjectGraphOnCollect, "Dump object graph on recycler destructor", false)
  985. #endif
  986. FLAGNR(Boolean, DumpEvalStringOnRemoval, "Dumps an eval string when its being removed from the eval map", false)
  987. FLAGNR(Boolean, DumpObjectGraphOnEnum, "Dump object graph on recycler heap enumeration", false)
  988. #ifdef DYNAMIC_PROFILE_STORAGE
  989. FLAGNRA(String, DynamicProfileCache , Dpc, "File to cache dynamic profile information", nullptr)
  990. FLAGNR(String, DynamicProfileCacheDir, "Directory to cache dynamic profile information", nullptr)
  991. FLAGNRA(String, DynamicProfileInput , Dpi, "Read only file containing dynamic profile information", nullptr)
  992. #endif
  993. #ifdef EDIT_AND_CONTINUE
  994. FLAGNR(Boolean, EditTest , "Enable edit and continue test tools", false)
  995. #endif
  996. FLAGNR(Boolean, WininetProfileCache, "Use the WININET cache to save the profile information", DEFAULT_CONFIG_WininetProfileCache)
  997. FLAGNR(Boolean, NoDynamicProfileInMemoryCache, "Enable in-memory cache for dynamic sources", false)
  998. FLAGNR(Boolean, ProfileBasedSpeculativeJit, "Enable dynamic profile based speculative JIT", DEFAULT_CONFIG_ProfileBasedSpeculativeJit)
  999. FLAGNR(Number, ProfileBasedSpeculationCap, "In the presence of dynamic profile speculative JIT is capped to this many bytecode instructions", DEFAULT_CONFIG_ProfileBasedSpeculationCap)
  1000. #ifdef DYNAMIC_PROFILE_MUTATOR
  1001. FLAGNR(String, DynamicProfileMutatorDll , "Path of the mutator DLL", _u("DynamicProfileMutatorImpl.dll"))
  1002. FLAGNR(String, DynamicProfileMutator , "Type of local, temp, return, param, loop implicit flag and implicit flag. \n\t\t\t\t\ti.e local=LikelyArray_NoMissingValues_NonInts_NonFloats;temp=Int8Array;param=LikelyNumber;return=LikelyString;loopimplicitflag=ImplicitCall_ToPrimitive;implicitflag=ImplicitCall_None\n\t\t\t\t\tor pass DynamicProfileMutator:random\n\t\t\t\t\tSee DynamicProfileInfo.h for enum values", nullptr)
  1003. #endif
  1004. FLAGNR(Boolean, ExecuteByteCodeBufferReturnsInvalidByteCode, "Serialized byte code execution always returns SCRIPT_E_INVALID_BYTECODE", false)
  1005. FLAGR(Number, ExpirableCollectionGCCount, "Number of GCs during which Expirable object profiling occurs", DEFAULT_CONFIG_ExpirableCollectionGCCount)
  1006. FLAGR (Number, ExpirableCollectionTriggerThreshold, "Threshold at which Expirable Object Collection is triggered (In Percentage)", DEFAULT_CONFIG_ExpirableCollectionTriggerThreshold)
  1007. FLAGR(Boolean, SkipSplitOnNoResult, "If the result of Regex split isn't used, skip executing the regex. (Perf optimization)", DEFAULT_CONFIG_SkipSplitWhenResultIgnored)
  1008. #ifdef TEST_ETW_EVENTS
  1009. FLAGNR(String, TestEtwDll , "Path of the TestEtwEventSink DLL", nullptr)
  1010. #endif
  1011. #ifdef ENABLE_TEST_HOOKS
  1012. FLAGNR(Boolean, Force32BitByteCode, "Force CC to generate 32bit bytecode intended only for regenerating bytecode headers.", false)
  1013. #endif
  1014. FLAGNR(Boolean, CollectGarbage , "Enable CollectGarbage API", DEFAULT_CONFIG_CollectGarbage)
  1015. FLAGR (Boolean, Intl , "Intl object support", DEFAULT_CONFIG_Intl)
  1016. FLAGNR(Boolean, IntlBuiltIns , "Intl built-in function support", DEFAULT_CONFIG_IntlBuiltIns)
  1017. FLAGNR(Boolean, IntlPlatform , "Make the internal Intl native helper object visible to user code", DEFAULT_CONFIG_IntlPlatform)
  1018. FLAGNR(Boolean, JsBuiltIn , "JS Built-in function support", DEFAULT_CONFIG_JsBuiltIn)
  1019. FLAGNR(Boolean, JitRepro , "Add Function.invokeJit to execute codegen on an encoded rpc buffer", DEFAULT_CONFIG_JitRepro)
  1020. FLAGNR(Boolean, EntryPointInfoRpcData , "Keep encoded rpc buffer for jitted function on EntryPointInfo until cleanup", DEFAULT_CONFIG_EntryPointInfoRpcData)
  1021. FLAGNR(Boolean, LdChakraLib , "Access to the Chakra internal library with the __chakraLibrary keyword", DEFAULT_CONFIG_LdChakraLib)
  1022. FLAGNR(Boolean, TestChakraLib , "Access to the Chakra internal library with the __chakraLibrary keyword without global access restriction", DEFAULT_CONFIG_TestChakraLib)
  1023. // ES6 (BLUE+1) features/flags
  1024. // Master ES6 flag to enable STABLE ES6 features/flags
  1025. FLAGR(Boolean, ES6 , "Enable ES6 stable features", DEFAULT_CONFIG_ES6)
  1026. // Master ES6 flag to enable ALL sub ES6 features/flags
  1027. FLAGNRC(Boolean, ES6All , "Enable all ES6 features, both stable and unstable", DEFAULT_CONFIG_ES6All)
  1028. // Master ES6 flag to enable Threshold ES6 features/flags
  1029. FLAGNRC(Boolean, ES6Experimental , "Enable all experimental features", DEFAULT_CONFIG_ES6All)
  1030. // Per ES6 feature/flag
  1031. FLAGPR (Boolean, ES6, ES7AsyncAwait , "Enable ES7 'async' and 'await' keywords" , DEFAULT_CONFIG_ES7AsyncAwait)
  1032. FLAGPR (Boolean, ES6, ES6DateParseFix , "Enable ES6 Date.parse fixes" , DEFAULT_CONFIG_ES6DateParseFix)
  1033. FLAGPR (Boolean, ES6, ES6FunctionNameFull , "Enable ES6 Full function.name" , DEFAULT_CONFIG_ES6FunctionNameFull)
  1034. FLAGPR (Boolean, ES6, ES6Generators , "Enable ES6 generators" , DEFAULT_CONFIG_ES6Generators)
  1035. FLAGPR (Boolean, ES6, ES7ExponentiationOperator, "Enable ES7 exponentiation operator (**)" , DEFAULT_CONFIG_ES7ExponentionOperator)
  1036. FLAGPR (Boolean, ES6, ES7ValuesEntries , "Enable ES7 Object.values and Object.entries" , DEFAULT_CONFIG_ES7ValuesEntries)
  1037. FLAGPR (Boolean, ES6, ES7TrailingComma , "Enable ES7 trailing comma in function" , DEFAULT_CONFIG_ES7TrailingComma)
  1038. FLAGPR (Boolean, ES6, ES6IsConcatSpreadable , "Enable ES6 isConcatSpreadable Symbol" , DEFAULT_CONFIG_ES6IsConcatSpreadable)
  1039. FLAGPR (Boolean, ES6, ES6Math , "Enable ES6 Math extensions" , DEFAULT_CONFIG_ES6Math)
  1040. #ifndef COMPILE_DISABLE_ESDynamicImport
  1041. #define COMPILE_DISABLE_ESDynamicImport 0
  1042. #endif
  1043. FLAGPR_REGOVR_EXP(Boolean, ES6, ESDynamicImport , "Enable dynamic import" , DEFAULT_CONFIG_ESDynamicImport)
  1044. FLAGPR (Boolean, ES6, ES6Module , "Enable ES6 Modules" , DEFAULT_CONFIG_ES6Module)
  1045. FLAGPR (Boolean, ES6, ES6Object , "Enable ES6 Object extensions" , DEFAULT_CONFIG_ES6Object)
  1046. FLAGPR (Boolean, ES6, ES6Number , "Enable ES6 Number extensions" , DEFAULT_CONFIG_ES6Number)
  1047. FLAGPR (Boolean, ES6, ES6ObjectLiterals , "Enable ES6 Object literal extensions" , DEFAULT_CONFIG_ES6ObjectLiterals)
  1048. FLAGPR (Boolean, ES6, ES6Proxy , "Enable ES6 Proxy feature" , DEFAULT_CONFIG_ES6Proxy)
  1049. FLAGPR (Boolean, ES6, ES6Rest , "Enable ES6 Rest parameters" , DEFAULT_CONFIG_ES6Rest)
  1050. FLAGPR (Boolean, ES6, ES6Spread , "Enable ES6 Spread support" , DEFAULT_CONFIG_ES6Spread)
  1051. FLAGPR (Boolean, ES6, ES6String , "Enable ES6 String extensions" , DEFAULT_CONFIG_ES6String)
  1052. FLAGPR (Boolean, ES6, ES6StringPrototypeFixes, "Enable ES6 String.prototype fixes" , DEFAULT_CONFIG_ES6StringPrototypeFixes)
  1053. FLAGPR (Boolean, ES6, ES2018ObjectRestSpread , "Enable ES2018 Object Rest/Spread" , DEFAULT_CONFIG_ES2018ObjectRestSpread)
  1054. FLAGPR (Boolean, ES6, ES6PrototypeChain , "Enable ES6 prototypes (Example: Date prototype is object)", DEFAULT_CONFIG_ES6PrototypeChain)
  1055. FLAGPR (Boolean, ES6, ES6ToPrimitive , "Enable ES6 ToPrimitive symbol" , DEFAULT_CONFIG_ES6ToPrimitive)
  1056. FLAGPR (Boolean, ES6, ES6ToLength , "Enable ES6 ToLength fixes" , DEFAULT_CONFIG_ES6ToLength)
  1057. FLAGPR (Boolean, ES6, ES6ToStringTag , "Enable ES6 ToStringTag symbol" , DEFAULT_CONFIG_ES6ToStringTag)
  1058. FLAGPR (Boolean, ES6, ES6Unicode , "Enable ES6 Unicode 6.0 extensions" , DEFAULT_CONFIG_ES6Unicode)
  1059. FLAGPR (Boolean, ES6, ES6UnicodeVerbose , "Enable ES6 Unicode 6.0 verbose failure output" , DEFAULT_CONFIG_ES6UnicodeVerbose)
  1060. FLAGPR (Boolean, ES6, ES6Unscopables , "Enable ES6 With Statement Unscopables" , DEFAULT_CONFIG_ES6Unscopables)
  1061. FLAGPR (Boolean, ES6, ES6RegExSticky , "Enable ES6 RegEx sticky flag" , DEFAULT_CONFIG_ES6RegExSticky)
  1062. FLAGPR (Boolean, ES6, ES2018RegExDotAll , "Enable ES2018 RegEx dotAll flag" , DEFAULT_CONFIG_ES2018RegExDotAll)
  1063. FLAGPR (Boolean, ES6, ESExportNsAs , "Enable ES experimental export * as name" , DEFAULT_CONFIG_ESExportNsAs)
  1064. FLAGPR (Boolean, ES6, ES2018AsyncIteration , "Enable ES2018 Async Iteration" , DEFAULT_CONFIG_ES2018AsyncIteration)
  1065. FLAGPR (Boolean, ES6, ESTopLevelAwait , "Enable Top Level Await in modules" , DEFAULT_CONFIG_ESTopLevelAwait)
  1066. #ifndef COMPILE_DISABLE_ES6RegExPrototypeProperties
  1067. #define COMPILE_DISABLE_ES6RegExPrototypeProperties 0
  1068. #endif
  1069. FLAGPR_REGOVR_EXP(Boolean, ES6, ES6RegExPrototypeProperties, "Enable ES6 properties on the RegEx prototype" , DEFAULT_CONFIG_ES6RegExPrototypeProperties)
  1070. #ifndef COMPILE_DISABLE_ES6RegExSymbols
  1071. #define COMPILE_DISABLE_ES6RegExSymbols 0
  1072. #endif
  1073. // When we enable ES6RegExSymbols check all String and Regex built-ins which are inlined in JIT and make sure the helper
  1074. // sets implicit call flag before calling into script
  1075. // Also, the corresponding helpers in JnHelperMethodList.h should be marked as being reentrant
  1076. FLAGPR_REGOVR_EXP(Boolean, ES6, ES6RegExSymbols , "Enable ES6 RegExp symbols" , DEFAULT_CONFIG_ES6RegExSymbols)
  1077. FLAGPR (Boolean, ES6, ES6HasInstance , "Enable ES6 @@hasInstance symbol" , DEFAULT_CONFIG_ES6HasInstance)
  1078. FLAGPR (Boolean, ES6, ES6Verbose , "Enable ES6 verbose trace" , DEFAULT_CONFIG_ES6Verbose)
  1079. FLAGPR (Boolean, ES6, ESObjectGetOwnPropertyDescriptors, "Enable Object.getOwnPropertyDescriptors" , DEFAULT_CONFIG_ESObjectGetOwnPropertyDescriptors)
  1080. #ifndef COMPILE_DISABLE_ESSharedArrayBuffer
  1081. #define COMPILE_DISABLE_ESSharedArrayBuffer 0
  1082. #endif
  1083. FLAGPR_REGOVR_EXP(Boolean, ES6, ESSharedArrayBuffer , "Enable SharedArrayBuffer" , DEFAULT_CONFIG_ESSharedArrayBuffer)
  1084. // Newer language feature flags
  1085. // ES BigInt flag
  1086. FLAGR(Boolean, ESBigInt, "Enable ESBigInt flag", DEFAULT_CONFIG_ESBigInt)
  1087. // ES Numeric Separator support for numeric constants
  1088. FLAGR(Boolean, ESNumericSeparator, "Enable Numeric Separator flag", DEFAULT_CONFIG_ESNumericSeparator)
  1089. // ES Nullish coalescing operator support (??)
  1090. FLAGR(Boolean, ESNullishCoalescingOperator, "Enable nullish coalescing operator", DEFAULT_CONFIG_ESNullishCoalescingOperator)
  1091. // ES Hashbang support for interpreter directive syntax
  1092. FLAGR(Boolean, ESHashbang, "Enable Hashbang syntax", DEFAULT_CONFIG_ESHashbang)
  1093. // ES Symbol.prototype.description flag
  1094. FLAGR(Boolean, ESSymbolDescription, "Enable Symbol.prototype.description", DEFAULT_CONFIG_ESSymbolDescription)
  1095. FLAGR(Boolean, ESArrayFindFromLast, "Enable findLast, findLastIndex for Array.prototype and TypedArray.prorotype", DEFAULT_CONFIG_ESArrayFindFromLast)
  1096. // ES Promise.any and AggregateError flag
  1097. FLAGR(Boolean, ESPromiseAny, "Enable Promise.any and AggregateError", DEFAULT_CONFIG_ESPromiseAny)
  1098. // ES import.meta keyword meta-property
  1099. FLAGR(Boolean, ESImportMeta, "Enable import.meta keyword", DEFAULT_CONFIG_ESImportMeta)
  1100. //ES globalThis flag
  1101. FLAGR(Boolean, ESGlobalThis, "Enable globalThis", DEFAULT_CONFIG_ESGlobalThis)
  1102. // This flag to be removed once JITing generator functions is stable
  1103. FLAGNR(Boolean, JitES6Generators , "Enable JITing of ES6 generators", DEFAULT_CONFIG_JitES6Generators)
  1104. FLAGNR(Boolean, FastLineColumnCalculation, "Enable fast calculation of line/column numbers from the source.", DEFAULT_CONFIG_FastLineColumnCalculation)
  1105. FLAGR (String, Filename , "Jscript source file", nullptr)
  1106. FLAGNR(Boolean, FreeRejittedCode , "Free rejitted code", true)
  1107. FLAGNR(Boolean, ForceGuardPages , "Force the addition of guard pages", false)
  1108. FLAGNR(Boolean, PrintGuardPageBounds , "Prints the bounds of a guard page", false)
  1109. FLAGNR(Boolean, ForceLegacyEngine , "Force a jscript9 dll load", false)
  1110. FLAGNR(Phases, Force , "Force certain phase to run ignoring heuristics", )
  1111. FLAGNR(Phases, Stress , "Stress certain phases by making them kick in even if they normally would not.", )
  1112. FLAGNR(Boolean, ForceArrayBTree , "Force enable creation of BTree for Arrays", false)
  1113. FLAGNR(Boolean, StrongArraySort , "Add secondary comparisons to the default array sort comparator to disambiguate sorts of equal-toString'd objects.", DEFAULT_CONFIG_StrongArraySort)
  1114. FLAGNR(Boolean, ForceCleanPropertyOnCollect, "Force cleaning of property on collection", DEFAULT_CONFIG_ForceCleanPropertyOnCollect)
  1115. FLAGNR(Boolean, ForceCleanCacheOnCollect, "Force cleaning of dynamic caches on collection", DEFAULT_CONFIG_ForceCleanCacheOnCollect)
  1116. FLAGNR(Boolean, ForceGCAfterJSONParse, "Force GC to happen after JSON parsing", DEFAULT_CONFIG_ForceGCAfterJSONParse)
  1117. FLAGNR(Boolean, ForceDecommitOnCollect, "Force decommit collect", DEFAULT_CONFIG_ForceDecommitOnCollect)
  1118. FLAGNR(Boolean, ForceDeferParse , "Defer parsing of all function bodies", DEFAULT_CONFIG_ForceDeferParse)
  1119. FLAGNR(Boolean, ForceDiagnosticsMode , "Enable diagnostics mode and debug interpreter loop", false)
  1120. FLAGNR(Boolean, ForceGetWriteWatchOOM , "Force GetWriteWatch to go into OOM codepath in HeapBlockMap rescan", false)
  1121. FLAGNR(Boolean, ForcePostLowerGlobOptInstrString, "Force tracking of globopt instr string post lower", DEFAULT_CONFIG_ForcePostLowerGlobOptInstrString)
  1122. FLAGNR(Boolean, ForceSplitScope , "All functions will have unmerged body and param scopes", DEFAULT_CONFIG_ForceSplitScope)
  1123. FLAGNR(Boolean, EnumerateSpecialPropertiesInDebugger, "Enable enumeration of special debug properties", DEFAULT_CONFIG_EnumerateSpecialPropertiesInDebugger)
  1124. FLAGNR(Boolean, EnableContinueAfterExceptionWrappersForHelpers, "Enable wrapper over helper methods in debugger, Fast F12 only", DEFAULT_CONFIG_EnableContinueAfterExceptionWrappersForHelpers)
  1125. FLAGNR(Boolean, EnableContinueAfterExceptionWrappersForBuiltIns, "Enable wrapper over library calls in debugger, Fast F12 only", DEFAULT_CONFIG_EnableContinueAfterExceptionWrappersForBuiltIns)
  1126. FLAGNR(Boolean, EnableFunctionSourceReportForHeapEnum, "During HeapEnum, whether to report function source info (url/row/col)", DEFAULT_CONFIG_EnableFunctionSourceReportForHeapEnum)
  1127. FLAGNR(Number, ForceFragmentAddressSpace , "Fragment the address space", 128 * 1024 * 1024)
  1128. FLAGNR(Number, ForceOOMOnEBCommit, "Force CommitBuffer to return OOM", 0)
  1129. FLAGR (Boolean, ForceDynamicProfile , "Force to always generate profiling byte code", DEFAULT_CONFIG_ForceDynamicProfile)
  1130. FLAGNR(Boolean, ForceES5Array , "Force using ES5Array", DEFAULT_CONFIG_ForceES5Array)
  1131. FLAGNR(Boolean, ForceAsmJsLinkFail , "Force asm.js link time validation to fail", DEFAULT_CONFIG_ForceAsmJsLinkFail)
  1132. FLAGNR(Boolean, ForceExpireOnNonCacheCollect, "Allow expiration collect outside of cache collection cleanups", DEFAULT_CONFIG_ForceExpireOnNonCacheCollect)
  1133. FLAGNR(Boolean, ForceFastPath , "Force fast-paths in native codegen", DEFAULT_CONFIG_ForceFastPath)
  1134. FLAGNR(Boolean, ForceFloatPref , "Force float preferencing (JIT only)", false)
  1135. FLAGNR(Boolean, ForceJITLoopBody , "Force jit loop body only", DEFAULT_CONFIG_ForceJITLoopBody)
  1136. FLAGNR(Boolean, ForceStaticInterpreterThunk, "Force using static interpreter thunk", DEFAULT_CONFIG_ForceStaticInterpreterThunk)
  1137. FLAGNR(Boolean, DumpCommentsFromReferencedFiles, "Allow printing comments of comment-table of the referenced file as well (use with -trace:CommentTable)", DEFAULT_CONFIG_DumpCommentsFromReferencedFiles)
  1138. FLAGNR(Number, DelayFullJITSmallFunc , "Scale Full JIT threshold for small functions which are going to be inlined soon. To provide fraction scale, the final scale is scale following this option divided by 10", DEFAULT_CONFIG_DelayFullJITSmallFunc)
  1139. FLAGNR(Boolean, EnableFatalErrorOnOOM, "Enabling failfast fatal error on OOM", DEFAULT_CONFIG_EnableFatalErrorOnOOM)
  1140. #if defined(_M_ARM32_OR_ARM64)
  1141. FLAGNR(Boolean, ForceLocalsPtr , "Force use of alternative locals pointer (JIT only)", false)
  1142. #endif
  1143. FLAGNR(Boolean, DeferLoadingAvailableSource, "Treat available source code as a dummy defer-mappable object to go through that code path.", DEFAULT_CONFIG_DeferLoadingAvailableSource)
  1144. FLAGR (Boolean, ForceNative , "Force JIT everything that is called before running it, ignoring limits", false)
  1145. FLAGNR(Boolean, ForceSerialized , "Always serialize and deserialize byte codes before execution", DEFAULT_CONFIG_ForceSerialized)
  1146. FLAGNR(Number, ForceSerializedBytecodeMajorVersion, "Force the byte code serializer to write this major version number", 0)
  1147. FLAGNR(Number, ForceSerializedBytecodeVersionSchema, "Force the byte code serializer to write this kind of version. Decimal 10 is engineering, 20 is release mode, and 0 means use the default setting.", 0)
  1148. FLAGNR(Boolean, ForceStrictMode, "Force strict mode checks on all functions", false)
  1149. FLAGNR(Boolean, ForceUndoDefer , "Defer parsing of all function bodies, but undo deferral", false)
  1150. FLAGNR(Boolean, ForceBlockingConcurrentCollect, "Force doing in-thread GC on concurrent thread- this will skip doing concurrent collect", false)
  1151. FLAGNR(Boolean, FreTestDiagMode, "Enabled collection of diagnostic information on fretest builds", false)
  1152. #ifdef BYTECODE_TESTING
  1153. FLAGNR(Number, ByteCodeBranchLimit, "Short branch limit before we use the branch island", 128)
  1154. FLAGNR(Boolean, MediumByteCodeLayout , "Always use medium layout for bytecodes", false)
  1155. FLAGNR(Boolean, LargeByteCodeLayout , "Always use large layout for bytecodes", false)
  1156. #endif
  1157. #ifdef FAULT_INJECTION
  1158. FLAGNR(Number, FaultInjection , "FaultInjectMode - 0 (count only), 1 (count equal), 2 (count at or above), 3 (stackhashing)",-1)
  1159. FLAGNR(Number, FaultInjectionCount , "Injects an out of memory at the specified allocation", -1)
  1160. FLAGNR(String, FaultInjectionType , "FaultType (flag values) - 1 (Throw), 2 (NoThrow), 4 (MarkThrow), 8 (MarkNoThrow), FFFFFFFF (All)", nullptr)
  1161. FLAGNR(String, FaultInjectionFilter , "A string to restrict the fault injection, the string can be like ArenaAllocator name", nullptr)
  1162. FLAGNR(Number, FaultInjectionAllocSize, "Do fault injection only this size", -1)
  1163. FLAGNR(String, FaultInjectionStackFile , "Stacks to match, default: stack.txt in current directory", _u("stack.txt"))
  1164. FLAGNR(Number, FaultInjectionStackLineCount , "Count of lines in the stack file used for matching", -1)
  1165. FLAGNR(String, FaultInjectionStackHash, "Match stacks hash on Chakra frames to inject the fault, hex string", _u("0"))
  1166. FLAGNR(Number, FaultInjectionScriptContextToTerminateCount, "Script context# COUNT % (Number of script contexts) to terminate", 1)
  1167. #endif
  1168. FLAGNR(Number, InduceCodeGenFailure, "Probability of a codegen job failing.", DEFAULT_CONFIG_InduceCodeGenFailure)
  1169. FLAGNR(Number, InduceCodeGenFailureSeed, "Seed used while calculating codegen failure probability", 0)
  1170. FLAGNR(Number, InjectPartiallyInitializedInterpreterFrameError, "The number of interpreter stack frame (with 1 being bottom-most) to inject error before the frame is initialized.", DEFAULT_CONFIG_InjectPartiallyInitializedInterpreterFrameError)
  1171. FLAGNR(Number, InjectPartiallyInitializedInterpreterFrameErrorType, "Type of error to inject: 0 - debug break, 1 - exception.", DEFAULT_CONFIG_InjectPartiallyInitializedInterpreterFrameErrorType)
  1172. FLAGNR(Boolean, GenerateByteCodeBufferReturnsCantGenerate, "Serialized byte code generation always returns SCRIPT_E_CANT_GENERATE", false)
  1173. FLAGNR(Number, GoptCleanupThreshold, "Number of instructions seen before we cleanup the value table", DEFAULT_CONFIG_GoptCleanupThreshold)
  1174. FLAGNR(Number, AsmGoptCleanupThreshold, "Number of instructions seen before we cleanup the value table", DEFAULT_CONFIG_AsmGoptCleanupThreshold)
  1175. FLAGNR(Boolean, HighPrecisionDate, "Enable sub-millisecond resolution in Javascript Date for benchmark timing", DEFAULT_CONFIG_HighPrecisionDate)
  1176. FLAGNR(Number, InlineCountMax , "Maximum count in bytecodes to inline in a given function", DEFAULT_CONFIG_InlineCountMax)
  1177. FLAGNRA(Number, InlineCountMaxInLoopBodies, icminlb, "Maximum count in bytecodes to inline in a given function", DEFAULT_CONFIG_InlineCountMaxInLoopBodies)
  1178. FLAGNRA(Number, InlineInLoopBodyScaleDownFactor, iilbsdf, "Maximum depth of a recursive inline call", DEFAULT_CONFIG_InlineInLoopBodyScaleDownFactor)
  1179. FLAGNR(Number, InlineThreshold , "Maximum size in bytecodes of an inline candidate", DEFAULT_CONFIG_InlineThreshold)
  1180. FLAGNR(Number, AggressiveInlineCountMax, "Maximum count in bytecodes to inline in a given function", DEFAULT_CONFIG_AggressiveInlineCountMax)
  1181. FLAGNR(Number, AggressiveInlineThreshold, "Maximum size in bytecodes of an inline candidate for aggressive inlining", DEFAULT_CONFIG_AggressiveInlineThreshold)
  1182. FLAGNR(Number, InlineThresholdAdjustCountInLargeFunction , "Adjustment in the maximum size in bytecodes of an inline candidate in a large function", DEFAULT_CONFIG_InlineThresholdAdjustCountInLargeFunction)
  1183. FLAGNR(Number, InlineThresholdAdjustCountInMediumSizedFunction , "Adjustment in the maximum size in bytecodes of an inline candidate in a medium sized function", DEFAULT_CONFIG_InlineThresholdAdjustCountInMediumSizedFunction)
  1184. FLAGNR(Number, InlineThresholdAdjustCountInSmallFunction , "Adjustment in the maximum size in bytecodes of an inline candidate in a small function", DEFAULT_CONFIG_InlineThresholdAdjustCountInSmallFunction)
  1185. FLAGNR(Number, AsmJsInlineAdjust , "Adjustment in the maximum size in bytecodes of an inline candidate for wasm function", DEFAULT_CONFIG_AsmJsInlineAdjust)
  1186. FLAGNR(String, Interpret , "List of functions to interpret", nullptr)
  1187. FLAGNR(Phases, Instrument , "Instrument the generated code from the given phase", )
  1188. FLAGNR(Number, JitQueueThreshold , "Max number of work items/script context in the jit queue", DEFAULT_CONFIG_JitQueueThreshold)
  1189. #ifdef LEAK_REPORT
  1190. FLAGNR(String, LeakReport , "File name for the leak report", nullptr)
  1191. #endif
  1192. FLAGNR(Number, LoopInlineThreshold , "Maximum size in bytecodes of an inline candidate with loops or not enough profile data", DEFAULT_CONFIG_LoopInlineThreshold)
  1193. FLAGNR(Number, LeafInlineThreshold , "Maximum size in bytecodes of an inline candidate with loops or not enough profile data", DEFAULT_CONFIG_LeafInlineThreshold)
  1194. FLAGNR(Number, ConstantArgumentInlineThreshold, "Maximum size in bytecodes of an inline candidate with constant argument and the argument being used for a branch", DEFAULT_CONFIG_ConstantArgumentInlineThreshold)
  1195. FLAGNR(Number, RecursiveInlineThreshold, "Maximum size in bytecodes of an inline candidate to inline recursively", DEFAULT_CONFIG_RecursiveInlineThreshold)
  1196. FLAGNR(Number, RecursiveInlineDepthMax, "Maximum depth of a recursive inline call", DEFAULT_CONFIG_RecursiveInlineDepthMax)
  1197. FLAGNR(Number, RecursiveInlineDepthMin, "Maximum depth of a recursive inline call", DEFAULT_CONFIG_RecursiveInlineDepthMin)
  1198. FLAGNR(Number, RedeferralCap, "Number of compilations beyond which we stop redeferring a function", DEFAULT_CONFIG_RedeferralCap)
  1199. FLAGNR(Number, Loop , "Number of times to execute the script (useful for profiling short benchmarks and finding leaks)", DEFAULT_CONFIG_Loop)
  1200. FLAGRA(Number, LoopInterpretCount , lic, "Number of times loop has to be interpreted before JIT Loop body", DEFAULT_CONFIG_LoopInterpretCount)
  1201. FLAGNR(Number, LoopProfileIterations , "Number of iterations of a loop that must be profiled before jitting the loop body", DEFAULT_CONFIG_LoopProfileIterations)
  1202. FLAGNR(Number, OutsideLoopInlineThreshold , "Maximum size in bytecodes of an inline candidate outside a loop in inliner", DEFAULT_CONFIG_OutsideLoopInlineThreshold)
  1203. FLAGNR(Number, MaxFuncInlineDepth , "Number of times to allow inlining a function recursively, plus one (min: 1, max: 255)", DEFAULT_CONFIG_MaxFuncInlineDepth)
  1204. FLAGNR(Number, MaxNumberOfInlineesWithLoop, "Number of times to allow inlinees with a loop in a top function", DEFAULT_CONFIG_MaxNumberOfInlineesWithLoop)
  1205. #ifdef MEMSPECT_TRACKING
  1206. FLAGNR(Phases, Memspect, "Enables memspect tracking to perform memory investigations.", )
  1207. #endif
  1208. FLAGNR(Number, PolymorphicInlineThreshold , "Maximum size in bytecodes of a polymorphic inline candidate", DEFAULT_CONFIG_PolymorphicInlineThreshold)
  1209. FLAGNR(Boolean, PrimeRecycler , "Prime the recycler first", DEFAULT_CONFIG_PrimeRecycler)
  1210. FLAGNR(Boolean, PrivateHeap , "Use HeapAlloc with a private heap", DEFAULT_CONFIG_PrivateHeap)
  1211. FLAGNR(Boolean, TraceEngineRefcount , "Output traces for ScriptEngine AddRef/Release to debug lifetime management", false)
  1212. #if defined(CHECK_MEMORY_LEAK) || defined(LEAK_REPORT)
  1213. FLAGNR(Boolean, LeakStackTrace , "Include stack trace on leaked pinned object and heap objects", false)
  1214. FLAGNR(Boolean, ForceMemoryLeak , "Fake leak some memory to test leak report and check memory leak", false)
  1215. #endif
  1216. FLAGNR(Boolean, DumpAfterFinalGC, "Collect a process dump after calling finalgc", false)
  1217. FLAGNR(Boolean, ForceOldDateAPI , "Force Chakra to use old dates API regardless of availability of a new one", DEFAULT_CONFIG_ForceOldDateAPI)
  1218. FLAGNR(Number, JitLoopBodyHotLoopThreshold , "Number of times loop has to be iterated in jitloopbody before it is determined as hot", DEFAULT_CONFIG_JitLoopBodyHotLoopThreshold)
  1219. FLAGNR(Number, LoopBodySizeThresholdToDisableOpts, "Minimum bytecode size of a loop body, above which we might consider switching off optimizations in jit loop body to avoid rejits", DEFAULT_CONFIG_LoopBodySizeThresholdToDisableOpts)
  1220. FLAGNR(Number, MaxJitThreadCount , "Number of maximum allowed parallel jit threads (actual number is factor of number of processors and other heuristics)", DEFAULT_CONFIG_MaxJitThreadCount)
  1221. FLAGNR(Boolean, ForceMaxJitThreadCount, "Force the number of parallel jit threads as specified by MaxJitThreadCount flag (creation guaranteed)", DEFAULT_CONFIG_ForceMaxJitThreadCount)
  1222. FLAGR(Boolean, MitigateSpectre, "Use mitigations for Spectre", DEFAULT_CONFIG_MitigateSpectre)
  1223. FLAGPR(Boolean, MitigateSpectre, AddMaskingBlocks, "Optimize Spectre mitigations by masking on loop out edges", DEFAULT_CONFIG_AddMaskingBlocks)
  1224. FLAGPR(Boolean, MitigateSpectre, PoisonVarArrayLoad, "Poison loads from Var arrays", DEFAULT_CONFIG_PoisonVarArrayLoad)
  1225. FLAGPR(Boolean, MitigateSpectre, PoisonIntArrayLoad, "Poison loads from Int arrays", DEFAULT_CONFIG_PoisonIntArrayLoad)
  1226. FLAGPR(Boolean, MitigateSpectre, PoisonFloatArrayLoad, "Poison loads from Float arrays", DEFAULT_CONFIG_PoisonFloatArrayLoad)
  1227. FLAGPR(Boolean, MitigateSpectre, PoisonTypedArrayLoad, "Poison loads from TypedArrays", DEFAULT_CONFIG_PoisonTypedArrayLoad)
  1228. FLAGPR(Boolean, MitigateSpectre, PoisonStringLoad, "Poison indexed loads from strings", DEFAULT_CONFIG_PoisonStringLoad)
  1229. FLAGPR(Boolean, MitigateSpectre, PoisonObjectsForLoads, "Poison objects after type checks for loads", DEFAULT_CONFIG_PoisonObjectsForLoads)
  1230. FLAGPR(Boolean, MitigateSpectre, PoisonVarArrayStore, "Poison stores to Var arrays", DEFAULT_CONFIG_PoisonVarArrayStore)
  1231. FLAGPR(Boolean, MitigateSpectre, PoisonIntArrayStore, "Poison stores to Int arrays", DEFAULT_CONFIG_PoisonIntArrayStore)
  1232. FLAGPR(Boolean, MitigateSpectre, PoisonFloatArrayStore, "Poison stores to Float arrays", DEFAULT_CONFIG_PoisonFloatArrayStore)
  1233. FLAGPR(Boolean, MitigateSpectre, PoisonTypedArrayStore, "Poison stores to TypedArrays", DEFAULT_CONFIG_PoisonTypedArrayStore)
  1234. FLAGPR(Boolean, MitigateSpectre, PoisonStringStore, "Poison indexed stores to strings", DEFAULT_CONFIG_PoisonStringStore)
  1235. FLAGPR(Boolean, MitigateSpectre, PoisonObjectsForStores, "Poison objects after type checks for stores", DEFAULT_CONFIG_PoisonObjectsForStores)
  1236. FLAGNR(Number, MinInterpretCount , "Minimum number of times a function must be interpreted", 0)
  1237. FLAGNR(Number, MinSimpleJitRunCount , "Minimum number of times a function must be run in simple jit", 0)
  1238. FLAGNRA(Number, MaxInterpretCount , Mic, "Maximum number of times a function can be interpreted", 0)
  1239. FLAGNRA(Number, MaxSimpleJitRunCount , Msjrc, "Maximum number of times a function will be run in SimpleJitted code", 0)
  1240. FLAGNRA(Number, MinMemOpCount , Mmoc, "Minimum count of a loop to activate MemOp", DEFAULT_CONFIG_MinMemOpCount)
  1241. #if ENABLE_COPYONACCESS_ARRAY
  1242. FLAGNR(Number, MaxCopyOnAccessArrayLength, "Maximum length of copy-on-access array", DEFAULT_CONFIG_MaxCopyOnAccessArrayLength)
  1243. FLAGNR(Number, MinCopyOnAccessArrayLength, "Minimum length of copy-on-access array", DEFAULT_CONFIG_MinCopyOnAccessArrayLength)
  1244. FLAGNR(Number, CopyOnAccessArraySegmentCacheSize, "Size of copy-on-access array segment cache (1-32)", DEFAULT_CONFIG_CopyOnAccessArraySegmentCacheSize)
  1245. #endif
  1246. FLAGNR(Number, MinTemplatizedJitRunCount, "Minimum number of times a function must be Templatized Jitted", DEFAULT_CONFIG_MinTemplatizedJitRunCount)
  1247. FLAGNR(Number, MinAsmJsInterpreterRunCount, "Minimum number of times a function must be Asm Interpreted", DEFAULT_CONFIG_MinAsmJsInterpreterRunCount)
  1248. FLAGNR(Number, MinTemplatizedJitLoopRunCount, "Minimum LoopCount run of the Templatized Jit function to run FullJited", DEFAULT_CONFIG_MinTemplatizedJitLoopRunCount)
  1249. FLAGNRA(Number, MaxTemplatizedJitRunCount, Mtjrc, "Maximum number of times a function must be templatized jit", DEFAULT_CONFIG_MaxTemplatizedJitRunCount)
  1250. FLAGNRA(Number, MaxAsmJsInterpreterRunCount, Maic, "Maximum number of times a function must be interpreted in asmjs", DEFAULT_CONFIG_MaxAsmJsInterpreterRunCount)
  1251. FLAGR (Number, AutoProfilingInterpreter0Limit, "Limit after which to transition to the next execution mode", DEFAULT_CONFIG_AutoProfilingInterpreter0Limit)
  1252. FLAGR (Number, ProfilingInterpreter0Limit, "Limit after which to transition to the next execution mode", DEFAULT_CONFIG_ProfilingInterpreter0Limit)
  1253. FLAGR (Number, AutoProfilingInterpreter1Limit, "Limit after which to transition to the next execution mode", DEFAULT_CONFIG_AutoProfilingInterpreter1Limit)
  1254. FLAGR (Number, SimpleJitLimit, "Limit after which to transition to the next execution mode", DEFAULT_CONFIG_SimpleJitLimit)
  1255. FLAGR (Number, ProfilingInterpreter1Limit, "Limit after which to transition to the next execution mode", DEFAULT_CONFIG_ProfilingInterpreter1Limit)
  1256. FLAGNRA(String, ExecutionModeLimits, Eml, "Execution mode limits in th form: AutoProfilingInterpreter0.ProfilingInterpreter0.AutoProfilingInterpreter1.SimpleJit.ProfilingInterpreter1 - Example: -ExecutionModeLimits:12.4.0.132.12", _u(""))
  1257. FLAGRA(Boolean, EnforceExecutionModeLimits, Eeml, "Enforces the execution mode limits such that they are never exceeded.", false)
  1258. FLAGNRA(Number, SimpleJitAfter , Sja, "Number of calls to a function after which to simple-JIT the function", 0)
  1259. FLAGNRA(Number, FullJitAfter , Fja, "Number of calls to a function after which to full-JIT the function. The function will be profiled for every iteration.", 0)
  1260. FLAGNR(Boolean, NewSimpleJit , "Uses the new simple JIT", DEFAULT_CONFIG_NewSimpleJit)
  1261. FLAGNR(Number, MaxLinearIntCaseCount , "Maximum number of cases(in switch statement) for which instructions can be generated linearly",DEFAULT_CONFIG_MaxLinearIntCaseCount)
  1262. FLAGNR(Number, MaxSingleCharStrJumpTableSize, "Maximum single char string jump table size", DEFAULT_CONFIG_MaxSingleCharStrJumpTableSize)
  1263. FLAGNR(Number, MaxSingleCharStrJumpTableRatio, "Maximum single char string jump table size as multiples of the actual case arm", DEFAULT_CONFIG_MaxSingleCharStrJumpTableRatio)
  1264. FLAGNR(Number, MinSwitchJumpTableSize , "Minimum size of the jump table, that is created for consecutive integer case arms in a Switch Statement",DEFAULT_CONFIG_MinSwitchJumpTableSize)
  1265. FLAGNR(Number, MaxLinearStringCaseCount, "Maximum number of string cases(in switch statement) for which instructions can be generated linearly",DEFAULT_CONFIG_MaxLinearStringCaseCount)
  1266. FLAGR(Number, MinDeferredFuncTokenCount, "Minimum length in tokens of defer-parsed function", DEFAULT_CONFIG_MinDeferredFuncTokenCount)
  1267. #if DBG
  1268. FLAGNR(Number, SkipFuncCountForBailOnNoProfile, "Initial Number of functions in a func body to be skipped from forcibly inserting BailOnNoProfile.", DEFAULT_CONFIG_SkipFuncCountForBailOnNoProfile)
  1269. #endif
  1270. FLAGNR(Number, MaxJITFunctionBytecodeByteLength, "The biggest function we'll JIT (bytecode bytelength)", DEFAULT_CONFIG_MaxJITFunctionBytecodeByteLength)
  1271. FLAGNR(Number, MaxJITFunctionBytecodeCount, "The biggest function we'll JIT (bytecode count)", DEFAULT_CONFIG_MaxJITFunctionBytecodeCount)
  1272. FLAGNR(Number, MaxLoopsPerFunction , "Maximum number of loops in any function in the script", DEFAULT_CONFIG_MaxLoopsPerFunction)
  1273. FLAGNR(Number, FuncObjectInlineCacheThreshold , "Maximum number of inline caches a function body may have to allow for inline caches to be allocated on the function object", DEFAULT_CONFIG_FuncObjectInlineCacheThreshold)
  1274. FLAGNR(Boolean, NoDeferParse , "Disable deferred parsing", false)
  1275. FLAGNR(Boolean, NoLogo , "No logo, which we don't display anyways", false)
  1276. FLAGNR(Boolean, OOPJITMissingOpts , "Use optimizations that are missing from OOP JIT", DEFAULT_CONFIG_OOPJITMissingOpts)
  1277. FLAGNR(Boolean, CrashOnOOPJITFailure , "Crash runtime process if JIT process crashes", DEFAULT_CONFIG_CrashOnOOPJITFailure)
  1278. FLAGNR(Boolean, OOPCFGRegistration , "Do CFG registration OOP (under OOP JIT)", DEFAULT_CONFIG_OOPCFGRegistration)
  1279. FLAGNR(Boolean, ForceJITCFGCheck , "Have JIT code always do CFG check even if range check succeeded", DEFAULT_CONFIG_ForceJITCFGCheck)
  1280. FLAGNR(Boolean, UseJITTrampoline , "Use trampoline for JIT entry points and emit range checks for it", DEFAULT_CONFIG_UseJITTrampoline)
  1281. FLAGR (Boolean, NoNative , "Disable native codegen", false)
  1282. FLAGNR(Number, NopFrequency , "Frequency of NOPs inserted by NOP insertion phase. A NOP is guaranteed to be inserted within a range of (1<<n) instrs (default=8)", DEFAULT_CONFIG_NopFrequency)
  1283. FLAGNR(Boolean, NoStrictMode , "Disable strict mode checks on all functions", false)
  1284. FLAGNR(Boolean, NormalizeStats , "When dumping stats, do some normalization (used with -instrument:linearscan)", false)
  1285. FLAGNR(Phases, Off , "Turn off specific phases or feature.(Might not work for all phases)", )
  1286. FLAGNR(Phases, OffProfiledByteCode , "Turn off specific byte code for phases or feature.(Might not work for all phases)", )
  1287. FLAGNR(Phases, On , "Turn on specific phases or feature.(Might not work for all phases)", )
  1288. FLAGNR(String, OutputFile , "Log the output to a specified file. Default: output.log in the working directory.", _u("output.log"))
  1289. FLAGNR(String, OutputFileOpenMode , "File open mode for OutputFile. Default: wt, specify 'at' for append", _u("wt"))
  1290. #ifdef ENABLE_TRACE
  1291. FLAGNR(Boolean, InMemoryTrace , "Enable in-memory trace (investigate crash using trace in dump file). Use !jd.dumptrace to print it.", DEFAULT_CONFIG_InMemoryTrace)
  1292. FLAGNR(Number, InMemoryTraceBufferSize, "The size of circular buffer for in-memory trace (the units used is: number of trace calls). ", DEFAULT_CONFIG_InMemoryTraceBufferSize)
  1293. #if CONFIG_RICH_TRACE_FORMAT
  1294. FLAGNR(Boolean, RichTraceFormat, "Whether to use extra data in Output/Trace header.", DEFAULT_CONFIG_RichTraceFormat)
  1295. #endif
  1296. #ifdef STACK_BACK_TRACE
  1297. FLAGNR(Boolean, TraceWithStack, "Whether the trace need to include stack trace (for each trace entry).", DEFAULT_CONFIG_TraceWithStack)
  1298. #endif // STACK_BACK_TRACE
  1299. #endif // ENABLE_TRACE
  1300. FLAGNR(Boolean, PrintRunTimeDataCollectionTrace, "Print traces needed for runtime data collection", false)
  1301. #ifdef ENABLE_PREJIT
  1302. FLAGR (Boolean, Prejit , "Prejit everything, including things that are not called, ignoring limits (default: false)", DEFAULT_CONFIG_Prejit)
  1303. #endif
  1304. FLAGNR(Boolean, PrintSrcInDump , "Print the lineno and the source code in the intermediate dumps", true)
  1305. #if PROFILE_DICTIONARY
  1306. FLAGNR(Number, ProfileDictionary , "Profile dictionary usage. Only dictionaries with max depth of <number> or above are displayed (0=no filter).", -1)
  1307. #endif
  1308. #ifdef PROFILE_EXEC
  1309. FLAGNR(Phases, Profile , "Profile the given phase", )
  1310. FLAGNR(Number, ProfileThreshold , "A phase is displayed in the profiler report only if its contribution is more than this threshold", 0)
  1311. #endif
  1312. #ifdef PROFILE_OBJECT_LITERALS
  1313. FLAGNR(Boolean, ProfileObjectLiteral , "Profile Object literal usage", false)
  1314. #endif
  1315. #ifdef PROFILE_MEM
  1316. FLAGNR(String, ProfileMemory , "Profile memory usage", )
  1317. #endif
  1318. #ifdef PROFILE_STRINGS
  1319. FLAGNR(Boolean, ProfileStrings , "Profile string statistics", false)
  1320. #endif
  1321. #ifdef PROFILE_TYPES
  1322. FLAGNR(Boolean, ProfileTypes , "Profile type statistics", false)
  1323. #endif
  1324. #ifdef PROFILE_EVALMAP
  1325. FLAGNR(Boolean, ProfileEvalMap , "Profile eval map statistics", false)
  1326. #endif
  1327. #ifdef PROFILE_BAILOUT_RECORD_MEMORY
  1328. FLAGNR(Boolean, ProfileBailOutRecordMemory, "Profile bailout record memory statistics", false)
  1329. #endif
  1330. #if DBG
  1331. FLAGNR(Boolean, ValidateIntRanges, "Validate at runtime int ranges/bounds determined by the globopt", DEFAULT_CONFIG_ValidateIntRanges)
  1332. #endif
  1333. FLAGNR(Number, RejitMaxBailOutCount, "Maximum number of bailouts for a bailout record after which rejit is forced", DEFAULT_CONFIG_RejitMaxBailOutCount)
  1334. FLAGNR(Number, CallsToBailoutsRatioForRejit, "Ratio of function calls to bailouts above which a rejit is considered", DEFAULT_CONFIG_CallsToBailoutsRatioForRejit)
  1335. FLAGNR(Number, LoopIterationsToBailoutsRatioForRejit, "Ratio of loop iteration count to bailouts above which a rejit of the loop body is considered", DEFAULT_CONFIG_LoopIterationsToBailoutsRatioForRejit)
  1336. FLAGNR(Number, MinBailOutsBeforeRejit, "Minimum number of bailouts for a single bailout record after which a rejit is considered", DEFAULT_CONFIG_MinBailOutsBeforeRejit)
  1337. FLAGNR(Number, MinBailOutsBeforeRejitForLoops, "Minimum number of bailouts for a single bailout record after which a rejit is considered", DEFAULT_CONFIG_MinBailOutsBeforeRejitForLoops)
  1338. FLAGNR(Boolean, LibraryStackFrame , "Display library stack frame", DEFAULT_CONFIG_LibraryStackFrame)
  1339. FLAGNR(Boolean, LibraryStackFrameDebugger , "Assume debugger support for library stack frame", DEFAULT_CONFIG_LibraryStackFrameDebugger)
  1340. #ifdef RECYCLER_STRESS
  1341. FLAGNR(Boolean, RecyclerStress , "Stress the recycler by collect on every allocation call", false)
  1342. #if ENABLE_CONCURRENT_GC
  1343. FLAGNR(Boolean, RecyclerBackgroundStress , "Stress the recycler by collect in the background thread on every allocation call", false)
  1344. FLAGNR(Boolean, RecyclerConcurrentStress , "Stress the concurrent recycler by concurrent collect on every allocation call", false)
  1345. FLAGNR(Boolean, RecyclerConcurrentRepeatStress , "Stress the concurrent recycler by concurrent collect on every allocation call and repeat mark and rescan in the background thread", false)
  1346. #endif
  1347. #if ENABLE_PARTIAL_GC
  1348. FLAGNR(Boolean, RecyclerPartialStress , "Stress the partial recycler by partial collect on every allocation call", false)
  1349. #endif
  1350. FLAGNR(Boolean, RecyclerTrackStress, "Stress tracked object handling by simulating tracked objects for regular allocations", false)
  1351. FLAGNR(Boolean, RecyclerInduceFalsePositives, "Stress recycler by forcing false positive object marks", false)
  1352. #endif // RECYCLER_STRESS
  1353. FLAGNR(Boolean, RecyclerForceMarkInterior, "Force all the mark as interior", DEFAULT_CONFIG_RecyclerForceMarkInterior)
  1354. #if ENABLE_CONCURRENT_GC
  1355. FLAGNR(Number, RecyclerPriorityBoostTimeout, "Adjust priority boost timeout", 5000)
  1356. FLAGNR(Number, RecyclerThreadCollectTimeout, "Adjust thread collect timeout", 1000)
  1357. FLAGRA(Boolean, EnableConcurrentSweepAlloc, ecsa, "Turns off the feature to allow allocations during concurrent sweep.", true)
  1358. #endif
  1359. #ifdef RECYCLER_PAGE_HEAP
  1360. FLAGNR(Number, PageHeap, "Use full page for heap allocations", DEFAULT_CONFIG_PageHeap)
  1361. FLAGNR(Boolean, PageHeapAllocStack, "Capture alloc stack under page heap mode", DEFAULT_CONFIG_PageHeapAllocStack)
  1362. FLAGNR(Boolean, PageHeapFreeStack, "Capture free stack under page heap mode", DEFAULT_CONFIG_PageHeapFreeStack)
  1363. FLAGNR(NumberRange, PageHeapBucketNumber, "Bucket numbers to be used for page heap allocations", )
  1364. FLAGNR(Number, PageHeapBlockType, "Type of blocks to use page heap for", DEFAULT_CONFIG_PageHeapBlockType)
  1365. FLAGNR(Boolean, PageHeapDecommitGuardPage, "Decommit page heap guard page", true)
  1366. #endif
  1367. #ifdef RECYCLER_NO_PAGE_REUSE
  1368. FLAGNR(Boolean, RecyclerNoPageReuse, "Do not reuse page in recycler", false)
  1369. #endif
  1370. #ifdef RECYCLER_MEMORY_VERIFY
  1371. FLAGNR(Phases, RecyclerVerify , "Verify recycler memory", )
  1372. FLAGNR(Number, RecyclerVerifyPadSize , "Padding size to verify recycler memory", 12)
  1373. #endif
  1374. FLAGNR(Boolean, RecyclerTest , "Run recycler tests instead of executing script", false)
  1375. FLAGNR(Boolean, RecyclerProtectPagesOnRescan, "Temporarily switch all pages to read only during rescan", false)
  1376. #ifdef RECYCLER_VERIFY_MARK
  1377. FLAGNR(Boolean, RecyclerVerifyMark , "verify concurrent gc", false)
  1378. #endif
  1379. FLAGR (Number, LowMemoryCap , "Memory cap indicating a low-memory process", DEFAULT_CONFIG_LowMemoryCap)
  1380. FLAGNR(Number, NewPagesCapDuringBGSweeping, "New pages count allowed to be allocated during background sweeping", DEFAULT_CONFIG_NewPagesCapDuringBGSweeping)
  1381. FLAGR (Number, AllocPolicyLimit , "Memory allocation policy limit in MB (default: -1, which means no allocation policy limit).", DEFAULT_CONFIG_AllocationPolicyLimit)
  1382. #ifdef RUNTIME_DATA_COLLECTION
  1383. FLAGNR(String, RuntimeDataOutputFile, "Filename to write the dynamic profile info", nullptr)
  1384. #endif
  1385. FLAGR (Number, SpeculationCap , "How much bytecode we'll speculatively JIT", DEFAULT_CONFIG_SpeculationCap)
  1386. #if DBG_DUMP || defined(BGJIT_STATS) || defined(RECYCLER_STATS)
  1387. FLAGNR(Phases, Stats , "Stats the given phase", )
  1388. #endif
  1389. #if EXCEPTION_RECOVERY
  1390. FLAGNR(Boolean, SwallowExceptions , "Force a try/catch around every statement", false)
  1391. #endif
  1392. FLAGNR(Boolean, PrintSystemException , "Always print a message when there's OOM or OOS", false)
  1393. FLAGNR(Number, SwitchOptHolesThreshold, "Maximum percentage of holes (missing case values in a switch statement) with which a jump table can be created",DEFAULT_CONFIG_SwitchOptHolesThreshold)
  1394. FLAGR (Number, TempMin , "Temp number switch which code can temporarily use for debugging", DEFAULT_CONFIG_TempMin)
  1395. FLAGR (Number, TempMax , "Temp number switch which code can temporarily use for debugging", DEFAULT_CONFIG_TempMax)
  1396. FLAGNR(Phases, Trace , "Trace the given phase", )
  1397. #if defined(_M_IX86) || defined(_M_X64)
  1398. FLAGR(Number, LoopAlignNopLimit , "Max number of nops for loop alignment", DEFAULT_CONFIG_LoopAlignNopLimit)
  1399. #endif
  1400. #ifdef PROFILE_MEM
  1401. FLAGNR(Phases, TraceMemory , "Trace memory usage", )
  1402. #endif
  1403. #if DBG_DUMP || defined(RECYCLER_TRACE)
  1404. //TraceMetaDataParsing flag with optional levels:
  1405. // Level 1 = interfaces only
  1406. // Level 2 = interfaces and methods
  1407. // Level 3 = interfaces, methods and parameters
  1408. // Level 4 = interfaces and properties
  1409. // Level 5 (default) = ALL
  1410. FLAGNR(Number, TraceMetaDataParsing , "Trace metadata parsing for generating JS projections. [Levels 1-5, with 5 corresponding to most detailed]", 5)
  1411. FLAGNR(Boolean, TraceWin8Allocations , "Trace the win8 memory allocations", false)
  1412. FLAGNR(Boolean, TraceWin8DeallocationsImmediate , "Trace the win8 memory deallocations immediately", false)
  1413. FLAGNR(Boolean, PrintWin8StatsDetailed , "Print the detailed memory trace report", false)
  1414. FLAGNR(Boolean, TraceProtectPages , "Trace calls to protecting pages of custom heap allocated pages", false)
  1415. #endif
  1416. FLAGNR(Boolean, TraceAsyncDebugCalls , "Trace calls to async debugging API (default: false)", DEFAULT_CONFIG_TraceAsyncDebugCalls)
  1417. #ifdef TRACK_DISPATCH
  1418. FLAGNR(Boolean, TrackDispatch , "Save stack traces of where JavascriptDispatch/HostVariant are created", false)
  1419. #endif
  1420. FLAGNR(Boolean, Verbose , "Dump details", DEFAULT_CONFIG_Verbose)
  1421. FLAGNR(Boolean, UseFullName , "Enable fully qualified name", DEFAULT_CONFIG_UseFullName)
  1422. FLAGNR(Boolean, Utf8 , "Use UTF8 for file output", false)
  1423. FLAGR (Number, Version , "Version in which to run the jscript engine. [one of 1,2,3,4,5,6]. Default is latest for jc/jshost, 1 for IE", 6 )
  1424. FLAGR(Boolean, WERExceptionSupport , "WER feature for extended exception support. Enabled when WinRT is enabled", false)
  1425. FLAGNR(Boolean, ExtendedErrorStackForTestHost, "Enable passing extended error stack string to test host.", DEFAULT_CONFIG_ExtendedErrorStackForTestHost)
  1426. FLAGNR(Boolean, errorStackTrace , "error.StackTrace feature. Remove when feature complete", DEFAULT_CONFIG_errorStackTrace)
  1427. FLAGNR(Boolean, DoHeapEnumOnEngineShutdown, "Perform a heap enumeration whenever shut a script engine down", false)
  1428. #ifdef HEAP_ENUMERATION_VALIDATION
  1429. FLAGNR(Boolean, ValidateHeapEnum , "Validate that heap enumeration is reporting all Js::RecyclableObjects in the heap", false)
  1430. #endif
  1431. #if ENABLE_REGEX_CONFIG_OPTIONS
  1432. //
  1433. // Regex flags
  1434. //
  1435. FLAGR (Boolean, RegexTracing , "Trace all Regex invocations to the output.", DEFAULT_CONFIG_RegexTracing)
  1436. FLAGR (Boolean, RegexProfile , "Collect usage statistics on all Regex invocations.", DEFAULT_CONFIG_RegexProfile)
  1437. FLAGR (Boolean, RegexDebug , "Trace compilation of UnifiedRegex expressions.", DEFAULT_CONFIG_RegexDebug)
  1438. FLAGR (Boolean, RegexDebugAST , "Display Regex AST (requires -RegexDebug to view). [default on]", DEFAULT_CONFIG_RegexDebugAST)
  1439. FLAGR (Boolean, RegexDebugAnnotatedAST, "Display Regex Annotated AST (requires -RegexDebug and -RegexDebugAST to view). [default on]", DEFAULT_CONFIG_RegexDebugAnnotatedAST)
  1440. FLAGR (Boolean, RegexBytecodeDebug , "Display layout of UnifiedRegex bytecode (requires -RegexDebug to view).", DEFAULT_CONFIG_RegexBytecodeDebug)
  1441. FLAGR (Boolean, RegexOptimize , "Optimize regular expressions in the unified Regex system (default: true)", DEFAULT_CONFIG_RegexOptimize)
  1442. FLAGR (Number, DynamicRegexMruListSize, "Size of the MRU list for dynamic regexes", DEFAULT_CONFIG_DynamicRegexMruListSize)
  1443. #endif
  1444. FLAGR (Boolean, OptimizeForManyInstances, "Optimize script engine for many instances (low memory footprint per engine, assume low spare CPU cycles) (default: false)", DEFAULT_CONFIG_OptimizeForManyInstances)
  1445. FLAGNR(Boolean, EnableArrayTypeMutation, "Enable force array type mutation on re-entrant region", DEFAULT_CONFIG_EnableArrayTypeMutation)
  1446. FLAGNR(Number, ArrayMutationTestSeed, "Seed used for the array mutation", 0)
  1447. FLAGNR(Phases, TestTrace , "Test trace for the given phase", )
  1448. FLAGNR(Boolean, EnableEvalMapCleanup, "Enable cleaning up the eval map", true)
  1449. #ifdef PROFILE_MEM
  1450. FLAGNR(Boolean, TraceObjectAllocation, "Enable cleaning up the eval map", false)
  1451. #endif
  1452. FLAGNR(Number, Sse, "Virtually disables SSE-based optimizations above the specified SSE level in the Chakra JIT (does not affect CRT SSE usage)", DEFAULT_CONFIG_Sse)
  1453. FLAGNR(Number, DeletedPropertyReuseThreshold, "Start reusing deleted property indexes after this many properties are deleted. Zero to disable reuse.", DEFAULT_CONFIG_DeletedPropertyReuseThreshold)
  1454. FLAGNR(Boolean, ForceStringKeyedSimpleDictionaryTypeHandler, "Force switch to string keyed version of SimpleDictionaryTypeHandler on first new property added to a SimpleDictionaryTypeHandler", DEFAULT_CONFIG_ForceStringKeyedSimpleDictionaryTypeHandler)
  1455. FLAGNR(Number, BigDictionaryTypeHandlerThreshold, "Min Slot Capacity required to convert DictionaryTypeHandler to BigDictionaryTypeHandler.(Advisable to give more than 15 - to avoid false positive cases)", DEFAULT_CONFIG_BigDictionaryTypeHandlerThreshold)
  1456. FLAGNR(Boolean, TypeSnapshotEnumeration, "Create a true snapshot of the type of an object before enumeration and enumerate only those properties.", DEFAULT_CONFIG_TypeSnapshotEnumeration)
  1457. FLAGNR(Boolean, IsolatePrototypes, "Should prototypes get unique types not shared with other objects (default: true)?", DEFAULT_CONFIG_IsolatePrototypes)
  1458. FLAGNR(Boolean, ChangeTypeOnProto, "When becoming a prototype should the object switch to a new type (default: true)?", DEFAULT_CONFIG_ChangeTypeOnProto)
  1459. FLAGNR(Boolean, ShareInlineCaches, "Determines whether inline caches are shared between all loads (or all stores) of the same property ID", DEFAULT_CONFIG_ShareInlineCaches)
  1460. FLAGNR(Boolean, DisableDebugObject, "Disable test only Debug object properties", DEFAULT_CONFIG_DisableDebugObject)
  1461. FLAGNR(Boolean, DumpHeap, "enable Debug.dumpHeap even when DisableDebugObject is set", DEFAULT_CONFIG_DumpHeap)
  1462. FLAGNR(String, autoProxy, "enable creating proxy for each object creation", _u("__msTestHandler"))
  1463. FLAGNR(Number, PerfHintLevel, "Specifies the perf-hint level (1,2) 1 == critical, 2 == only noisy", DEFAULT_CONFIG_PerfHintLevel)
  1464. #ifdef INTERNAL_MEM_PROTECT_HEAP_ALLOC
  1465. FLAGNR(Boolean, MemProtectHeap, "Use the mem protect heap as the default heap", DEFAULT_CONFIG_MemProtectHeap)
  1466. #endif
  1467. #ifdef RECYCLER_STRESS
  1468. FLAGNR(Boolean, MemProtectHeapStress, "Stress the recycler by collect on every allocation call", false)
  1469. #if ENABLE_CONCURRENT_GC
  1470. FLAGNR(Boolean, MemProtectHeapBackgroundStress, "Stress the recycler by collect in the background thread on every allocation call", false)
  1471. FLAGNR(Boolean, MemProtectHeapConcurrentStress, "Stress the concurrent recycler by concurrent collect on every allocation call", false)
  1472. FLAGNR(Boolean, MemProtectHeapConcurrentRepeatStress, "Stress the concurrent recycler by concurrent collect on every allocation call and repeat mark and rescan in the background thread", false)
  1473. #endif
  1474. #if ENABLE_PARTIAL_GC
  1475. FLAGNR(Boolean, MemProtectHeapPartialStress, "Stress the partial recycler by partial collect on every allocation call", false)
  1476. #endif
  1477. #endif
  1478. #ifdef SUPPORT_FIXED_FIELDS_ON_PATH_TYPES
  1479. FLAGNR(Boolean, FixPropsOnPathTypes, "Mark properties as fixed on path types (default: false).", DEFAULT_CONFIG_FixPropsOnPathTypes)
  1480. #endif
  1481. FLAGNR(NumberSet, BailoutTraceFilter, "Filter the bailout trace messages to specific bailout kinds.", )
  1482. FLAGNR(NumberSet, RejitTraceFilter, "Filter the rejit trace messages to specific bailout kinds.", )
  1483. // recycler heuristic flags
  1484. FLAGNR(Number, MaxBackgroundFinishMarkCount, "Maximum number of background finish mark", 1)
  1485. FLAGNR(Number, BackgroundFinishMarkWaitTime, "Millisecond to wait for background finish mark", 15)
  1486. FLAGNR(Number, MinBackgroundRepeatMarkRescanBytes, "Minimum number of bytes rescan to trigger background finish mark", -1)
  1487. #if defined(_M_IX86) || defined(_M_X64)
  1488. FLAGNR(Boolean, ZeroMemoryWithNonTemporalStore, "Zero free memory with non-temporal stores to avoid evicting other content from processor cache", DEFAULT_CONFIG_ZeroMemoryWithNonTemporalStore)
  1489. #endif
  1490. // recycler memory restrict test flags
  1491. FLAGNR(Number, MaxMarkStackPageCount , "Restrict recycler mark stack size (in pages)", -1)
  1492. FLAGNR(Number, MaxTrackedObjectListCount, "Restrict recycler tracked object count during GC", -1)
  1493. // make the recycler page integration path easier to hit
  1494. FLAGNR(Number, NumberAllocPlusSize, "Additional bytes to allocate with JavascriptNumber from number allocator (0~496)", 0)
  1495. #if DBG
  1496. FLAGNR(Boolean, InitializeInterpreterSlotsWithInvalidStackVar, "Enable the initialization of the interpreter local slots with invalid stack vars", false)
  1497. #endif
  1498. #if DBG
  1499. FLAGNR(Number, PRNGSeed0, "Override seed0 for Math.Random()", 0)
  1500. FLAGNR(Number, PRNGSeed1, "Override seed1 for Math.Random()", 0)
  1501. #endif
  1502. FLAGNR(Boolean, ClearInlineCachesOnCollect, "Clear all inline caches on every garbage collection", false)
  1503. FLAGNR(Number, InlineCacheInvalidationListCompactionThreshold, "Compact inline cache invalidation lists if their utilization falls below this threshold", DEFAULT_CONFIG_InlineCacheInvalidationListCompactionThreshold)
  1504. FLAGNR(Number, ConstructorCacheInvalidationThreshold, "Clear uniquePropertyGuard entries from recyclableData if number of invalidations of constructor caches happened are more than the threshold.", DEFAULT_CONFIG_ConstructorCacheInvalidationThreshold)
  1505. #ifdef IR_VIEWER
  1506. FLAGNR(Boolean, IRViewer, "Enable IRViewer functionality (improved UI for various stages of IR generation)", false)
  1507. #endif /* IR_VIEWER */
  1508. FLAGNR(Number, GCMemoryThreshold, "Threshold for allocation-based GC initiation (in MB)", 0)
  1509. #ifdef _CONTROL_FLOW_GUARD
  1510. FLAGNR(Boolean, PreReservedHeapAlloc, "Enable Pre-reserved Heap Page Allocator", true)
  1511. FLAGNR(Boolean, CFGInJit, "Enable CFG check in JIT", true)
  1512. FLAGNR(Boolean, CFG, "Force enable CFG on jshost. version in the jshost's manifest file disables CFG", true)
  1513. #endif
  1514. #if DBG
  1515. FLAGNR(Number, SimulatePolyCacheWithOneTypeForInlineCacheIndex, "Use with SimulatePolyCacheWithOneTypeForFunction to simulate creating a polymorphic inline cache containing only one type due to a collision, for testing ObjTypeSpec", -1)
  1516. #endif
  1517. FLAGR(Number, JITServerIdleTimeout, "Idle timeout in milliseconds to do the cleanup in JIT server", 500)
  1518. FLAGR(Number, JITServerMaxInactivePageAllocatorCount, "Max inactive page allocators to keep before schedule a cleanup", 10)
  1519. FLAGNR(Boolean, StrictWriteBarrierCheck, "Check write barrier setting on none write barrier pages", DEFAULT_CONFIG_StrictWriteBarrierCheck)
  1520. FLAGNR(Boolean, WriteBarrierTest, "Always return true while checking barrier to test recycler regardless of annotation", DEFAULT_CONFIG_WriteBarrierTest)
  1521. FLAGNR(Boolean, ForceSoftwareWriteBarrier, "Use to turn off write watch to test software write barrier on windows", DEFAULT_CONFIG_ForceSoftwareWriteBarrier)
  1522. FLAGNR(Boolean, VerifyBarrierBit, "Verify software write barrier bit is set while marking", DEFAULT_CONFIG_VerifyBarrierBit)
  1523. FLAGNR(Boolean, EnableBGFreeZero, "Use to turn off background freeing and zeroing to simulate linux", DEFAULT_CONFIG_EnableBGFreeZero)
  1524. FLAGNR(Boolean, KeepRecyclerTrackData, "Keep recycler track data after sweep until reuse", DEFAULT_CONFIG_KeepRecyclerTrackData)
  1525. FLAGNR(Number, MaxSingleAllocSizeInMB, "Max size(in MB) in single allocation", DEFAULT_CONFIG_MaxSingleAllocSizeInMB)
  1526. #ifdef ENABLE_BASIC_TELEMETRY
  1527. FLAGR(String, TelemetryRunType, "Value sent with telemetry events indicating origin class of data. E.g., if data was triggered from Edge Crawler.", _u(""))
  1528. FLAGR(String, TelemetryDiscriminator1, "Value sent with telemetry events. Used to identify filter telemetry data to specific runs.", _u(""))
  1529. FLAGR(String, TelemetryDiscriminator2, "Value sent with telemetry events. Used to identify filter telemetry data to specific runs.", _u(""))
  1530. #endif
  1531. #undef FLAG_REGOVR_EXP
  1532. #undef FLAG_EXPERIMENTAL
  1533. #undef FLAG
  1534. #undef FLAGP
  1535. #undef FLAGRA
  1536. #undef FLAGNR
  1537. #undef FLAGNRA
  1538. #undef FLAGPNR
  1539. #undef FLAGPRA
  1540. #endif