Changes in src/ResolvExpr/PolyCost.cc [3e5dd913:5aa4656]
- File:
-
- 1 edited
-
src/ResolvExpr/PolyCost.cc (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/PolyCost.cc
r3e5dd913 r5aa4656 58 58 59 59 // TODO: When the old PolyCost is torn out get rid of the _new suffix. 60 class PolyCost_new { 60 struct PolyCost_new { 61 int result; 61 62 const ast::SymbolTable &symtab; 62 public:63 int result;64 63 const ast::TypeEnvironment &env_; 65 64 66 PolyCost_new( const ast::SymbolTable & symtab, const ast::TypeEnvironment & env ) 67 : symtab( symtab ), result( 0), env_( env ) {}65 PolyCost_new( const ast::SymbolTable & symtab, const ast::TypeEnvironment & env ) : 66 result( 0 ), symtab( symtab ), env_( env ) {} 68 67 69 68 void previsit( const ast::TypeInstType * type ) { 70 if ( const ast::EqvClass * eqv = env_.lookup( *type ) ) /* && */ if ( eqv->bound ) {69 if ( const ast::EqvClass * eqv = env_.lookup( type->name ) ) /* && */ if ( eqv->bound ) { 71 70 if ( const ast::TypeInstType * otherType = eqv->bound.as< ast::TypeInstType >() ) { 72 71 if ( symtab.lookupType( otherType->name ) ) { … … 87 86 ast::Pass<PolyCost_new> costing( symtab, env ); 88 87 type->accept( costing ); 89 return costing. core.result;88 return costing.pass.result; 90 89 } 91 90
Note:
See TracChangeset
for help on using the changeset viewer.