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 <leszeks@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#82670}
This commit is contained in:
Seth Brenith 2022-08-23 07:36:00 -07:00 committed by V8 LUCI CQ
parent e41f058021
commit 0f1fc1e0ef

View File

@ -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,