Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ControlStruct/ExceptTranslate.cc

    rba3706f rc0b9f5d  
    211211                        ThrowStmt *throwStmt ) {
    212212                // __throw_terminate( `throwStmt->get_name()` ); }
    213                 return create_given_throw( "__cfaehm__throw_terminate", throwStmt );
     213                return create_given_throw( "__cfaabi_ehm__throw_terminate", throwStmt );
    214214        }
    215215
     
    232232                        ) ) );
    233233                result->push_back( new ExprStmt(
    234                         new UntypedExpr( new NameExpr( "__cfaehm__rethrow_terminate" ) )
     234                        new UntypedExpr( new NameExpr( "__cfaabi_ehm__rethrow_terminate" ) )
    235235                        ) );
    236236                delete throwStmt;
     
    241241                        ThrowStmt *throwStmt ) {
    242242                // __throw_resume( `throwStmt->get_name` );
    243                 return create_given_throw( "__cfaehm__throw_resume", throwStmt );
     243                return create_given_throw( "__cfaabi_ehm__throw_resume", throwStmt );
    244244        }
    245245
     
    309309                        local_except->get_attributes().push_back( new Attribute(
    310310                                "cleanup",
    311                                 { new NameExpr( "__cfaehm__cleanup_terminate" ) }
     311                                { new NameExpr( "__cfaabi_ehm__cleanup_terminate" ) }
    312312                                ) );
    313313
     
    316316                                VarExprReplacer::DeclMap mapping;
    317317                                mapping[ handler_decl ] = local_except;
    318                                 VarExprReplacer mapper( mapping );
    319                                 handler->get_body()->accept( mapper );
     318                                VarExprReplacer::replace( handler->body, mapping );
    320319                        }
    321320
     
    430429                        FunctionDecl * terminate_catch,
    431430                        FunctionDecl * terminate_match ) {
    432                 // { __cfaehm__try_terminate(`try`, `catch`, `match`); }
     431                // { __cfaabi_ehm__try_terminate(`try`, `catch`, `match`); }
    433432
    434433                UntypedExpr * caller = new UntypedExpr( new NameExpr(
    435                         "__cfaehm__try_terminate" ) );
     434                        "__cfaabi_ehm__try_terminate" ) );
    436435                std::list<Expression *>& args = caller->get_args();
    437436                args.push_back( nameOf( try_wrapper ) );
     
    487486
    488487                // struct __try_resume_node __resume_node
    489                 //      __attribute__((cleanup( __cfaehm__try_resume_cleanup )));
     488                //      __attribute__((cleanup( __cfaabi_ehm__try_resume_cleanup )));
    490489                // ** unwinding of the stack here could cause problems **
    491490                // ** however I don't think that can happen currently **
    492                 // __cfaehm__try_resume_setup( &__resume_node, resume_handler );
     491                // __cfaabi_ehm__try_resume_setup( &__resume_node, resume_handler );
    493492
    494493                std::list< Attribute * > attributes;
     
    496495                        std::list< Expression * > attr_params;
    497496                        attr_params.push_back( new NameExpr(
    498                                 "__cfaehm__try_resume_cleanup" ) );
     497                                "__cfaabi_ehm__try_resume_cleanup" ) );
    499498                        attributes.push_back( new Attribute( "cleanup", attr_params ) );
    500499                }
     
    515514
    516515                UntypedExpr *setup = new UntypedExpr( new NameExpr(
    517                         "__cfaehm__try_resume_setup" ) );
     516                        "__cfaabi_ehm__try_resume_setup" ) );
    518517                setup->get_args().push_back( new AddressExpr( nameOf( obj ) ) );
    519518                setup->get_args().push_back( nameOf( resume_handler ) );
     
    540539        ObjectDecl * ExceptionMutatorCore::create_finally_hook(
    541540                        FunctionDecl * finally_wrapper ) {
    542                 // struct __cfaehm__cleanup_hook __finally_hook
     541                // struct __cfaabi_ehm__cleanup_hook __finally_hook
    543542                //      __attribute__((cleanup( finally_wrapper )));
    544543
     
    594593                        // Skip children?
    595594                        return;
    596                 } else if ( structDecl->get_name() == "__cfaehm__base_exception_t" ) {
     595                } else if ( structDecl->get_name() == "__cfaabi_ehm__base_exception_t" ) {
    597596                        assert( nullptr == except_decl );
    598597                        except_decl = structDecl;
    599598                        init_func_types();
    600                 } else if ( structDecl->get_name() == "__cfaehm__try_resume_node" ) {
     599                } else if ( structDecl->get_name() == "__cfaabi_ehm__try_resume_node" ) {
    601600                        assert( nullptr == node_decl );
    602601                        node_decl = structDecl;
    603                 } else if ( structDecl->get_name() == "__cfaehm__cleanup_hook" ) {
     602                } else if ( structDecl->get_name() == "__cfaabi_ehm__cleanup_hook" ) {
    604603                        assert( nullptr == hook_decl );
    605604                        hook_decl = structDecl;
Note: See TracChangeset for help on using the changeset viewer.