Changes in src/Tuples/Explode.h [490ff5c3:75308bcc]
- File:
-
- 1 edited
-
src/Tuples/Explode.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Tuples/Explode.h
r490ff5c3 r75308bcc 27 27 namespace SymTab { 28 28 class Indexer; 29 } // namespace SymTab 29 } // namespace SymTabf 30 30 31 31 namespace Tuples { … … 67 67 for ( ResolvExpr::Alternative & alt : alts ) { 68 68 // distribute reference cast over all components 69 append( std::forward<Output>(out), distributeReference( alt. release_expr()),69 append( std::forward<Output>(out), distributeReference( alt.expr ), 70 70 alt.env, alt.cost, alt.cvtCost ); 71 71 } … … 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 delete idx;99 98 } 100 delete arg;101 99 } 102 100 } else { 103 // atomic (non-tuple) type - output a clone ofthe expression in a new alternative104 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 ); 105 103 } 106 104 }
Note:
See TracChangeset
for help on using the changeset viewer.