| Index: runtime/vm/object.h
|
| ===================================================================
|
| --- runtime/vm/object.h (revision 31085)
|
| +++ runtime/vm/object.h (working copy)
|
| @@ -4168,7 +4168,6 @@
|
| virtual RawClass* type_class() const;
|
| void set_type_class(const Object& value) const;
|
| virtual RawUnresolvedClass* unresolved_class() const;
|
| - RawString* TypeClassName() const;
|
| virtual RawAbstractTypeArguments* arguments() const;
|
| void set_arguments(const AbstractTypeArguments& value) const;
|
| virtual intptr_t token_pos() const { return raw_ptr()->token_pos_; }
|
| @@ -4250,6 +4249,67 @@
|
| };
|
|
|
|
|
| +// A TypeRef is used to break cycles in the representation of recursive types.
|
| +// Its only field is the recursive AbstractType it refers to.
|
| +// Note that the cycle always involves type arguments.
|
| +class TypeRef : public AbstractType {
|
| + public:
|
| + virtual bool IsFinalized() const {
|
| + return AbstractType::Handle(type()).IsFinalized();
|
| + }
|
| + virtual bool IsBeingFinalized() const {
|
| + return AbstractType::Handle(type()).IsBeingFinalized();
|
| + }
|
| + virtual bool IsMalformed() const {
|
| + return AbstractType::Handle(type()).IsMalformed();
|
| + }
|
| + virtual bool IsMalbounded() const {
|
| + return AbstractType::Handle(type()).IsMalbounded();
|
| + }
|
| + virtual bool IsMalformedOrMalbounded() const {
|
| + return AbstractType::Handle(type()).IsMalformedOrMalbounded();
|
| + }
|
| + virtual bool IsResolved() const { return true; }
|
| + virtual bool HasResolvedTypeClass() const { return true; }
|
| + RawAbstractType* type() const { return raw_ptr()->type_; }
|
| + void set_type(const AbstractType& value) const;
|
| + virtual RawClass* type_class() const {
|
| + return AbstractType::Handle(type()).type_class();
|
| + }
|
| + virtual RawAbstractTypeArguments* arguments() const {
|
| + return AbstractType::Handle(type()).arguments();
|
| + }
|
| + virtual intptr_t token_pos() const {
|
| + return AbstractType::Handle(type()).token_pos();
|
| + }
|
| + virtual bool IsInstantiated() const;
|
| + virtual bool Equals(const Instance& other) const;
|
| + virtual RawAbstractType* InstantiateFrom(
|
| + const AbstractTypeArguments& instantiator_type_arguments,
|
| + Error* bound_error) const;
|
| + virtual RawAbstractType* Canonicalize() const;
|
| +
|
| + virtual intptr_t Hash() const;
|
| +
|
| + static intptr_t InstanceSize() {
|
| + return RoundedAllocationSize(sizeof(RawTypeRef));
|
| + }
|
| +
|
| + static RawTypeRef* New(const AbstractType& type);
|
| +
|
| + private:
|
| + bool is_being_checked() const {
|
| + return raw_ptr()->is_being_checked_;
|
| + }
|
| + void set_is_being_checked(bool value) const;
|
| +
|
| + static RawTypeRef* New();
|
| +
|
| + FINAL_HEAP_OBJECT_IMPLEMENTATION(TypeRef, AbstractType);
|
| + friend class Class;
|
| +};
|
| +
|
| +
|
| // A TypeParameter represents a type parameter of a parameterized class.
|
| // It specifies its index (and its name for debugging purposes), as well as its
|
| // upper bound.
|
|
|