Changes in src/GenPoly/Box.cc [68cd1ce:843054c2]
- File:
-
- 1 edited
-
src/GenPoly/Box.cc (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/Box.cc
r68cd1ce r843054c2 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Jun 13 07:13:46201513 // Update Count : 312 // Last Modified On : Tue May 19 07:31:41 2015 13 // Update Count : 1 14 14 // 15 15 … … 26 26 #include "ScrubTyVars.h" 27 27 28 #include "Parser/ParseNode.h" 29 28 #include "SynTree/Declaration.h" 30 29 #include "SynTree/Type.h" 31 30 #include "SynTree/Expression.h" … … 33 32 #include "SynTree/Statement.h" 34 33 #include "SynTree/Mutator.h" 35 36 34 #include "ResolvExpr/TypeEnvironment.h" 37 38 35 #include "SymTab/Mangler.h" 39 36 … … 285 282 286 283 ObjectDecl *Pass1::makeTemporary( Type *type ) { 287 ObjectDecl *newObj = new ObjectDecl( tempNamer.newName(), Declaration Node::NoStorageClass, LinkageSpec::C, 0, type, 0 );284 ObjectDecl *newObj = new ObjectDecl( tempNamer.newName(), Declaration::NoStorageClass, LinkageSpec::C, 0, type, 0 ); 288 285 stmtsToAdd.push_back( new DeclStmt( noLabels, newObj ) ); 289 286 return newObj; … … 365 362 arg = new AddressExpr( arg ); 366 363 } else { 367 ObjectDecl *newObj = new ObjectDecl( tempNamer.newName(), Declaration Node::NoStorageClass, LinkageSpec::C, 0, arg->get_results().front()->clone(), 0 );364 ObjectDecl *newObj = new ObjectDecl( tempNamer.newName(), Declaration::NoStorageClass, LinkageSpec::C, 0, arg->get_results().front()->clone(), 0 ); 368 365 newObj->get_type()->get_qualifiers() = Type::Qualifiers(); 369 366 stmtsToAdd.push_back( new DeclStmt( noLabels, newObj ) ); … … 436 433 makeRetParm( adapter ); 437 434 } // if 438 adapter->get_parameters().push_front( new ObjectDecl( "", Declaration Node::NoStorageClass, LinkageSpec::C, 0, new PointerType( Type::Qualifiers(), new FunctionType( Type::Qualifiers(), true ) ), 0 ) );435 adapter->get_parameters().push_front( new ObjectDecl( "", Declaration::NoStorageClass, LinkageSpec::C, 0, new PointerType( Type::Qualifiers(), new FunctionType( Type::Qualifiers(), true ) ), 0 ) ); 439 436 return adapter; 440 437 } … … 524 521 adapterBody->get_kids().push_back( bodyStmt ); 525 522 std::string adapterName = makeAdapterName( mangleName ); 526 return new FunctionDecl( adapterName, Declaration Node::NoStorageClass, LinkageSpec::C, adapterType, adapterBody, false );523 return new FunctionDecl( adapterName, Declaration::NoStorageClass, LinkageSpec::C, adapterType, adapterBody, false ); 527 524 } 528 525 … … 905 902 if ( adaptersDone.find( mangleName ) == adaptersDone.end() ) { 906 903 std::string adapterName = makeAdapterName( mangleName ); 907 paramList.push_front( new ObjectDecl( adapterName, Declaration Node::NoStorageClass, LinkageSpec::C, 0, new PointerType( Type::Qualifiers(), makeAdapterType( *funType, scopeTyVars ) ), 0 ) );904 paramList.push_front( new ObjectDecl( adapterName, Declaration::NoStorageClass, LinkageSpec::C, 0, new PointerType( Type::Qualifiers(), makeAdapterType( *funType, scopeTyVars ) ), 0 ) ); 908 905 adaptersDone.insert( adaptersDone.begin(), mangleName ); 909 906 } … … 964 961 std::list< DeclarationWithType *>::iterator last = funcType->get_parameters().begin(); 965 962 std::list< DeclarationWithType *> inferredParams; 966 ObjectDecl *newObj = new ObjectDecl( "", Declaration Node::NoStorageClass, LinkageSpec::C, 0, new BasicType( Type::Qualifiers(), BasicType::LongUnsignedInt ), 0 );967 /// ObjectDecl *newFunPtr = new ObjectDecl( "", Declaration Node::NoStorageClass, LinkageSpec::Cforall, 0, new PointerType( Type::Qualifiers(), new FunctionType( Type::Qualifiers(), true ) ), 0 );963 ObjectDecl *newObj = new ObjectDecl( "", Declaration::NoStorageClass, LinkageSpec::C, 0, new BasicType( Type::Qualifiers(), BasicType::LongUnsignedInt ), 0 ); 964 /// ObjectDecl *newFunPtr = new ObjectDecl( "", Declaration::NoStorageClass, LinkageSpec::Cforall, 0, new PointerType( Type::Qualifiers(), new FunctionType( Type::Qualifiers(), true ) ), 0 ); 968 965 for ( std::list< TypeDecl *>::const_iterator tyParm = funcType->get_forall().begin(); tyParm != funcType->get_forall().end(); ++tyParm ) { 969 966 ObjectDecl *thisParm;
Note:
See TracChangeset
for help on using the changeset viewer.