Ignore:
Timestamp:
Jul 26, 2017, 4:26:08 PM (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:
2afec66
Parents:
d335627
Message:

Fix various reference features.

  • Eliminate multiple address-ofs resulting from &(T&) [address-of reference-cast].
  • Keep rvalue cast if reference base type is incompatible with rvalue type.
  • Keep pointer qualifiers when eliminating reference types.
  • Add VariableExpr::functionPointer helper function to create variable expressions with function pointer type.
  • Change ConstructorExpr? translation so that it temporarily generates a 'fake' assignment operator rather than use UntypedExpr?, so that the correct transformations occur in the Lvalue pass. This is a hack that can be fixed once PassVisitor? properly supports Indexer.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/Expression.h

    rd335627 r8a6cf7e  
    259259        void set_var( DeclarationWithType * newValue ) { var = newValue; }
    260260
     261        static VariableExpr * functionPointer( FunctionDecl * decl );
     262
    261263        virtual VariableExpr * clone() const { return new VariableExpr( * this ); }
    262264        virtual void accept( Visitor & v ) { v.visit( this ); }
Note: See TracChangeset for help on using the changeset viewer.