Changeset 5af7306
- Timestamp:
- Apr 23, 2018, 4:46:43 PM (7 years ago)
- Branches:
- new-env, with_gc
- Children:
- 2efe4b8
- Parents:
- fb97252f
- Location:
- src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Common/GC.cc
rfb97252f r5af7306 57 57 // set variable GC_TRAP_OBJ = <target> 58 58 // disable <first breakpoint> 59 // continue 59 60 #ifdef GC_TRAP 60 61 #include <csignal> -
src/InitTweak/GenInit.cc
rfb97252f r5af7306 258 258 // generic parameters should not play a role in determining whether a generic type is constructed - construct all generic types, so that 259 259 // polymorphic constructors make generic types managed types 260 StructInstType inst( Type::Qualifiers(), aggregateDecl );261 managedTypes.insert( SymTab::Mangler::mangleConcrete( &inst ) );260 auto inst = new StructInstType( Type::Qualifiers(), aggregateDecl ); 261 managedTypes.insert( SymTab::Mangler::mangleConcrete( inst ) ); 262 262 break; 263 263 } -
src/ResolvExpr/AlternativeFinder.cc
rfb97252f r5af7306 1082 1082 AlternativeFinder funcOpFinder( indexer, env ); 1083 1083 // it's ok if there aren't any defined function ops 1084 funcOpFinder.maybeFind( opExpr );1084 funcOpFinder.maybeFind( opExpr ); 1085 1085 PRINT( 1086 1086 std::cerr << "known function ops:" << std::endl; -
src/ResolvExpr/ConversionCost.cc
rfb97252f r5af7306 20 20 #include <string> // for operator==, string 21 21 22 #include "Common/GC.h" // for new_static_root 22 23 #include "ResolvExpr/Cost.h" // for Cost 23 24 #include "ResolvExpr/TypeEnvironment.h" // for EqvClass, TypeEnvironment … … 353 354 void ConversionCost::postvisit( EnumInstType * ) { 354 355 static Type::Qualifiers q; 355 static BasicType integer( q, BasicType::SignedInt );356 cost = costFunc( &integer, dest, indexer, env ); // safe if dest >= int356 static BasicType* integer = new_static_root<BasicType>( q, BasicType::SignedInt ); 357 cost = costFunc( integer, dest, indexer, env ); // safe if dest >= int 357 358 if ( cost < Cost::unsafe ) { 358 359 cost.incSafe(); -
src/SymTab/Validate.cc
rfb97252f r5af7306 48 48 #include "CodeGen/CodeGenerator.h" // for genName 49 49 #include "CodeGen/OperatorTable.h" // for isCtorDtor, isCtorDtorAssign 50 #include "Common/GC.h" // for new_static_root, register_static_root 50 51 #include "Common/PassVisitor.h" // for PassVisitor, WithDeclsToAdd 51 52 #include "Common/ScopedMap.h" // for ScopedMap … … 673 674 // grab and remember declaration of size_t 674 675 SizeType = eliminator.pass.typedefNames["size_t"].first->get_base()->clone(); 676 GC::get().register_static_root( SizeType ); 675 677 } else { 676 678 // xxx - missing global typedef for size_t - default to long unsigned int, even though that may be wrong 677 679 // eventually should have a warning for this case. 678 SizeType = new BasicType( Type::Qualifiers(), BasicType::LongUnsignedInt ); 680 SizeType = 681 new_static_root<BasicType>( Type::Qualifiers(), BasicType::LongUnsignedInt ); 679 682 } 680 683 filter( translationUnit, isTypedef ); -
src/SynTree/GcTracer.h
rfb97252f r5af7306 53 53 } 54 54 55 void postvisit( DeclarationWithType* decl ) { 56 maybeAccept( decl->asmName, *visitor ); 57 } 58 59 private: 60 void visit( InferredParams& inferParams ) { 61 for ( auto& entry : inferParams ) { 62 maybeAccept( entry.second.actualType, *visitor ); 63 maybeAccept( entry.second.formalType, *visitor ); 64 maybeAccept( entry.second.expr, *visitor ); 65 visit( *entry.second.inferParams ); 66 } 67 } 68 69 public: 55 70 void postvisit( Expression* expr ) { 56 71 maybeAccept( expr->env, *visitor ); 72 visit( expr->inferParams ); 57 73 } 58 74
Note: See TracChangeset
for help on using the changeset viewer.