- Timestamp:
- Jul 3, 2020, 4:50:21 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:
- aebf5b0
- Parents:
- 276f105
- Location:
- src/AST
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/AST/Pass.impl.hpp ¶
r276f105 rc15085d 28 28 /* setup the scope for passes that want to run code at exit */ \ 29 29 __attribute__((unused)) ast::__pass::guard_value guard2( ast::__pass::at_cleanup (pass, 0) ); \ 30 /* begin tracing memory allocation if requested by this pass */ \ 31 __pass::beginTrace( pass, 0 ); \ 30 32 /* call the implementation of the previsit of this pass */ \ 31 33 __pass::previsit( pass, node, 0 ); … … 42 44 auto __return = __pass::postvisit( pass, node, 0 ); \ 43 45 assertf(__return, "post visit should never return null"); \ 46 /* end tracing memory allocation if requested by this pass */ \ 47 __pass::endTrace( pass, 0 ); \ 44 48 return __return; 45 49 -
TabularUnified src/AST/Pass.proto.hpp ¶
r276f105 rc15085d 16 16 #pragma once 17 17 // IWYU pragma: private, include "Pass.hpp" 18 19 #include "Common/Stats/Heap.h" 18 20 19 21 namespace ast { … … 244 246 #undef FIELD_PTR 245 247 248 template< typename pass_t > 249 static inline auto beginTrace(pass_t & pass, int) -> decltype( pass_t::traceId, void() ) { 250 Stats::Heap::stacktrace_push(pass_t::traceId); 251 } 252 253 template< typename pass_t > 254 static inline auto endTrace(pass_t & pass, int) -> decltype( pass_t::traceId, void() ) { 255 Stats::Heap::stacktrace_pop(); 256 } 257 258 template< typename pass_t > 259 static void beginTrace(pass_t &, long) {} 260 261 template< typename pass_t > 262 static void endTrace(pass_t &, long) {} 263 246 264 // Another feature of the templated visitor is that it calls beginScope()/endScope() for compound statement. 247 265 // All passes which have such functions are assumed desire this behaviour -
TabularUnified src/AST/TypeSubstitution.cpp ¶
r276f105 rc15085d 18 18 19 19 namespace ast { 20 21 22 size_t TypeSubstitution::Substituter::traceId = Stats::Heap::new_stacktrace_id("TypeSubstitution"); 20 23 21 24 TypeSubstitution::TypeSubstitution() { -
TabularUnified src/AST/TypeSubstitution.hpp ¶
r276f105 rc15085d 160 160 // definitition must happen after PassVisitor is included so that WithGuards can be used 161 161 struct TypeSubstitution::Substituter : public WithGuards, public WithVisitorRef<Substituter> { 162 static size_t traceId; 162 163 163 164 Substituter( const TypeSubstitution & sub, bool freeOnly ) : sub( sub ), freeOnly( freeOnly ) {}
Note: See TracChangeset
for help on using the changeset viewer.