Goose  Diff

Differences From Artifact [cae9dfca8c]:

  • File bs/builtins/types/template/build.cpp — part of check-in [d2c4e27b15] at 2019-03-02 12:33:24 on branch trunk — llr: added predicates to quickly test if an llr element is suitable for compilation time execution, or for eager evaluation. (user: achavasse size: 1559)

To Artifact [3e730f7617]:

  • File bs/builtins/types/template/build.cpp — part of check-in [e87aad0ef1] at 2019-03-03 15:00:39 on branch trunk — Added return types to function signatures, so that any TExpr constraint they may contain are taken into account during unification. (user: achavasse size: 1832)

38
39
40
41
42
43
44







45
46
47

48


49
50
51
52

            vt.push_back( move( *teSig ) );
            return true;
        } );

        if( !success )
            return nullopt;








        auto pToks = make_shared< vector< Term > >( move( body ) );
        return ToValue( TFunc( move( funcType ),

            TERM( make_shared< Vector >( vt.persistent(), false ) ),


            AppendToVectorTerm( c.identity(), TERM( id ) ),
            move( pToks ) ) );
    }
}







>
>
>
>
>
>
>



>
|
>
>




38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62

            vt.push_back( move( *teSig ) );
            return true;
        } );

        if( !success )
            return nullopt;

        auto rtSig = BuildTemplateSignature( c, ValueToIRExpr( returnType ) );
        if( !rtSig )
        {
            cout << "Invalid template return type or texpr.\n";
            return nullopt;
        }

        auto pToks = make_shared< vector< Term > >( move( body ) );
        return ToValue( TFunc( move( funcType ),
            TVEC(
                TERM( make_shared< Vector >( vt.persistent(), false ) ),
                *rtSig
            ),
            AppendToVectorTerm( c.identity(), TERM( id ) ),
            move( pToks ) ) );
    }
}