Changeset 95642c9 for src/ResolvExpr
- Timestamp:
- May 18, 2018, 5:42:34 PM (7 years ago)
- 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/AlternativeFinder.cc
r6b8c4a8 r95642c9 1285 1285 AlternativeFinder finder( indexer, env ); 1286 1286 finder.targetType = toType; 1287 finder.findWithAdjustment( castExpr-> get_arg());1287 finder.findWithAdjustment( castExpr->arg ); 1288 1288 1289 1289 AltList candidates; … … 1296 1296 // that are cast directly. The candidate is invalid if it has fewer results than there are types to cast 1297 1297 // to. 1298 int discardedValues = alt.expr-> get_result()->size() - castExpr->get_result()->size();1298 int discardedValues = alt.expr->result->size() - castExpr->result->size(); 1299 1299 if ( discardedValues < 0 ) continue; 1300 1300 // xxx - may need to go into tuple types and extract relevant types and use unifyList. Note that currently, this does not 1301 1301 // allow casting a tuple to an atomic type (e.g. (int)([1, 2, 3])) 1302 1302 // 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, 1304 1304 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, 1306 1306 alt.env ); 1307 1307 PRINT( … … 1726 1726 // allow casting a tuple to an atomic type (e.g. (int)([1, 2, 3])) 1727 1727 // 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?? 1729 1729 1730 1730 Cost thisCost = castCost( alt.expr->get_result(), toType, indexer, newEnv );
Note: See TracChangeset
for help on using the changeset viewer.