Changeset 75308bcc
- Timestamp:
- May 30, 2018, 3:57:01 PM (5 years ago)
- Branches:
- new-env, with_gc
- Children:
- 8e18b8e
- Parents:
- 8a1289f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Tuples/Explode.h
r8a1289f r75308bcc 84 84 // tuple type, but not tuple expr - recursively index into its components. 85 85 // if expr type is reference, convert to value type 86 Expression * arg = expr ->clone();86 Expression * arg = expr; 87 87 if ( Tuples::maybeImpureIgnoreUnique( arg ) ) { 88 88 // expressions which may contain side effects require a single unique instance of the expression. … … 94 94 } 95 95 for ( unsigned int i = 0; i < tupleType->size(); i++ ) { 96 TupleIndexExpr * idx = new TupleIndexExpr( arg ->clone(), i );96 TupleIndexExpr * idx = new TupleIndexExpr( arg, i ); 97 97 explodeUnique( idx, alt, indexer, std::forward<Output>(out), isTupleAssign ); 98 98 } 99 99 } 100 100 } else { 101 // atomic (non-tuple) type - output a clone ofthe expression in a new alternative102 append( std::forward<Output>(out), expr ->clone(), alt.env, alt.cost, alt.cvtCost );101 // atomic (non-tuple) type - output the expression in a new alternative 102 append( std::forward<Output>(out), expr, alt.env, alt.cost, alt.cvtCost ); 103 103 } 104 104 }
Note: See TracChangeset
for help on using the changeset viewer.