- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/ControlStruct/ExceptTranslate.cc
rba3706f rc0b9f5d 211 211 ThrowStmt *throwStmt ) { 212 212 // __throw_terminate( `throwStmt->get_name()` ); } 213 return create_given_throw( "__cfa ehm__throw_terminate", throwStmt );213 return create_given_throw( "__cfaabi_ehm__throw_terminate", throwStmt ); 214 214 } 215 215 … … 232 232 ) ) ); 233 233 result->push_back( new ExprStmt( 234 new UntypedExpr( new NameExpr( "__cfa ehm__rethrow_terminate" ) )234 new UntypedExpr( new NameExpr( "__cfaabi_ehm__rethrow_terminate" ) ) 235 235 ) ); 236 236 delete throwStmt; … … 241 241 ThrowStmt *throwStmt ) { 242 242 // __throw_resume( `throwStmt->get_name` ); 243 return create_given_throw( "__cfa ehm__throw_resume", throwStmt );243 return create_given_throw( "__cfaabi_ehm__throw_resume", throwStmt ); 244 244 } 245 245 … … 309 309 local_except->get_attributes().push_back( new Attribute( 310 310 "cleanup", 311 { new NameExpr( "__cfa ehm__cleanup_terminate" ) }311 { new NameExpr( "__cfaabi_ehm__cleanup_terminate" ) } 312 312 ) ); 313 313 … … 316 316 VarExprReplacer::DeclMap mapping; 317 317 mapping[ handler_decl ] = local_except; 318 VarExprReplacer mapper( mapping ); 319 handler->get_body()->accept( mapper ); 318 VarExprReplacer::replace( handler->body, mapping ); 320 319 } 321 320 … … 430 429 FunctionDecl * terminate_catch, 431 430 FunctionDecl * terminate_match ) { 432 // { __cfa ehm__try_terminate(`try`, `catch`, `match`); }431 // { __cfaabi_ehm__try_terminate(`try`, `catch`, `match`); } 433 432 434 433 UntypedExpr * caller = new UntypedExpr( new NameExpr( 435 "__cfa ehm__try_terminate" ) );434 "__cfaabi_ehm__try_terminate" ) ); 436 435 std::list<Expression *>& args = caller->get_args(); 437 436 args.push_back( nameOf( try_wrapper ) ); … … 487 486 488 487 // struct __try_resume_node __resume_node 489 // __attribute__((cleanup( __cfa ehm__try_resume_cleanup )));488 // __attribute__((cleanup( __cfaabi_ehm__try_resume_cleanup ))); 490 489 // ** unwinding of the stack here could cause problems ** 491 490 // ** however I don't think that can happen currently ** 492 // __cfa ehm__try_resume_setup( &__resume_node, resume_handler );491 // __cfaabi_ehm__try_resume_setup( &__resume_node, resume_handler ); 493 492 494 493 std::list< Attribute * > attributes; … … 496 495 std::list< Expression * > attr_params; 497 496 attr_params.push_back( new NameExpr( 498 "__cfa ehm__try_resume_cleanup" ) );497 "__cfaabi_ehm__try_resume_cleanup" ) ); 499 498 attributes.push_back( new Attribute( "cleanup", attr_params ) ); 500 499 } … … 515 514 516 515 UntypedExpr *setup = new UntypedExpr( new NameExpr( 517 "__cfa ehm__try_resume_setup" ) );516 "__cfaabi_ehm__try_resume_setup" ) ); 518 517 setup->get_args().push_back( new AddressExpr( nameOf( obj ) ) ); 519 518 setup->get_args().push_back( nameOf( resume_handler ) ); … … 540 539 ObjectDecl * ExceptionMutatorCore::create_finally_hook( 541 540 FunctionDecl * finally_wrapper ) { 542 // struct __cfa ehm__cleanup_hook __finally_hook541 // struct __cfaabi_ehm__cleanup_hook __finally_hook 543 542 // __attribute__((cleanup( finally_wrapper ))); 544 543 … … 594 593 // Skip children? 595 594 return; 596 } else if ( structDecl->get_name() == "__cfa ehm__base_exception_t" ) {595 } else if ( structDecl->get_name() == "__cfaabi_ehm__base_exception_t" ) { 597 596 assert( nullptr == except_decl ); 598 597 except_decl = structDecl; 599 598 init_func_types(); 600 } else if ( structDecl->get_name() == "__cfa ehm__try_resume_node" ) {599 } else if ( structDecl->get_name() == "__cfaabi_ehm__try_resume_node" ) { 601 600 assert( nullptr == node_decl ); 602 601 node_decl = structDecl; 603 } else if ( structDecl->get_name() == "__cfa ehm__cleanup_hook" ) {602 } else if ( structDecl->get_name() == "__cfaabi_ehm__cleanup_hook" ) { 604 603 assert( nullptr == hook_decl ); 605 604 hook_decl = structDecl;
Note:
See TracChangeset
for help on using the changeset viewer.