Changeset 9e23b446 for src/ResolvExpr
- Timestamp:
- Jul 25, 2022, 2:23:00 PM (2 years ago)
- Branches:
- ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
- Children:
- ffec1bf
- Parents:
- 76a798d
- Location:
- src/ResolvExpr
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ResolvExpr/CandidateFinder.cpp
r76a798d r9e23b446 1265 1265 newExpr, copy( tenv ), ast::OpenVarSet{}, ast::AssertionSet{}, Cost::zero, 1266 1266 cost ); 1267 1268 if (newCand->expr->env) { 1269 newCand->env.add(*newCand->expr->env); 1270 auto mutExpr = newCand->expr.get_and_mutate(); 1271 mutExpr->env = nullptr; 1272 newCand->expr = mutExpr; 1273 } 1274 1267 1275 PRINT( 1268 1276 std::cerr << "decl is "; -
src/ResolvExpr/Resolver.cc
r76a798d r9e23b446 1555 1555 if ( type->dimension ) { 1556 1556 ast::ptr< ast::Type > sizeType = context.global.sizeType; 1557 ast::ptr< ast::Expr > dimension = findSingleExpression( type->dimension, sizeType, context ); 1558 assertf(dimension->env->empty(), "array dimension expr has nonempty env"); 1559 dimension.get_and_mutate()->env = nullptr; 1557 1560 ast::mutate_field( 1558 1561 type, &PtrType::dimension, 1559 findSingleExpression( type->dimension, sizeType, context ));1562 dimension); 1560 1563 } 1561 1564 return type; … … 2008 2011 tmp->accept( *visitor ); 2009 2012 } 2013 else if (expr->env && expr->env->empty()) { 2014 expr = ast::mutate_field(expr.get(), &ast::Expr::env, nullptr); 2015 } 2010 2016 } 2011 2017 }
Note: See TracChangeset
for help on using the changeset viewer.