ConfigFlagsList.h 103 KB

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