mirror of
https://github.com/dart-lang/sdk
synced 2024-09-06 00:59:09 +00:00
Use kFunctionCid instead of kIllegalCid to indicate that a generic function
type parameter does not parameterize a class, but a function. Snapshot generation apparently trips on kIllegalCid. R=johnmccutchan@google.com, rmacnak@google.com Review-Url: https://codereview.chromium.org/2567163002 .
This commit is contained in:
parent
b62c5e466f
commit
53e93e8b05
|
@ -17610,7 +17610,7 @@ bool TypeParameter::IsEquivalent(const Instance& other, TrailPtr trail) const {
|
|||
|
||||
void TypeParameter::set_parameterized_class(const Class& value) const {
|
||||
// Set value may be null.
|
||||
classid_t cid = kIllegalCid;
|
||||
classid_t cid = kFunctionCid; // Denotes a function type parameter.
|
||||
if (!value.IsNull()) {
|
||||
cid = value.id();
|
||||
}
|
||||
|
@ -17625,7 +17625,7 @@ classid_t TypeParameter::parameterized_class_id() const {
|
|||
|
||||
RawClass* TypeParameter::parameterized_class() const {
|
||||
classid_t cid = parameterized_class_id();
|
||||
if (cid == kIllegalCid) {
|
||||
if (cid == kFunctionCid) {
|
||||
return Class::null();
|
||||
}
|
||||
return Isolate::Current()->class_table()->At(cid);
|
||||
|
|
|
@ -6057,7 +6057,7 @@ class TypeParameter : public AbstractType {
|
|||
return raw_ptr()->parameterized_function_;
|
||||
}
|
||||
bool IsClassTypeParameter() const {
|
||||
return parameterized_class_id() != kIllegalCid;
|
||||
return parameterized_class_id() != kFunctionCid;
|
||||
}
|
||||
bool IsFunctionTypeParameter() const {
|
||||
return parameterized_function() != Function::null();
|
||||
|
|
Loading…
Reference in a new issue