[go: nahoru, domu]

blob: 17941347cb19ad2eb0c6166b4fb15254418f1706 [file] [log] [blame]
Avi Drissman468e51b62022-09-13 20:47:011// Copyright 2017 The Chromium Authors
Ross McIlroy45e9500a2018-03-27 17:06:022// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef GIN_GIN_FEATURES_H_
6#define GIN_GIN_FEATURES_H_
7
8#include "base/feature_list.h"
Lei Zhangca268b392021-04-26 21:25:429#include "base/metrics/field_trial_params.h"
Etienne Pierre-doray87b4b84b2022-08-09 20:04:4810#include "base/time/time.h"
Ross McIlroy45e9500a2018-03-27 17:06:0211#include "gin/gin_export.h"
12
13namespace features {
14
Daniel Chengaab4b01b2022-09-20 14:28:3815GIN_EXPORT BASE_DECLARE_FEATURE(kV8CompactCodeSpaceWithStack);
Daniel Chengaab4b01b2022-09-20 14:28:3816GIN_EXPORT BASE_DECLARE_FEATURE(kV8CompactWithStack);
17GIN_EXPORT BASE_DECLARE_FEATURE(kV8ConcurrentSparkplug);
Victor Gomes409ef5a2021-12-02 09:47:3518GIN_EXPORT extern const base::FeatureParam<int>
19 kV8ConcurrentSparkplugMaxThreads;
Camillo Brunic8566b862023-02-16 09:10:4820GIN_EXPORT BASE_DECLARE_FEATURE(kV8CodeMemoryWriteProtection);
Daniel Chengaab4b01b2022-09-20 14:28:3821GIN_EXPORT BASE_DECLARE_FEATURE(kV8ConcurrentSparkplugHighPriorityThreads);
Camillo Brunic8566b862023-02-16 09:10:4822GIN_EXPORT BASE_DECLARE_FEATURE(kV8DelayMemoryReducer);
Etienne Pierre-doray89f75072023-05-13 15:08:4423GIN_EXPORT BASE_DECLARE_FEATURE(kV8ConcurrentMarkingHighPriorityThreads);
Daniel Chengaab4b01b2022-09-20 14:28:3824GIN_EXPORT BASE_DECLARE_FEATURE(kV8ExperimentalRegexpEngine);
Toon Verwaest60185fc2022-07-27 10:40:3025GIN_EXPORT extern const base::FeatureParam<int> kV8FlushBytecodeOldAge;
Daniel Chengaab4b01b2022-09-20 14:28:3826GIN_EXPORT BASE_DECLARE_FEATURE(kV8FlushBaselineCode);
Camillo Brunic8566b862023-02-16 09:10:4827GIN_EXPORT BASE_DECLARE_FEATURE(kV8FlushBytecode);
Dominik Inführaa5f5112023-06-07 21:07:3528GIN_EXPORT BASE_DECLARE_FEATURE(kV8FlushCodeBasedOnTabVisibility);
29GIN_EXPORT BASE_DECLARE_FEATURE(kV8FlushCodeBasedOnTime);
30GIN_EXPORT extern const base::FeatureParam<int> kV8FlushCodeOldTime;
Daniel Chengaab4b01b2022-09-20 14:28:3831GIN_EXPORT BASE_DECLARE_FEATURE(kV8FlushEmbeddedBlobICache);
Shu-yu Guo07bdfb42023-05-11 21:01:5432GIN_EXPORT BASE_DECLARE_FEATURE(kV8IgnitionElideRedundantTdzChecks);
Daniel Lehmann456950c2024-02-09 14:05:5433GIN_EXPORT BASE_DECLARE_FEATURE(kV8IntelJCCErratumMitigation);
Daniel Chengaab4b01b2022-09-20 14:28:3834GIN_EXPORT BASE_DECLARE_FEATURE(kV8LazyFeedbackAllocation);
Leszek Swirskidcd9023a2022-09-21 11:03:3935GIN_EXPORT BASE_DECLARE_FEATURE(kV8Maglev);
Dominik Inführ390e7472023-08-15 07:33:3936GIN_EXPORT BASE_DECLARE_FEATURE(kV8MemoryReducer);
37GIN_EXPORT extern const base::FeatureParam<int> kV8MemoryReducerGCCount;
Omer Katz257c88da2023-07-11 09:17:1638GIN_EXPORT BASE_DECLARE_FEATURE(kV8MinorMS);
Camillo Brunic8566b862023-02-16 09:10:4839GIN_EXPORT BASE_DECLARE_FEATURE(kV8MegaDomIC);
Daniel Chengaab4b01b2022-09-20 14:28:3840GIN_EXPORT BASE_DECLARE_FEATURE(kV8NoReclaimUnmodifiedWrappers);
Daniel Chengaab4b01b2022-09-20 14:28:3841GIN_EXPORT BASE_DECLARE_FEATURE(kV8OffThreadFinalization);
42GIN_EXPORT BASE_DECLARE_FEATURE(kV8OptimizeJavascript);
43GIN_EXPORT BASE_DECLARE_FEATURE(kV8PerContextMarkingWorklist);
Olivier Flückiger43e22a72024-01-16 12:46:2044GIN_EXPORT BASE_DECLARE_FEATURE(kV8ProfileGuidedOptimization);
Daniel Chengaab4b01b2022-09-20 14:28:3845GIN_EXPORT BASE_DECLARE_FEATURE(kV8ReduceConcurrentMarkingTasks);
Daniel Chengaab4b01b2022-09-20 14:28:3846GIN_EXPORT BASE_DECLARE_FEATURE(kV8ShortBuiltinCalls);
Dominik Inführ99a23d32023-08-02 15:40:2947GIN_EXPORT BASE_DECLARE_FEATURE(kV8SingleThreadedGCInBackground);
Olivier Flückigerc722bf482023-12-20 12:47:4248GIN_EXPORT BASE_DECLARE_FEATURE(kV8EfficiencyModeTiering);
49GIN_EXPORT extern const base::FeatureParam<int>
50 kV8EfficiencyModeTieringDelayTurbofan;
Daniel Chengaab4b01b2022-09-20 14:28:3851GIN_EXPORT BASE_DECLARE_FEATURE(kV8SlowHistograms);
52GIN_EXPORT BASE_DECLARE_FEATURE(kV8SlowHistogramsCodeMemoryWriteProtection);
Camillo Brunic8566b862023-02-16 09:10:4853GIN_EXPORT BASE_DECLARE_FEATURE(kV8SlowHistogramsNoTurbofan);
Daniel Chengaab4b01b2022-09-20 14:28:3854GIN_EXPORT BASE_DECLARE_FEATURE(kV8SlowHistogramsSparkplug);
55GIN_EXPORT BASE_DECLARE_FEATURE(kV8SlowHistogramsSparkplugAndroid);
Daniel Chengaab4b01b2022-09-20 14:28:3856GIN_EXPORT BASE_DECLARE_FEATURE(kV8Sparkplug);
57GIN_EXPORT BASE_DECLARE_FEATURE(kV8SparkplugNeedsShortBuiltinCalls);
Camillo Brunic8566b862023-02-16 09:10:4858GIN_EXPORT BASE_DECLARE_FEATURE(kV8Turbofan);
Nico Hartmannc87b89e2023-06-14 14:29:0659GIN_EXPORT BASE_DECLARE_FEATURE(kV8Turboshaft);
Nico Hartmannd88debc2023-10-25 16:48:3060GIN_EXPORT BASE_DECLARE_FEATURE(kV8TurboshaftInstructionSelection);
Daniel Chengaab4b01b2022-09-20 14:28:3861GIN_EXPORT BASE_DECLARE_FEATURE(kV8TurboFastApiCalls);
Scott Violet744f9f872022-12-15 20:24:5162GIN_EXPORT BASE_DECLARE_FEATURE(kV8UseLibmTrigFunctions);
Etienne Pierre-doray87b4b84b2022-08-09 20:04:4863GIN_EXPORT extern const base::FeatureParam<base::TimeDelta>
64 kV8MemoryReducerStartDelay;
Marja Hölttäf7ec8662022-11-21 12:50:1565GIN_EXPORT BASE_DECLARE_FEATURE(kJavaScriptRabGsab);
Shu-yu Guodea0deba2023-02-09 10:07:4366GIN_EXPORT BASE_DECLARE_FEATURE(kJavaScriptRegExpUnicodeSets);
Camillo Brunic8566b862023-02-16 09:10:4867GIN_EXPORT BASE_DECLARE_FEATURE(kJavaScriptSymbolAsWeakMapKey);
Shu-yu Guof714e3712023-03-30 01:19:3668GIN_EXPORT BASE_DECLARE_FEATURE(kJavaScriptJsonParseWithSource);
Shu-yu Guo898b90172023-03-30 21:18:2369GIN_EXPORT BASE_DECLARE_FEATURE(kJavaScriptArrayBufferTransfer);
Marja Hölttä24a0eb52023-04-17 13:57:2570GIN_EXPORT BASE_DECLARE_FEATURE(kJavaScriptCompileHintsMagic);
Rezvan Mahdavi Hezaveh777441c72023-06-15 23:42:3171GIN_EXPORT BASE_DECLARE_FEATURE(kJavaScriptIteratorHelpers);
Shu-yu Guo75a1e352023-09-15 01:04:5172GIN_EXPORT BASE_DECLARE_FEATURE(kJavaScriptPromiseWithResolvers);
Rezvan Mahdavi Hezavehad79783b2023-11-02 21:51:2473GIN_EXPORT BASE_DECLARE_FEATURE(kJavaScriptArrayFromAsync);
Shu-yu Guo924f2732023-12-20 23:32:1474GIN_EXPORT BASE_DECLARE_FEATURE(kJavaScriptRegExpModifiers);
Nicolò Ribaudocc6f95722024-01-09 16:44:5775GIN_EXPORT BASE_DECLARE_FEATURE(kJavaScriptImportAttributes);
Rezvan Mahdavi Hezavehdde47212024-01-12 22:21:4476GIN_EXPORT BASE_DECLARE_FEATURE(kJavaScriptSetMethods);
Shu-yu Guobf2f7aa2024-01-31 19:01:5577GIN_EXPORT BASE_DECLARE_FEATURE(kJavaScriptRegExpDuplicateNamedGroups);
Thibaud Michauda76870a2023-01-31 18:48:3878GIN_EXPORT BASE_DECLARE_FEATURE(kWebAssemblyTailCall);
Clemens Backesb63dded2023-03-15 12:51:5479GIN_EXPORT BASE_DECLARE_FEATURE(kWebAssemblyInlining);
Andreas Haas79abc462023-10-04 08:17:5780GIN_EXPORT BASE_DECLARE_FEATURE(kWebAssemblyGenericWrapper);
Clemens Backesc94fd762023-10-23 15:14:0781GIN_EXPORT BASE_DECLARE_FEATURE(kWebAssemblyMultipleMemories);
Manos Koukoutos582a5b7632023-10-28 07:05:4182GIN_EXPORT BASE_DECLARE_FEATURE(kWebAssemblyTurboshaft);
Manos Koukoutos183e9302023-12-01 15:43:0583GIN_EXPORT BASE_DECLARE_FEATURE(kWebAssemblyTurboshaftInstructionSelection);
Ross McIlroy45e9500a2018-03-27 17:06:0284
Clemens Backes6cdcedb2023-11-24 08:22:4085// Feature for more aggressive code caching (https://crbug.com/v8/14411) and
86// three parameters to control caching behavior.
87GIN_EXPORT BASE_DECLARE_FEATURE(kWebAssemblyMoreAggressiveCodeCaching);
88GIN_EXPORT extern const base::FeatureParam<int>
89 kWebAssemblyMoreAggressiveCodeCachingThreshold;
90GIN_EXPORT extern const base::FeatureParam<int>
91 kWebAssemblyMoreAggressiveCodeCachingTimeoutMs;
92GIN_EXPORT extern const base::FeatureParam<int>
93 kWebAssemblyMoreAggressiveCodeCachingHardThreshold;
94
Ross McIlroy45e9500a2018-03-27 17:06:0295} // namespace features
96
97#endif // GIN_GIN_FEATURES_H_