Changeset 4550bcf
- Timestamp:
- Aug 14, 2015, 3:30:35 PM (9 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, string, with_gc
- Children:
- 4aa0858, 8a4da06, aa99647
- Parents:
- f32c7f4 (diff), 09f800b (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. - Location:
- src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/PolyMutator.cc
rf32c7f4 r4550bcf 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Rob Schluntz 12 // Last Modified On : Wed Jul 15 14:50:58201513 // Update Count : 312 // Last Modified On : Fri Aug 14 15:28:50 2015 13 // Update Count : 11 14 14 // 15 15 … … 20 20 #include "SynTree/Statement.h" 21 21 #include "SynTree/Mutator.h" 22 22 #include "SynTree/Initializer.h" 23 23 24 24 namespace GenPoly { … … 146 146 } 147 147 148 149 Initializer *PolyMutator::mutate( SingleInit *singleInit ) { 150 singleInit->set_value( mutateExpression( singleInit->get_value() ) ); 151 return singleInit; 152 } 153 154 148 155 /* static class method */ 149 156 void PolyMutator::makeTyVarMap( Type *type, TyVarMap &tyVarMap ) { -
src/GenPoly/PolyMutator.h
rf32c7f4 r4550bcf 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 : Tue May 19 07:46:45201513 // Update Count : 111 // Last Modified By : Rob Schluntz 12 // Last Modified On : Fri Aug 14 15:27:38 2015 13 // Update Count : 4 14 14 // 15 15 … … 45 45 46 46 virtual Expression* mutate(UntypedExpr *untypedExpr); 47 47 48 virtual Initializer* mutate(SingleInit *SingleInit); 49 48 50 // template method 49 51 virtual void doBeginScope() {} -
src/ResolvExpr/CastCost.cc
rf32c7f4 r4550bcf 66 66 67 67 void CastCost::visit( BasicType *basicType ) { 68 if ( dynamic_cast< PointerType* >( dest ) ) { 68 PointerType *destAsPointer = dynamic_cast< PointerType* >( dest ); 69 if ( destAsPointer && basicType->isInteger() ) { 69 70 cost = Cost( 1, 0, 0 ); 70 71 } else { … … 77 78 if ( pointerType->get_qualifiers() <= destAsPtr->get_qualifiers() && typesCompatibleIgnoreQualifiers( pointerType->get_base(), destAsPtr->get_base(), indexer, env ) ) { 78 79 cost = Cost( 0, 0, 1 ); 79 } else if ( BasicType *destAsBasic = dynamic_cast< BasicType* >( dest ) ) {80 if ( destAsBasic->isInteger() ) {81 cost = Cost( 1, 0, 0 );82 } // if83 80 } else { 84 81 TypeEnvironment newEnv( env ); … … 92 89 } // if 93 90 } // if 94 } // if 91 } else if ( BasicType *destAsBasic = dynamic_cast< BasicType* >( dest ) ) { 92 if ( destAsBasic->isInteger() ) { 93 cost = Cost( 1, 0, 0 ); 94 } // if 95 } 95 96 } 96 97 } // namespace ResolvExpr
Note: See TracChangeset
for help on using the changeset viewer.