Changeset 396b830
- Timestamp:
- Oct 29, 2019, 3:54:14 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 1fcc2f3
- Parents:
- 3f3bfe5a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Pass.proto.hpp
r3f3bfe5a r396b830 311 311 SYMTAB_FUNC1( addUnion , const UnionDecl * ); 312 312 SYMTAB_FUNC1( addTrait , const TraitDecl * ); 313 SYMTAB_FUNC2( addWith , const std::vector< ptr<Expr> > &, const Node* );313 SYMTAB_FUNC2( addWith , const std::vector< ptr<Expr> > &, const Decl * ); 314 314 315 315 // A few extra functions have more complicated behaviour, they are hand written … … 363 363 // Some simple scoping rules 364 364 template<typename pass_t> 365 static inline auto enter( pass_t & pass, int, const ast::ParameterizedType * type ) 365 static inline auto enter( pass_t & pass, int, const ast::ParameterizedType * type ) 366 366 -> decltype( pass.subs, void() ) { 367 367 if ( ! type->forall.empty() ) pass.subs.beginScope(); … … 372 372 373 373 template<typename pass_t> 374 static inline auto leave( pass_t & pass, int, const ast::ParameterizedType * type ) 374 static inline auto leave( pass_t & pass, int, const ast::ParameterizedType * type ) 375 375 -> decltype( pass.subs, void() ) { 376 376 if ( ! type->forall.empty() ) { pass.subs.endScope(); } … … 385 385 return &pass.subs; 386 386 } 387 387 388 388 template<typename pass_t> 389 389 static inline ast::ForallSubstitutionTable * subs( pass_t &, long ) { return nullptr; } … … 391 391 // Replaces a TypeInstType's base TypeDecl according to the table 392 392 template<typename pass_t> 393 static inline auto replace( pass_t & pass, int, const ast::TypeInstType *& inst ) 393 static inline auto replace( pass_t & pass, int, const ast::TypeInstType *& inst ) 394 394 -> decltype( pass.subs, void() ) { 395 inst = ast::mutate_field( 395 inst = ast::mutate_field( 396 396 inst, &ast::TypeInstType::base, pass.subs.replace( inst->base ) ); 397 397 }
Note: See TracChangeset
for help on using the changeset viewer.