ConfigFlagsList.h 108 KB

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