Changeset a5f0529 for src/Common


Ignore:
Timestamp:
Jul 26, 2017, 2:44:09 PM (7 years ago)
Author:
Andrew Beach <ajbeach@…>
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:
2edd80ae
Parents:
b947fb2
Message:

Virtual casts have been added. They still require a lot of hand coded support to work but for simple cases it should be enough.

Location:
src/Common
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/Common/PassVisitor.h

    rb947fb2 ra5f0529  
    8181        virtual void visit( NameExpr *nameExpr ) override final;
    8282        virtual void visit( CastExpr *castExpr ) override final;
     83        virtual void visit( VirtualCastExpr *castExpr ) override final;
    8384        virtual void visit( AddressExpr *addressExpr ) override final;
    8485        virtual void visit( LabelAddressExpr *labAddressExpr ) override final;
     
    168169        virtual Expression* mutate( LabelAddressExpr *labAddressExpr ) override final;
    169170        virtual Expression* mutate( CastExpr *castExpr ) override final;
     171        virtual Expression* mutate( VirtualCastExpr *castExpr ) override final;
    170172        virtual Expression* mutate( UntypedMemberExpr *memberExpr ) override final;
    171173        virtual Expression* mutate( MemberExpr *memberExpr ) override final;
  • src/Common/PassVisitor.impl.h

    rb947fb2 ra5f0529  
    607607
    608608template< typename pass_type >
     609void PassVisitor< pass_type >::visit( VirtualCastExpr * node ) {
     610        VISIT_BODY( node );
     611}
     612
     613template< typename pass_type >
    609614void PassVisitor< pass_type >::visit( AddressExpr * node ) {
    610615        VISIT_BODY( node );
     
    979984
    980985template< typename pass_type >
     986Expression * PassVisitor< pass_type >::mutate( VirtualCastExpr * node ) {
     987        MUTATE_BODY( Expression, node );
     988}
     989
     990template< typename pass_type >
    981991Expression * PassVisitor< pass_type >::mutate( UntypedMemberExpr * node ) {
    982992        MUTATE_BODY( Expression, node );
Note: See TracChangeset for help on using the changeset viewer.