#include "AST.h" #include "CtObjectDescriptor.h" #include "ctValueDescriptor.h" #include "domain-decls.h" #include "PrimitiveDecl.h" const CtType &TypeNode::cDescriptorTypeCreate() const { undefined( "cDescriptorTypeCreate" ); return PrimitiveDecl::VoidDecl.cType(); } //////////////////////////////////////////////////////////////////////// const CtType &DomainTypeNode::cDescriptorTypeCreate() const { return DomainNDecl[ tiArity() - 1 ]->cDescriptorType(); } const CtType &PrimitiveTypeNode::cDescriptorTypeCreate() const { return ctValueDescriptor; } const CtType &PointTypeNode::cDescriptorTypeCreate() const { return PointNDecl[ tiArity() - 1 ]->cDescriptorType(); } const CtType &RectDomainTypeNode::cDescriptorTypeCreate() const { return RectDomainNDecl[ tiArity() - 1 ]->cDescriptorType(); } const CtType &TypeNameNode::cDescriptorTypeCreate() const { switch (kind()) { case ClassKind: return *new CtObjectDescriptor( *decl() ); case InterfaceKind: return CtObjectDescriptor::interfaceHeader; case ImmutableKind: return ctValueDescriptor; default: assert( 0 ); return PrimitiveDecl::VoidDecl.cType(); } }