Changeset b6838214 for src/Concurrency


Ignore:
Timestamp:
Jan 23, 2018, 5:46:43 PM (8 years ago)
Author:
Alan Kennedy <afakenne@…>
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:
258e6ad5
Parents:
b158d8f (diff), 15d248e (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:

add context switch for ARM

Location:
src/Concurrency
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/Concurrency/Keywords.cc

    rb158d8f rb6838214  
    257257        // Generic keyword implementation
    258258        //=============================================================================================
     259        void fixupGenerics(FunctionType * func, StructDecl * decl) {
     260                cloneAll(decl->parameters, func->forall);
     261                for ( TypeDecl * td : func->forall ) {
     262                        strict_dynamic_cast<StructInstType*>(
     263                                func->parameters.front()->get_type()->stripReferences()
     264                        )->parameters.push_back(
     265                                new TypeExpr( new TypeInstType( noQualifiers, td->name, td ) )
     266                        );
     267                }
     268        }
     269
    259270        void ConcurrentSueKeyword::postvisit(StructDecl * decl) {
    260271                if( decl->name == type_name && decl->body ) {
     
    301312                );
    302313
    303                 get_type->get_parameters().push_back( this_decl );
     314                get_type->get_parameters().push_back( this_decl->clone() );
    304315                get_type->get_returnVals().push_back(
    305316                        new ObjectDecl(
     
    318329                        )
    319330                );
     331                fixupGenerics(get_type, decl);
    320332
    321333                FunctionDecl * get_decl = new FunctionDecl(
     
    343355                                nullptr
    344356                        );
    345                 }
     357                        fixupGenerics(main_type, decl);
     358                }
     359
     360                delete this_decl;
    346361
    347362                declsToAddBefore.push_back( forward );
     
    377392                                        new MemberExpr(
    378393                                                field,
    379                                                 UntypedExpr::createDeref( new VariableExpr( func->get_functionType()->get_parameters().front() ) )
     394                                                new CastExpr(
     395                                                        new VariableExpr( func->get_functionType()->get_parameters().front() ),
     396                                                        func->get_functionType()->get_parameters().front()->get_type()->stripReferences()->clone()
     397                                                )
    380398                                        )
    381399                                )
  • src/Concurrency/Waitfor.cc

    rb158d8f rb6838214  
    507507                        new ListInit({
    508508                                new SingleInit( new AddressExpr( new VariableExpr( index ) ) ),
    509                                 new SingleInit( new VariableExpr( acceptables ) ),
    510                                 new SingleInit( new ConstantExpr( Constant::from_ulong( count ) ) )
     509                                new ListInit({
     510                                        new SingleInit( new VariableExpr( acceptables ) ),
     511                                        new SingleInit( new ConstantExpr( Constant::from_ulong( count ) ) )
     512                                })
    511513                        })
    512514                );
Note: See TracChangeset for help on using the changeset viewer.