Changes in src/GenPoly/Box.cpp [be4335b:9ddcee1]
- File:
-
- 1 edited
-
src/GenPoly/Box.cpp (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/Box.cpp
rbe4335b r9ddcee1 25 25 #include "AST/GenericSubstitution.hpp" // for genericSubstitution 26 26 #include "CodeGen/OperatorTable.h" // for isAssignment 27 #include "Common/Iterate.hpp" // for group_iterate28 27 #include "Common/ScopedMap.h" // for ScopedMap 29 #include "Common/ToString.hpp" // for toCString30 28 #include "Common/UniqueName.h" // for UniqueName 29 #include "Common/utility.h" // for toCString, group_iterate 31 30 #include "GenPoly/FindFunction.h" // for findFunction 32 31 #include "GenPoly/GenPoly.h" // for getFunctionType, ... … … 237 236 ) ); 238 237 // TODO: Polymorphic types will be out of the struct declaration scope. 239 // This breaks invariants until it is corrected later.238 // Should be removed by PolyGenericCalculator. 240 239 for ( auto const & member : enumerate( decl->members ) ) { 241 240 auto dwt = member.val.strict_as<ast::DeclWithType>(); … … 310 309 ) ); 311 310 // TODO: Polymorphic types will be out of the union declaration scope. 312 // This breaks invariants until it is corrected later.313 311 for ( auto const & member : decl->members ) { 314 312 auto dwt = member.strict_as<ast::DeclWithType>(); … … 577 575 if ( adapters.contains( mangleName ) ) continue; 578 576 std::string adapterName = makeAdapterName( mangleName ); 579 // NODE: This creates floating nodes, breaking invariants.580 // This is corrected in the RewireAdapters sub-pass.577 // TODO: The forwarding here is problematic because these 578 // declarations are not rooted anywhere in the translation unit. 581 579 adapters.insert( 582 580 mangleName, … … 641 639 642 640 TypeVarMap exprTypeVars; 641 // TODO: Should this take into account the variables already bound in 642 // scopeTypeVars ([ex] remove them from exprTypeVars)? 643 643 makeTypeVarMap( function, exprTypeVars ); 644 644 auto dynRetType = isDynRet( function, exprTypeVars ); … … 1521 1521 1522 1522 // -------------------------------------------------------------------------- 1523 // TODO: Ideally, there would be no floating nodes at all. 1523 1524 /// Corrects the floating nodes created in CallAdapter. 1524 1525 struct RewireAdapters final : public ast::WithGuards { … … 1836 1837 1837 1838 // Not all members of a polymorphic type are themselves of a polymorphic 1838 // type; in this cas ethe member expression should be wrapped and1839 // type; in this cas the member expression should be wrapped and 1839 1840 // dereferenced to form an lvalue. 1840 1841 if ( !isPolyType( memberType, scopeTypeVars ) ) {
Note:
See TracChangeset
for help on using the changeset viewer.