Changeset 0a81c3f for src/GenPoly


Ignore:
Timestamp:
Jul 13, 2017, 1:44:58 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:
2463d0e
Parents:
c6976ba
Message:

Remove several missing-reference related hacks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/Box.cc

    rc6976ba r0a81c3f  
    758758                                        // if the argument's type is polymorphic, we don't need to box again!
    759759                                        return;
    760                                 } else if ( arg->get_result()->get_lvalue() ) {
     760                                } else if ( arg->get_result()->get_lvalue() ) {  // xxx - is this still right??
     761                                // xxx - dynamic_cast<ReferenceType *>( arg->get_result() )??
    761762                                        // VariableExpr and MemberExpr are lvalues; need to check this isn't coming from the second arg of a comma expression though (not an lvalue)
    762763                                        // xxx - need to test that this code is still reachable
     
    10361037                                                assert( appExpr->has_result() );
    10371038                                                assert( ! appExpr->get_args().empty() );
    1038                                                 if ( isPolyType( appExpr->get_result(), scopeTyVars, env ) ) {
     1039                                                if ( isPolyPtr( appExpr->get_result(), scopeTyVars, env ) ) { // dereference returns a reference type
     1040                                                        // remove dereference from polymorphic types since they are boxed.
    10391041                                                        Expression *ret = appExpr->get_args().front();
    10401042                                                        delete ret->get_result();
Note: See TracChangeset for help on using the changeset viewer.