Changeset 95642c9 for src/ResolvExpr


Ignore:
Timestamp:
May 18, 2018, 5:42:34 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, with_gc
Children:
cdb990a
Parents:
6b8c4a8
Message:

Minor cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/AlternativeFinder.cc

    r6b8c4a8 r95642c9  
    12851285                AlternativeFinder finder( indexer, env );
    12861286                finder.targetType = toType;
    1287                 finder.findWithAdjustment( castExpr->get_arg() );
     1287                finder.findWithAdjustment( castExpr->arg );
    12881288
    12891289                AltList candidates;
     
    12961296                        // that are cast directly.  The candidate is invalid if it has fewer results than there are types to cast
    12971297                        // to.
    1298                         int discardedValues = alt.expr->get_result()->size() - castExpr->get_result()->size();
     1298                        int discardedValues = alt.expr->result->size() - castExpr->result->size();
    12991299                        if ( discardedValues < 0 ) continue;
    13001300                        // xxx - may need to go into tuple types and extract relevant types and use unifyList. Note that currently, this does not
    13011301                        // allow casting a tuple to an atomic type (e.g. (int)([1, 2, 3]))
    13021302                        // unification run for side-effects
    1303                         unify( castExpr->get_result(), alt.expr->get_result(), alt.env, needAssertions,
     1303                        unify( castExpr->result, alt.expr->result, alt.env, needAssertions,
    13041304                                haveAssertions, openVars, indexer );
    1305                         Cost thisCost = castCost( alt.expr->get_result(), castExpr->get_result(), indexer,
     1305                        Cost thisCost = castCost( alt.expr->result, castExpr->result, indexer,
    13061306                                alt.env );
    13071307                        PRINT(
     
    17261726                                // allow casting a tuple to an atomic type (e.g. (int)([1, 2, 3]))
    17271727                                // unification run for side-effects
    1728                                 unify( toType, alt.expr->get_result(), newEnv, needAssertions, haveAssertions, openVars, indexer ); // xxx - do some inspecting on this line... why isn't result bound to initAlt.type??
     1728                                unify( toType, alt.expr->result, newEnv, needAssertions, haveAssertions, openVars, indexer ); // xxx - do some inspecting on this line... why isn't result bound to initAlt.type??
    17291729
    17301730                                Cost thisCost = castCost( alt.expr->get_result(), toType, indexer, newEnv );
Note: See TracChangeset for help on using the changeset viewer.