Goose  Diff

Differences From Artifact [70d69a6d76]:

  • File bs/builtins/types/func/invoke.cpp — part of check-in [9320a3b76f] at 2019-06-17 22:00:11 on branch trunk — Pass the sema context to ParseFuncBody(), rather than just the env. (user: achavasse size: 3478)

To Artifact [867b64fef7]:

  • File bs/builtins/types/func/invoke.cpp — part of check-in [25e7ce2c8c] at 2019-06-23 14:01:38 on branch trunk — Functions are now recompiled for different execution domains as needed. (user: achavasse size: 3474)

56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
                }

                return invoke( c, callee, *bestSol, *bestUC );
            }

            optional< Value > invoke( const Context& c, const Value& callee, const Term& unifiedCallPat, UnificationContext& uc ) const final
            {
                if( !IsBuiltinFunc( callee ) && !ParseFuncBody( c, callee ) )
                    return nullopt;

                auto ppCallPat = Postprocess( unifiedCallPat, uc );
                if( !ppCallPat )
                    return nullopt;

                auto callDecomp = Decompose( *ppCallPat,







|







56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
                }

                return invoke( c, callee, *bestSol, *bestUC );
            }

            optional< Value > invoke( const Context& c, const Value& callee, const Term& unifiedCallPat, UnificationContext& uc ) const final
            {
                if( !IsBuiltinFunc( callee ) && !CompileFunc( c, callee ) )
                    return nullopt;

                auto ppCallPat = Postprocess( unifiedCallPat, uc );
                if( !ppCallPat )
                    return nullopt;

                auto callDecomp = Decompose( *ppCallPat,
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
            optional< Term > getSignature( const Value& callee ) const final
            {
                return GetFuncSig( callee );
            }

            optional< Value > prepareFunc( const Context& c, const Value& callee, const Term& unifiedCallPat, UnificationContext& uc ) const final
            {
                if( !IsBuiltinFunc( callee ) && !ParseFuncBody( c, callee ) )
                    return nullopt;

                return callee;
            }
    };

    void SetupFunctionInvocationRule( Env& e )







|







81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
            optional< Term > getSignature( const Value& callee ) const final
            {
                return GetFuncSig( callee );
            }

            optional< Value > prepareFunc( const Context& c, const Value& callee, const Term& unifiedCallPat, UnificationContext& uc ) const final
            {
                if( !IsBuiltinFunc( callee ) && !CompileFunc( c, callee ) )
                    return nullopt;

                return callee;
            }
    };

    void SetupFunctionInvocationRule( Env& e )