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 .
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index ac586d9..daa2198 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -17608,7 +17608,7 @@
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();
}
@@ -17623,7 +17623,7 @@
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);
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index 61a2866..ee6c10c 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -6057,7 +6057,7 @@
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();