diff --git a/BUILD.gn b/BUILD.gn index feb4df818e..b902dd27ea 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -282,6 +282,10 @@ declare_args() { # Experimental feature for collecting per-class zone memory stats. # Requires use_rtti = true v8_enable_precise_zone_stats = false + + # Experimental feature for always keeping prototypes in dict/"slow" mode + # Sets -DV8_DICT_MODE_PROTOTYPES + v8_dict_mode_prototypes = false } # Derived defaults. @@ -674,6 +678,9 @@ config("features") { if (v8_fuzzilli) { defines += [ "V8_FUZZILLI" ] } + if (v8_dict_mode_prototypes) { + defines += [ "V8_DICT_MODE_PROTOTYPES" ] + } } config("toolchain") { diff --git a/src/common/globals.h b/src/common/globals.h index 8c90ded26d..e0f418c1aa 100644 --- a/src/common/globals.h +++ b/src/common/globals.h @@ -103,6 +103,13 @@ STATIC_ASSERT(V8_DEFAULT_STACK_SIZE_KB* KB + #define V8_DOUBLE_FIELDS_UNBOXING false #endif +// Determine whether dict mode prototypes feature is enabled. +#ifdef V8_DICT_MODE_PROTOTYPES +#define V8_DICT_MODE_PROTOTYPES_BOOL true +#else +#define V8_DICT_MODE_PROTOTYPES_BOOL false +#endif + // Determine whether tagged pointers are 8 bytes (used in Torque layouts for // choosing where to insert padding). #if V8_TARGET_ARCH_64_BIT && !defined(V8_COMPRESS_POINTERS)