Changeset 9407ed8


Ignore:
Timestamp:
Feb 17, 2016, 3:08:16 PM (9 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
Children:
a73d57a
Parents:
5c52b06
Message:

Fixed unnecessary address-of for polymorphic objects

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/Box.cc

    r5c52b06 r9407ed8  
    557557                        assert( ! arg->get_results().empty() );
    558558                        if ( isPolyType( param, exprTyVars ) ) {
    559                                 if ( dynamic_cast< TypeInstType *>( arg->get_results().front() ) ) {
    560                                         // if the argument's type is a type parameter, we don't need to box again!
     559                                if ( isPolyType( arg->get_results().front() ) ) {
     560                                        // if the argument's type is polymorphic, we don't need to box again!
    561561                                        return;
    562562                                } else if ( arg->get_results().front()->get_isLvalue() ) {
Note: See TracChangeset for help on using the changeset viewer.