Changeset 937e51d for src/GenPoly
- Timestamp:
- Jun 26, 2015, 4:00:26 PM (11 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, stuck-waitfor-destruct, with_gc
- Children:
- 0df292b, e0ff3e6
- Parents:
- eb50842 (diff), 1869adf (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. - Location:
- src/GenPoly
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/Box.cc
reb50842 r937e51d 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 09:12:19 2015 13 // Update Count : 4 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, 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
reb50842 r937e51d 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 15:54:07 2015 13 // Update Count : 6 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, false ); 99 100 thunkFunc->fixUniqueId(); 100 101 -
src/GenPoly/module.mk
reb50842 r937e51d 1 ######################### -*- Mode: Makefile-Gmake -*- ######################## 2 ## 3 ## Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo 4 ## 5 ## The contents of this file are covered under the licence agreement in the 6 ## file "LICENCE" distributed with Cforall. 7 ## 8 ## module.mk -- 9 ## 10 ## Author : Richard C. Bilson 11 ## Created On : Mon Jun 1 17:49:17 2015 12 ## Last Modified By : Peter A. Buhr 13 ## Last Modified On : Mon Jun 1 17:52:30 2015 14 ## Update Count : 1 15 ############################################################################### 16 1 17 SRC += GenPoly/Box.cc \ 2 18 GenPoly/GenPoly.cc \ … … 7 23 GenPoly/CopyParams.cc \ 8 24 GenPoly/FindFunction.cc 9
Note:
See TracChangeset
for help on using the changeset viewer.