[vm] Revert caching of default type arguments within closure.
Since we already cache instantiation of type argument vectors to avoid runtime calls as long as the cache has room, remove the default type arguments field from Closure objects. Instead, just perform any needed instantiation when the default type arguments are needed using the instantiator and parent function type arguments stored in the closure. Also rename DefaultTypeArgumentsKind to InstantiationMode and generalize the calculations to determine how to instantiate default type arguments to an operation that can be performed on type arguments in general. TEST=ci Fixes: https://github.com/dart-lang/sdk/issues/54589 Issue: https://github.com/dart-lang/sdk/issues/54564 Change-Id: I704ea4244fb10cbc08175629c8e92cf05b8aabea Cq-Include-Trybots: luci.dart.try:vm-aot-linux-release-arm64-try,vm-aot-linux-release-x64-try,vm-aot-tsan-linux-release-x64-try,vm-tsan-linux-release-x64-try,vm-aot-linux-debug-x64-try Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346021 Commit-Queue: Tess Strickland <sstrickl@google.com> Reviewed-by: Martin Kustermann <kustermann@google.com> Reviewed-by: Alexander Markov <alexmarkov@google.com>
This commit is contained in:
committed by
Commit Queue
parent
58bf203064
commit
743c0c862c
@@ -147,7 +147,6 @@ namespace dart {
|
||||
F(Closure, instantiator_type_arguments_) \
|
||||
F(Closure, function_type_arguments_) \
|
||||
F(Closure, delayed_type_arguments_) \
|
||||
F(Closure, default_type_arguments_) \
|
||||
F(Closure, function_) \
|
||||
F(Closure, context_) \
|
||||
F(Closure, hash_) \
|
||||
|
||||
Reference in New Issue
Block a user