-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Separate TypeArguments into separate TypeParameters (binding) and TypeArguments (use) classes. #43901
Comments
/cc @mkustermann @crelier |
@sstrickl Now that my CL introducing a proper |
No worries, I have other things to focus on at the moment, go for it! :) (Yaaaaaaay, separating binding and use!) |
Great! Thanks. I am on it. |
…n the VM." This reverts commit 8a21ab1. Reason for revert: Test failure: http://b/187227619 Original change's description: > [VM/runtime] Refactor the representation of type parameters in the VM. > > This introduces a new VM internal class 'TypeParameters' representing the declaration of a list of type parameters, either in a class or function. > The reference to (or use of) a type parameter is still represented by the existing 'TypeParameter' class. > > Fixes #43901 > Fixes #45763 > > TEST=existing ones and a regression test > > Change-Id: I1fde808bf753cc1cb829f2c4383c1836651cee80 > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189942 > Commit-Queue: Régis Crelier <regis@google.com> > Reviewed-by: Alexander Markov <alexmarkov@google.com> TBR=rmacnak@google.com,alexmarkov@google.com,regis@google.com,sstrickl@google.com Change-Id: If12caa1a84cb6d1c1b8225589f3c994d25abb120 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198282 Reviewed-by: Michal Terepeta <michalt@google.com> Reviewed-by: Tess Strickland <sstrickl@google.com> Commit-Queue: Michal Terepeta <michalt@google.com>
…n the VM." This is a reland of 8a21ab1 Original change's description: > [VM/runtime] Refactor the representation of type parameters in the VM. > > This introduces a new VM internal class 'TypeParameters' representing the declaration of a list of type parameters, either in a class or function. > The reference to (or use of) a type parameter is still represented by the existing 'TypeParameter' class. > > Fixes #43901 > Fixes #45763 > > TEST=existing ones and a regression test > > Change-Id: I1fde808bf753cc1cb829f2c4383c1836651cee80 > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189942 > Commit-Queue: Régis Crelier <regis@google.com> > Reviewed-by: Alexander Markov <alexmarkov@google.com> This fixes #45911 TEST=existing ones and a regression test Change-Id: I709d38b1df3d73fe3c9796d5aca3cbbdcf77fd38 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198380 Commit-Queue: Régis Crelier <regis@google.com> Reviewed-by: Alexander Markov <alexmarkov@google.com>
In CL 168101, we save the default arguments (i.e., results of instantiating to bounds) calculated by the CFE in
TypeParameter
objects. However, these default arguments are only needed when the instantiator of aTypeArguments
object containing onlyTypeParameter
s has not provided any explicit type arguments, and won't be used when instantiating individualTypeParameter
s.Instead, we should separate out binding and use occurrences of
TypeArguments
into two classes,TypeParameters
andTypeArguments
. The former will replace the use of TypeArguments to store the type parameters of classes and functionss, and it can store a vector that represents the entire vector instantiated to bounds without adding overhead to allTypeArguments
objects. We can also move any methods onTypeArguments
that only make sense for binding positions to the newTypeParameters
class.The text was updated successfully, but these errors were encountered: