Changeset 2f42718 for src/Concurrency


Ignore:
Timestamp:
Feb 22, 2019, 10:43:29 AM (7 years ago)
Author:
tdelisle <tdelisle@…>
Branches:
no_list
Parents:
43e0949
Message:

Parameters and return value of functions are now vectors (and some related clean-up)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Concurrency/Keywords.cc

    r43e0949 r2f42718  
    337337                );
    338338
    339                 get_type->get_parameters().push_back( this_decl->clone() );
    340                 get_type->get_returnVals().push_back(
     339                get_type->parameters.push_back( this_decl->clone() );
     340                get_type->returnVals.push_back(
    341341                        new ObjectDecl(
    342342                                "ret",
     
    371371                        FunctionType * main_type = new FunctionType( noQualifiers, false );
    372372
    373                         main_type->get_parameters().push_back( this_decl->clone() );
     373                        main_type->parameters.push_back( this_decl->clone() );
    374374
    375375                        main_decl = new FunctionDecl(
     
    405405                );
    406406
    407                 decl->get_members().push_back( field );
     407                decl->members.push_back( field );
    408408
    409409                return field;
     
    418418                                                field,
    419419                                                new CastExpr(
    420                                                         new VariableExpr( func->get_functionType()->get_parameters().front() ),
    421                                                         func->get_functionType()->get_parameters().front()->get_type()->stripReferences()->clone()
     420                                                        new VariableExpr( func->get_functionType()->parameters.front() ),
     421                                                        func->get_functionType()->parameters.front()->get_type()->stripReferences()->clone()
    422422                                                )
    423423                                        )
     
    449449                        // If this is the destructor for a monitor it must be mutex
    450450                        if(isDtor) {
    451                                 Type* ty = decl->get_functionType()->get_parameters().front()->get_type();
     451                                Type* ty = decl->get_functionType()->parameters.front()->get_type();
    452452
    453453                                // If it's a copy, it's not a mutex
     
    483483
    484484                // Check if we need to instrument the body
    485                 CompoundStmt* body = decl->get_statements();
     485                CompoundStmt* body = decl->statements;
    486486                if( ! body ) return;
    487487
     
    519519
    520520                bool once = true;
    521                 for( auto arg : decl->get_functionType()->get_parameters()) {
     521                for( auto arg : decl->get_functionType()->parameters) {
    522522                        //Find mutex arguments
    523523                        Type* ty = arg->get_type();
     
    681681                }
    682682
    683                 DeclarationWithType * param = decl->get_functionType()->get_parameters().front();
     683                DeclarationWithType * param = decl->get_functionType()->parameters.front();
    684684                auto type  = dynamic_cast< StructInstType * >( InitTweak::getPointerBase( param->get_type() ) );
    685685                if( type && type->get_baseStruct()->is_thread() ) {
Note: See TracChangeset for help on using the changeset viewer.