- Timestamp:
- Jun 28, 2019, 3:50:21 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 03bf5c8
- Parents:
- 55b6476
- Location:
- src/AST
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Expr.cpp
r55b6476 r417117e 20 20 #include <vector> 21 21 22 #include "Eval.hpp" // for call 22 23 #include "GenericSubstitution.hpp" 23 24 #include "Stmt.hpp" … … 51 52 assert( arg ); 52 53 53 UntypedExpr * ret = new UntypedExpr{ 54 loc, new NameExpr{loc, "*?"}, std::vector<ptr<Expr>>{ ptr<Expr>{ arg } } 55 }; 54 UntypedExpr * ret = call( loc, "*?", arg ); 56 55 if ( const Type * ty = arg->result ) { 57 56 const Type * base = InitTweak::getPointerBase( ty ); … … 74 73 assert( lhs && rhs ); 75 74 76 UntypedExpr * ret = new UntypedExpr{ 77 loc, new NameExpr{loc, "?=?"}, std::vector<ptr<Expr>>{ ptr<Expr>{ lhs }, ptr<Expr>{ rhs } } 78 }; 75 UntypedExpr * ret = call( loc, "?=?", lhs, rhs ); 79 76 if ( lhs->result && rhs->result ) { 80 77 // if both expressions are typed, assumes that this assignment is a C bitwise assignment, -
src/AST/Pass.impl.hpp
r55b6476 r417117e 1920 1920 guard_symtab guard { *this }; 1921 1921 auto new_node = p.second->accept( *this ); 1922 if (new_node != p.second) mutated = false;1922 if (new_node != p.second) mutated = true; 1923 1923 new_map.insert({ p.first, new_node }); 1924 1924 } … … 1936 1936 guard_symtab guard { *this }; 1937 1937 auto new_node = p.second->accept( *this ); 1938 if (new_node != p.second) mutated = false;1938 if (new_node != p.second) mutated = true; 1939 1939 new_map.insert({ p.first, new_node }); 1940 1940 } -
src/AST/TypeSubstitution.cpp
r55b6476 r417117e 183 183 // bind type variables from generic type instantiations 184 184 if ( auto decl = type->aggr() ) { 185 const std::vector<ptr<TypeDecl>> &baseParameters = decl->params; 186 if (! type->params.empty()) { 187 for ( const TypeDecl * tyvar : baseParameters ) { 185 if ( ! type->params.empty() ) { 186 for ( const TypeDecl * tyvar : decl->params ) { 188 187 boundVars.insert( tyvar->name ); 189 188 } // for
Note: See TracChangeset
for help on using the changeset viewer.