Changeset ce8c12f for src/CodeGen


Ignore:
Timestamp:
May 15, 2017, 11:30:26 AM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
d36c117
Parents:
65aca88
Message:

initial work on references: reference types passed through the system, very simple examples work

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/GenType.cc

    r65aca88 rce8c12f  
    3737                virtual void visit( PointerType *pointerType );
    3838                virtual void visit( ArrayType *arrayType );
     39                virtual void visit( ReferenceType *refType );
    3940                virtual void visit( StructInstType *structInst );
    4041                virtual void visit( UnionInstType *unionInst );
     
    147148        }
    148149
     150        void GenType::visit( ReferenceType *refType ) {
     151                assert( refType->get_base() != 0);
     152                assertf( ! genC, "Reference types should not reach code generation." );
     153                handleQualifiers( refType );
     154                typeString = "&" + typeString;
     155                refType->get_base()->accept( *this );
     156        }
     157
    149158        void GenType::visit( FunctionType *funcType ) {
    150159                std::ostringstream os;
Note: See TracChangeset for help on using the changeset viewer.