Ignore:
Timestamp:
May 15, 2017, 11:30:26 AM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
d36c117
Parents:
65aca88
Message:

initial work on references: reference types passed through the system, very simple examples work

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Concurrency/Keywords.cc

    r65aca88 rce8c12f  
    322322                if( needs_main ) {
    323323                        FunctionType * main_type = new FunctionType( noQualifiers, false );
    324                        
     324
    325325                        main_type->get_parameters().push_back( this_decl->clone() );
    326326
     
    361361        void ConcurrentSueKeyword::addRoutines( StructDecl * decl, ObjectDecl * field, FunctionDecl * func ) {
    362362                CompoundStmt * statement = new CompoundStmt( noLabels );
    363                 statement->push_back( 
     363                statement->push_back(
    364364                        new ReturnStmt(
    365365                                noLabels,
     
    386386        //=============================================================================================
    387387        void MutexKeyword::visit(FunctionDecl* decl) {
    388                 Visitor::visit(decl);           
     388                Visitor::visit(decl);
    389389
    390390                std::list<DeclarationWithType*> mutexArgs = findMutexArgs( decl );
     
    510510        void ThreadStarter::visit(FunctionDecl * decl) {
    511511                Visitor::visit(decl);
    512                
     512
    513513                if( ! InitTweak::isConstructor(decl->get_name()) ) return;
    514514
    515515                DeclarationWithType * param = decl->get_functionType()->get_parameters().front();
    516                 auto ptr = dynamic_cast< PointerType * >( param->get_type() );
    517                 // if( ptr ) std::cerr << "FRED1" << std::endl;
    518                 auto type  = dynamic_cast< StructInstType * >( ptr->get_base() );
     516                auto type  = dynamic_cast< StructInstType * >( InitTweak::getPointerBase( param->get_type() ) );
    519517                // if( type ) std::cerr << "FRED2" << std::endl;
    520518                if( type && type->get_baseStruct()->is_thread() ) {
     
    528526                if( ! stmt ) return;
    529527
    530                 stmt->push_back( 
     528                stmt->push_back(
    531529                        new ExprStmt(
    532530                                noLabels,
Note: See TracChangeset for help on using the changeset viewer.