Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/GenPoly/Box.cpp

    rbe4335b r9ddcee1  
    2525#include "AST/GenericSubstitution.hpp" // for genericSubstitution
    2626#include "CodeGen/OperatorTable.h"     // for isAssignment
    27 #include "Common/Iterate.hpp"          // for group_iterate
    2827#include "Common/ScopedMap.h"          // for ScopedMap
    29 #include "Common/ToString.hpp"         // for toCString
    3028#include "Common/UniqueName.h"         // for UniqueName
     29#include "Common/utility.h"            // for toCString, group_iterate
    3130#include "GenPoly/FindFunction.h"      // for findFunction
    3231#include "GenPoly/GenPoly.h"           // for getFunctionType, ...
     
    237236        ) );
    238237        // 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.
    240239        for ( auto const & member : enumerate( decl->members ) ) {
    241240                auto dwt = member.val.strict_as<ast::DeclWithType>();
     
    310309        ) );
    311310        // TODO: Polymorphic types will be out of the union declaration scope.
    312         // This breaks invariants until it is corrected later.
    313311        for ( auto const & member : decl->members ) {
    314312                auto dwt = member.strict_as<ast::DeclWithType>();
     
    577575                if ( adapters.contains( mangleName ) ) continue;
    578576                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.
    581579                adapters.insert(
    582580                        mangleName,
     
    641639
    642640        TypeVarMap exprTypeVars;
     641        // TODO: Should this take into account the variables already bound in
     642        // scopeTypeVars ([ex] remove them from exprTypeVars)?
    643643        makeTypeVarMap( function, exprTypeVars );
    644644        auto dynRetType = isDynRet( function, exprTypeVars );
     
    15211521
    15221522// --------------------------------------------------------------------------
     1523// TODO: Ideally, there would be no floating nodes at all.
    15231524/// Corrects the floating nodes created in CallAdapter.
    15241525struct RewireAdapters final : public ast::WithGuards {
     
    18361837
    18371838        // Not all members of a polymorphic type are themselves of a polymorphic
    1838         // type; in this case the member expression should be wrapped and
     1839        // type; in this cas the member expression should be wrapped and
    18391840        // dereferenced to form an lvalue.
    18401841        if ( !isPolyType( memberType, scopeTypeVars ) ) {
Note: See TracChangeset for help on using the changeset viewer.