Changeset a8367eb for src


Ignore:
Timestamp:
Sep 16, 2021, 2:21:12 PM (3 years ago)
Author:
caparsons <caparson@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
Children:
4d8fbf4
Parents:
ce9f9d4
Message:

fixed mutexStmt bug related to pointers/references

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Concurrency/Keywords.cc

    rce9f9d4 ra8367eb  
    12001200                                new PointerType(
    12011201                                        noQualifiers,
    1202                                         new TypeofType( noQualifiers, args.front()->clone() )
     1202                                        //new TypeofType( noQualifiers, args.front()->clone() )
     1203                                        new TypeofType( noQualifiers, new UntypedExpr(
     1204                                                        new NameExpr( "__get_type" ),
     1205                                                        { args.front()->clone() }
     1206                                                )
     1207                                        )
    12031208                                ),
    12041209                                new ConstantExpr( Constant::from_ulong( args.size() ) ),
     
    12081213                        new ListInit(
    12091214                                map_range < std::list<Initializer*> > ( args, [](Expression * var ){
    1210                                         return new SingleInit( new AddressExpr( var ) );
     1215                                        return new SingleInit( new UntypedExpr(
     1216                                                        new NameExpr( "__get_ptr" ),
     1217                                                        { var }
     1218                                        ) );
     1219                                        //return new SingleInit( new AddressExpr( var ) );
    12111220                                })
    12121221                        )
     
    12141223
    12151224                StructInstType * lock_guard_struct = new StructInstType( noQualifiers, lock_guard_decl );
    1216                 TypeExpr * lock_type_expr = new TypeExpr( new TypeofType( noQualifiers, args.front()->clone() ) );
     1225                TypeExpr * lock_type_expr = new TypeExpr(
     1226                        new TypeofType( noQualifiers, new UntypedExpr(
     1227                                new NameExpr( "__get_type" ),
     1228                                { args.front()->clone() }
     1229                                )
     1230                        )
     1231                );
    12171232
    12181233                lock_guard_struct->parameters.push_back( lock_type_expr ) ;
Note: See TracChangeset for help on using the changeset viewer.