From 0f1fc1e0ef5aa39d59a15b7036d35faba3124e4f Mon Sep 17 00:00:00 2001 From: Seth Brenith Date: Tue, 23 Aug 2022 07:36:00 -0700 Subject: [PATCH] Enable merging deserialized scripts when --future is set This can save memory in cases where multiple frames use the same script, with sufficient time between loads that the script's top-level SharedFunctionInfo is no longer present in the compilation cache. Merging is relatively fast; it generally takes about one tenth as long as deserialization. Bug: v8:12808 Change-Id: I317a89b77fb218798dfc9dfd888e808b17d62fdd Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3845792 Reviewed-by: Leszek Swirski Commit-Queue: Seth Brenith Cr-Commit-Position: refs/heads/main@{#82670} --- src/flags/flag-definitions.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/flags/flag-definitions.h b/src/flags/flag-definitions.h index 9a083eba0e..0941422dc1 100644 --- a/src/flags/flag-definitions.h +++ b/src/flags/flag-definitions.h @@ -473,6 +473,8 @@ DEFINE_WEAK_IMPLICATION(future, short_builtin_calls) #endif DEFINE_WEAK_NEG_IMPLICATION(future, write_protect_code_memory) DEFINE_WEAK_NEG_IMPLICATION(future, use_map_space) +DEFINE_WEAK_IMPLICATION( + future, merge_background_deserialized_script_with_compilation_cache) DEFINE_BOOL_READONLY(dict_property_const_tracking, V8_DICT_PROPERTY_CONST_TRACKING_BOOL,