Changeset 24e7b47 for src/GenPoly
- Timestamp:
- Oct 6, 2015, 3:34:01 PM (10 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, stuck-waitfor-destruct, with_gc
- Children:
- b0be06ac
- Parents:
- b762122 (diff), 8ee15ffd (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 edited
-
src/GenPoly/Specialize.cc (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/Specialize.cc
rb762122 r24e7b47 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Sat Jun 13 15:54:07201513 // Update Count : 611 // Last Modified By : Rob Schluntz 12 // Last Modified On : Tue Sep 22 14:04:13 2015 13 // Update Count : 15 14 14 // 15 15 … … 86 86 87 87 Expression * Specialize::doSpecialization( Type *formalType, Expression *actual, InferredParams *inferParams ) { 88 assert( ! actual->get_results().empty() ); 88 89 if ( needsSpecialization( formalType, actual->get_results().front(), env ) ) { 89 90 PointerType *ptrType; … … 167 168 Expression * Specialize::mutate( AddressExpr *addrExpr ) { 168 169 addrExpr->get_arg()->acceptMutator( *this ); 170 assert( ! addrExpr->get_results().empty() ); 169 171 addrExpr->set_arg( doSpecialization( addrExpr->get_results().front(), addrExpr->get_arg() ) ); 170 172 return addrExpr; … … 173 175 Expression * Specialize::mutate( CastExpr *castExpr ) { 174 176 castExpr->get_arg()->acceptMutator( *this ); 175 castExpr->set_arg( doSpecialization( castExpr->get_results().front(), castExpr->get_arg() ) ); 177 if ( ! castExpr->get_results().empty() ) { 178 // this may not be the correct condition, but previously the next statement 179 // was happening unchecked, causing a crash on a cast to void 180 castExpr->set_arg( doSpecialization( castExpr->get_results().front(), castExpr->get_arg() ) ); 181 } 176 182 return castExpr; 177 183 }
Note:
See TracChangeset
for help on using the changeset viewer.