Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/Box.cc

    r2ae171d8 r9b18044  
    141141                        virtual StructDecl *mutate( StructDecl *structDecl ) override;
    142142                        virtual UnionDecl *mutate( UnionDecl *unionDecl ) override;
     143                        virtual TraitDecl *mutate( TraitDecl *unionDecl ) override;
    143144                        virtual TypeDecl *mutate( TypeDecl *typeDecl ) override;
    144145                        virtual TypedefDecl *mutate( TypedefDecl *typedefDecl ) override;
     
    216217                  private:
    217218                };
    218 
    219219        } // anonymous namespace
    220220
     
    896896                                addAdapterParams( adapteeApp, arg, param, adapterType->get_parameters().end(), realParam, tyVars );
    897897                                bodyStmt = new ExprStmt( noLabels, adapteeApp );
    898 //                      } else if ( isPolyType( adaptee->get_returnVals().front()->get_type(), tyVars ) ) {
    899898                        } else if ( isDynType( adaptee->get_returnVals().front()->get_type(), tyVars ) ) {
    900899                                // return type T
     
    13521351                }
    13531352
     1353                TraitDecl * Pass2::mutate( TraitDecl *aggDecl ) {
     1354                        return handleAggDecl( aggDecl );
     1355                }
     1356
    13541357                TypeDecl * Pass2::mutate( TypeDecl *typeDecl ) {
    13551358                        addToTyVarMap( typeDecl, scopeTyVars );
     
    13771380                Type *Pass2::mutate( FunctionType *funcType ) {
    13781381                        scopeTyVars.beginScope();
     1382
    13791383                        makeTyVarMap( funcType, scopeTyVars );
    13801384
     
    15501554                                        // (alloca was previously used, but can't be safely used in loops)
    15511555                                        Type *declType = objectDecl->get_type();
    1552                                         std::string bufName = bufNamer.newName();
    1553                                         ObjectDecl *newBuf = new ObjectDecl( bufName, Type::StorageClasses(), LinkageSpec::C, 0,
     1556                                        ObjectDecl *newBuf = new ObjectDecl( bufNamer.newName(), Type::StorageClasses(), LinkageSpec::C, 0,
    15541557                                                new ArrayType( Type::Qualifiers(), new BasicType( Type::Qualifiers(), BasicType::Kind::Char), new NameExpr( sizeofName( mangleType(declType) ) ),
    1555                                                 true, false, std::list<Attribute*>{ new Attribute( std::string{"aligned"}, std::list<Expression*>{ new ConstantExpr( Constant::from_int(8) ) } ) } ), 0 );
     1558                                                true, false, std::list<Attribute*>{ new Attribute( "aligned", std::list<Expression*>{ new ConstantExpr( Constant::from_int(8) ) } ) } ), 0 );
    15561559                                        stmtsToAdd.push_back( new DeclStmt( noLabels, newBuf ) );
    15571560
    15581561                                        delete objectDecl->get_init();
    1559 
    1560                                         objectDecl->set_init( new SingleInit( new NameExpr( bufName ) ) );
     1562                                        objectDecl->set_init( new SingleInit( new VariableExpr( newBuf ) ) );
    15611563                                }
    15621564                        }
Note: See TracChangeset for help on using the changeset viewer.