Changeset 68cd1ce for src/GenPoly
- Timestamp:
- Jun 13, 2015, 8:30:25 AM (10 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
- Children:
- a1d5d2a
- Parents:
- 7bcf74e
- Location:
- src/GenPoly
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/Box.cc
r7bcf74e r68cd1ce 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue May 19 07:31:41201513 // Update Count : 112 // Last Modified On : Sat Jun 13 07:13:46 2015 13 // Update Count : 3 14 14 // 15 15 … … 26 26 #include "ScrubTyVars.h" 27 27 28 #include "SynTree/Declaration.h" 28 #include "Parser/ParseNode.h" 29 29 30 #include "SynTree/Type.h" 30 31 #include "SynTree/Expression.h" … … 32 33 #include "SynTree/Statement.h" 33 34 #include "SynTree/Mutator.h" 35 34 36 #include "ResolvExpr/TypeEnvironment.h" 37 35 38 #include "SymTab/Mangler.h" 36 39 … … 282 285 283 286 ObjectDecl *Pass1::makeTemporary( Type *type ) { 284 ObjectDecl *newObj = new ObjectDecl( tempNamer.newName(), Declaration ::NoStorageClass, LinkageSpec::C, 0, type, 0 );287 ObjectDecl *newObj = new ObjectDecl( tempNamer.newName(), DeclarationNode::NoStorageClass, LinkageSpec::C, 0, type, 0 ); 285 288 stmtsToAdd.push_back( new DeclStmt( noLabels, newObj ) ); 286 289 return newObj; … … 362 365 arg = new AddressExpr( arg ); 363 366 } else { 364 ObjectDecl *newObj = new ObjectDecl( tempNamer.newName(), Declaration ::NoStorageClass, LinkageSpec::C, 0, arg->get_results().front()->clone(), 0 );367 ObjectDecl *newObj = new ObjectDecl( tempNamer.newName(), DeclarationNode::NoStorageClass, LinkageSpec::C, 0, arg->get_results().front()->clone(), 0 ); 365 368 newObj->get_type()->get_qualifiers() = Type::Qualifiers(); 366 369 stmtsToAdd.push_back( new DeclStmt( noLabels, newObj ) ); … … 433 436 makeRetParm( adapter ); 434 437 } // if 435 adapter->get_parameters().push_front( new ObjectDecl( "", Declaration ::NoStorageClass, LinkageSpec::C, 0, new PointerType( Type::Qualifiers(), new FunctionType( Type::Qualifiers(), true ) ), 0 ) );438 adapter->get_parameters().push_front( new ObjectDecl( "", DeclarationNode::NoStorageClass, LinkageSpec::C, 0, new PointerType( Type::Qualifiers(), new FunctionType( Type::Qualifiers(), true ) ), 0 ) ); 436 439 return adapter; 437 440 } … … 521 524 adapterBody->get_kids().push_back( bodyStmt ); 522 525 std::string adapterName = makeAdapterName( mangleName ); 523 return new FunctionDecl( adapterName, Declaration ::NoStorageClass, LinkageSpec::C, adapterType, adapterBody, false );526 return new FunctionDecl( adapterName, DeclarationNode::NoStorageClass, LinkageSpec::C, adapterType, adapterBody, false ); 524 527 } 525 528 … … 902 905 if ( adaptersDone.find( mangleName ) == adaptersDone.end() ) { 903 906 std::string adapterName = makeAdapterName( mangleName ); 904 paramList.push_front( new ObjectDecl( adapterName, Declaration ::NoStorageClass, LinkageSpec::C, 0, new PointerType( Type::Qualifiers(), makeAdapterType( *funType, scopeTyVars ) ), 0 ) );907 paramList.push_front( new ObjectDecl( adapterName, DeclarationNode::NoStorageClass, LinkageSpec::C, 0, new PointerType( Type::Qualifiers(), makeAdapterType( *funType, scopeTyVars ) ), 0 ) ); 905 908 adaptersDone.insert( adaptersDone.begin(), mangleName ); 906 909 } … … 961 964 std::list< DeclarationWithType *>::iterator last = funcType->get_parameters().begin(); 962 965 std::list< DeclarationWithType *> inferredParams; 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 );966 ObjectDecl *newObj = new ObjectDecl( "", DeclarationNode::NoStorageClass, LinkageSpec::C, 0, new BasicType( Type::Qualifiers(), BasicType::LongUnsignedInt ), 0 ); 967 /// ObjectDecl *newFunPtr = new ObjectDecl( "", DeclarationNode::NoStorageClass, LinkageSpec::Cforall, 0, new PointerType( Type::Qualifiers(), new FunctionType( Type::Qualifiers(), true ) ), 0 ); 965 968 for ( std::list< TypeDecl *>::const_iterator tyParm = funcType->get_forall().begin(); tyParm != funcType->get_forall().end(); ++tyParm ) { 966 969 ObjectDecl *thisParm; -
src/GenPoly/Specialize.cc
r7bcf74e r68cd1ce 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue May 19 07:55:09201513 // Update Count : 412 // Last Modified On : Sat Jun 13 07:14:42 2015 13 // Update Count : 5 14 14 // 15 15 … … 19 19 #include "PolyMutator.h" 20 20 21 #include "SynTree/Declaration.h" 21 #include "Parser/ParseNode.h" 22 23 #include "SynTree/Expression.h" 22 24 #include "SynTree/Statement.h" 23 #include "SynTree/Expression.h"24 25 #include "SynTree/Type.h" 25 26 #include "SynTree/TypeSubstitution.h" … … 96 97 newEnv.applyFree( newType ); 97 98 } // if 98 FunctionDecl *thunkFunc = new FunctionDecl( thunkNamer.newName(), Declaration ::NoStorageClass, LinkageSpec::C, newType, new CompoundStmt( std::list< std::string >() ), false );99 FunctionDecl *thunkFunc = new FunctionDecl( thunkNamer.newName(), DeclarationNode::NoStorageClass, LinkageSpec::C, newType, new CompoundStmt( std::list< std::string >() ), false ); 99 100 thunkFunc->fixUniqueId(); 100 101
Note:
See TracChangeset
for help on using the changeset viewer.