Goose  Diff

Differences From Artifact [48ff78cf99]:

  • File bs/sema/env.h — part of check-in [2370e98869] at 2021-03-02 22:51:58 on branch trunk — Removed magic "tuple of types to tuple type" conversions and moved them into extension points so that any type can implement similar semantics (user: achavasse size: 4836)

To Artifact [547f958572]:

  • File bs/sema/env.h — part of check-in [4b842721d2] at 2021-08-31 23:10:36 on branch trunk —
    • Added extension points to transform parameter types and function arguments
    • Fixed the incorrect type predicate type checking rule which should just preserve the argument's predicates as is
    • Fixed verification of return intructions that were checking the returned value's predicates, instead of the return type predicates (which happened to work anyway until the above fix)
    (user: achavasse size: 5291)

69
70
71
72
73
74
75






76
77
78
79
80
81
82

            auto& extLowerTypeForVerification() { return m_extLowerTypeForVerification; }
            const auto& extLowerTypeForVerification() const { return m_extLowerTypeForVerification; }

            auto& extLowerConstantForVerification() { return m_extLowerConstantForVerification; }
            const auto& extLowerConstantForVerification() const { return m_extLowerConstantForVerification; }







            template< typename... T >
            auto createCIRFunc( T&&... args )
            {
                ms_cirFuncs.emplace_back( make_shared< cir::Func >( forward< T >( args )... ) );
                return ms_cirFuncs.back();
            }








>
>
>
>
>
>







69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88

            auto& extLowerTypeForVerification() { return m_extLowerTypeForVerification; }
            const auto& extLowerTypeForVerification() const { return m_extLowerTypeForVerification; }

            auto& extLowerConstantForVerification() { return m_extLowerConstantForVerification; }
            const auto& extLowerConstantForVerification() const { return m_extLowerConstantForVerification; }

            auto& extConvertFuncParam() { return m_extConvertFuncParam; }
            const auto& extConvertFuncParam() const { return m_extConvertFuncParam; }

            auto& extConvertFuncArg() { return m_extConvertFuncArg; }
            const auto& extConvertFuncArg() const { return m_extConvertFuncArg; }

            template< typename... T >
            auto createCIRFunc( T&&... args )
            {
                ms_cirFuncs.emplace_back( make_shared< cir::Func >( forward< T >( args )... ) );
                return ms_cirFuncs.back();
            }

93
94
95
96
97
98
99



100
101
102
103
104
105
106
            ptr< OverloadSet >                  m_extDestroyValue;
            ptr< OverloadSet >                  m_extInitialize;

            ptr< OverloadSet >                  m_extLowerTypeForRuntime;
            ptr< OverloadSet >                  m_extLowerConstantForRuntime;
            ptr< OverloadSet >                  m_extLowerTypeForVerification;
            ptr< OverloadSet >                  m_extLowerConstantForVerification;




            uint64_t                            m_valueStoreVersion = 0;

            ptr< CTMemoryManager >              m_memManager;

            // CIR funcs form a cyclic graph, since functions can
            // be recursive or mutually recursive.







>
>
>







99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
            ptr< OverloadSet >                  m_extDestroyValue;
            ptr< OverloadSet >                  m_extInitialize;

            ptr< OverloadSet >                  m_extLowerTypeForRuntime;
            ptr< OverloadSet >                  m_extLowerConstantForRuntime;
            ptr< OverloadSet >                  m_extLowerTypeForVerification;
            ptr< OverloadSet >                  m_extLowerConstantForVerification;

            ptr< OverloadSet >                  m_extConvertFuncParam;
            ptr< OverloadSet >                  m_extConvertFuncArg;

            uint64_t                            m_valueStoreVersion = 0;

            ptr< CTMemoryManager >              m_memManager;

            // CIR funcs form a cyclic graph, since functions can
            // be recursive or mutually recursive.