Ignore:
Timestamp:
Aug 23, 2017, 6:22:07 PM (7 years ago)
Author:
Peter A. Buhr <pabuhr@…>
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:
87e08e24, cb811ac
Parents:
9f07232 (diff), bd37119 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg2:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Concurrency/Keywords.cc

    r9f07232 rd3e4d6c  
    2121#include "Common/SemanticError.h"  // for SemanticError
    2222#include "Common/utility.h"        // for deleteAll, map_range
    23 #include "InitTweak/InitTweak.h"   // for isConstructor
     23#include "CodeGen/OperatorTable.h" // for isConstructor
     24#include "InitTweak/InitTweak.h"   // for getPointerBase
    2425#include "Parser/LinkageSpec.h"    // for Cforall
    2526#include "SymTab/AddVisit.h"       // for acceptAndAdd
     
    289290                        LinkageSpec::Cforall,
    290291                        nullptr,
    291                         new PointerType(
     292                        new ReferenceType(
    292293                                noQualifiers,
    293294                                new StructInstType(
     
    445446
    446447                //Makes sure it's not a copy
    447                 PointerType* pty = dynamic_cast< PointerType * >( ty );
    448                 if( ! pty ) throw SemanticError( "Mutex argument must be of pointer/reference type ", arg );
     448                ReferenceType* rty = dynamic_cast< ReferenceType * >( ty );
     449                if( ! rty ) throw SemanticError( "Mutex argument must be of reference type ", arg );
    449450
    450451                //Make sure the we are pointing directly to a type
    451                 Type* base = pty->get_base();
    452                 if(  dynamic_cast< PointerType * >( base ) ) throw SemanticError( "Mutex argument have exactly one level of indirection ", arg );
     452                Type* base = rty->get_base();
     453                if( dynamic_cast< ReferenceType * >( base ) ) throw SemanticError( "Mutex argument have exactly one level of indirection ", arg );
     454                if( dynamic_cast< PointerType * >( base ) ) throw SemanticError( "Mutex argument have exactly one level of indirection ", arg );
    453455
    454456                //Make sure that typed isn't mutex
     
    520522                Visitor::visit(decl);
    521523
    522                 if( ! InitTweak::isConstructor(decl->get_name()) ) return;
     524                if( ! CodeGen::isConstructor(decl->get_name()) ) return;
    523525
    524526                DeclarationWithType * param = decl->get_functionType()->get_parameters().front();
    525                 auto ptr = dynamic_cast< PointerType * >( param->get_type() );
    526                 // if( ptr ) std::cerr << "FRED1" << std::endl;
    527                 auto type  = dynamic_cast< StructInstType * >( ptr->get_base() );
     527                auto type  = dynamic_cast< StructInstType * >( InitTweak::getPointerBase( param->get_type() ) );
    528528                // if( type ) std::cerr << "FRED2" << std::endl;
    529529                if( type && type->get_baseStruct()->is_thread() ) {
Note: See TracChangeset for help on using the changeset viewer.