Changes in / [1ab4ce2:724c2b6]
- Location:
- src
- Files:
-
- 17 edited
-
CodeGen/FixNames.h (modified) (1 diff)
-
CodeGen/Generate.h (modified) (1 diff)
-
ControlStruct/CaseRangeMutator.h (modified) (1 diff)
-
ControlStruct/ChooseMutator.h (modified) (1 diff)
-
ControlStruct/LabelFixer.h (modified) (1 diff)
-
ControlStruct/Mutate.h (modified) (1 diff)
-
GenPoly/Box.cc (modified) (1 diff)
-
GenPoly/Box.h (modified) (1 diff)
-
GenPoly/CopyParams.h (modified) (1 diff)
-
GenPoly/Lvalue.h (modified) (1 diff)
-
GenPoly/Specialize.h (modified) (1 diff)
-
InitTweak/RemoveInit.h (modified) (1 diff)
-
ResolvExpr/Resolver.h (modified) (1 diff)
-
SymTab/FixFunction.h (modified) (1 diff)
-
SymTab/Validate.cc (modified) (7 diffs)
-
SymTab/Validate.h (modified) (1 diff)
-
SynTree/TypeSubstitution.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/CodeGen/FixNames.h
r1ab4ce2 r724c2b6 20 20 21 21 namespace CodeGen { 22 /// mangles object and function names 22 23 void fixNames( std::list< Declaration* > translationUnit ); 23 24 } // namespace CodeGen -
src/CodeGen/Generate.h
r1ab4ce2 r724c2b6 23 23 24 24 namespace CodeGen { 25 /// Generates code 25 26 void generate( std::list< Declaration* > translationUnit, std::ostream &os, bool doIntrinsics ); 26 27 } // namespace CodeGen -
src/ControlStruct/CaseRangeMutator.h
r1ab4ce2 r724c2b6 22 22 23 23 namespace ControlStruct { 24 /// expand case ranges and turn fallthru into a null statement 24 25 class CaseRangeMutator : public Mutator { 25 26 public: -
src/ControlStruct/ChooseMutator.h
r1ab4ce2 r724c2b6 22 22 23 23 namespace ControlStruct { 24 /// transform choose statements into switch statements 24 25 class ChooseMutator : public Mutator { 25 26 public: -
src/ControlStruct/LabelFixer.h
r1ab4ce2 r724c2b6 25 25 26 26 namespace ControlStruct { 27 /// normalizes label definitions and generates multi-level exit labels 27 28 class LabelFixer : public Visitor { 28 29 typedef Visitor Parent; -
src/ControlStruct/Mutate.h
r1ab4ce2 r724c2b6 23 23 24 24 namespace ControlStruct { 25 /// Desugars Cforall control structures 25 26 void mutate( std::list< Declaration* > translationUnit ); 26 27 } // namespace ControlStruct -
src/GenPoly/Box.cc
r1ab4ce2 r724c2b6 204 204 } 205 205 206 DeclarationWithType * 207 Pass1::mutate( FunctionDecl *functionDecl ) { 206 DeclarationWithType *Pass1::mutate( FunctionDecl *functionDecl ) { 208 207 if ( functionDecl->get_statements() ) { 209 208 TyVarMap oldtyVars = scopeTyVars; -
src/GenPoly/Box.h
r1ab4ce2 r724c2b6 21 21 22 22 namespace GenPoly { 23 /// boxes polymorphic function calls 23 24 void box( std::list< Declaration* >& translationUnit ); 24 25 } // namespace GenPoly -
src/GenPoly/CopyParams.h
r1ab4ce2 r724c2b6 20 20 21 21 namespace GenPoly { 22 /// Clones by-value parameters which have been passed by-reference for polymorphism 22 23 void copyParams( std::list< Declaration* > &translationUnit ); 23 24 } // namespace GenPoly -
src/GenPoly/Lvalue.h
r1ab4ce2 r724c2b6 22 22 23 23 namespace GenPoly { 24 /// replaces return type of `lvalue T` with `T*`, along with appropriate address-of and dereference operators 24 25 void convertLvalue( std::list< Declaration* >& translationUnit ); 25 26 } // namespace GenPoly -
src/GenPoly/Specialize.h
r1ab4ce2 r724c2b6 22 22 23 23 namespace GenPoly { 24 /// generates thunks where needed 24 25 void convertSpecializations( std::list< Declaration* >& translationUnit ); 25 26 } // namespace GenPoly -
src/InitTweak/RemoveInit.h
r1ab4ce2 r724c2b6 25 25 26 26 namespace InitTweak { 27 /// Adds assignment statements for polymorphic type initializers 27 28 void tweak( std::list< Declaration * > translationUnit ); 28 29 -
src/ResolvExpr/Resolver.h
r1ab4ce2 r724c2b6 21 21 22 22 namespace ResolvExpr { 23 /// Checks types and binds syntactic constructs to typed representations 23 24 void resolve( std::list< Declaration * > translationUnit ); 24 25 Expression *resolveInVoidContext( Expression *expr, const SymTab::Indexer &indexer ); -
src/SymTab/FixFunction.h
r1ab4ce2 r724c2b6 20 20 21 21 namespace SymTab { 22 /// Replaces function and array types by equivalent pointer types. 22 23 class FixFunction : public Mutator { 23 24 typedef Mutator Parent; -
src/SymTab/Validate.cc
r1ab4ce2 r724c2b6 60 60 class HoistStruct : public Visitor { 61 61 public: 62 /// Flattens nested struct types 62 63 static void hoistStruct( std::list< Declaration * > &translationUnit ); 63 64 … … 84 85 }; 85 86 87 /// Replaces enum types by int, and function or array types in function parameter and return lists by appropriate pointers 86 88 class Pass1 : public Visitor { 87 89 typedef Visitor Parent; … … 89 91 virtual void visit( FunctionType *func ); 90 92 }; 91 93 94 /// Associates forward declarations of aggregates with their definitions 92 95 class Pass2 : public Indexer { 93 96 typedef Indexer Parent; … … 110 113 }; 111 114 115 /// Replaces array and function types in forall lists by appropriate pointer type 112 116 class Pass3 : public Indexer { 113 117 typedef Indexer Parent; … … 123 127 class AddStructAssignment : public Visitor { 124 128 public: 129 /// Generates assignment operators for aggregate types as required 125 130 static void addStructAssignment( std::list< Declaration * > &translationUnit ); 126 131 … … 444 449 } 445 450 451 /// Fix up assertions 446 452 void forallFixer( Type *func ) { 447 // Fix up assertions448 453 for ( std::list< TypeDecl * >::iterator type = func->get_forall().begin(); type != func->get_forall().end(); ++type ) { 449 454 std::list< DeclarationWithType * > toBeDone, nextRound; … … 817 822 Type *ret = def->second.first->get_base()->clone(); 818 823 ret->get_qualifiers() += typeInst->get_qualifiers(); 824 // place instance parameters on the typedef'd type 825 if ( ! typeInst->get_parameters().empty() ) { 826 ReferenceToType *rtt = dynamic_cast<ReferenceToType*>(ret); 827 if ( ! rtt ) { 828 throw SemanticError("cannot apply type parameters to base type of " + typeInst->get_name()); 829 } 830 rtt->get_parameters().clear(); 831 cloneAll(typeInst->get_parameters(), rtt->get_parameters()); 832 } 819 833 delete typeInst; 820 834 return ret; -
src/SymTab/Validate.h
r1ab4ce2 r724c2b6 23 23 class Indexer; 24 24 25 /// Normalizes struct and function declarations 25 26 void validate( std::list< Declaration * > &translationUnit, bool doDebug = false ); 26 27 void validateType( Type *type, const Indexer *indexer ); -
src/SynTree/TypeSubstitution.h
r1ab4ce2 r724c2b6 157 157 } 158 158 159 // helper function 159 /// Instantiate each member of the context given the actual parameters specified, and store the 160 /// instantiations for use by the indexer 160 161 template< typename FormalIterator, typename ActualIterator, typename MemberIterator, typename OutputIterator > 161 162 void applySubstitution( FormalIterator formalBegin, FormalIterator formalEnd, ActualIterator actual, MemberIterator memberBegin, MemberIterator memberEnd, OutputIterator out ) { 162 // Instantiate each member of the context given the actual parameters specified, and store the163 // instantiations for use by the indexer164 165 163 TypeSubstitution sub = TypeSubstitution( formalBegin, formalEnd, actual ); 166 164 for ( std::list< Declaration* >::iterator i = memberBegin; i != memberEnd; ++i ) {
Note:
See TracChangeset
for help on using the changeset viewer.