Goose  Diff

Differences From Artifact [ec4dc2088c]:

  • File bs/builtins/types/decl.cpp — part of check-in [2e672cd033] at 2019-02-03 21:35:45 on branch trunk —
    • Moved decl and function invocation rules out of sema and into builtins, as it makes more sense.
    • Implemented a helper to determine if a tuple is a valid parameter list.
    (user: achavasse size: 1172)

To Artifact [a6aa2cb7d7]:

  • File bs/builtins/types/decl.cpp — part of check-in [c4c2aa50c1] at 2019-02-04 20:54:31 on branch trunk — Builtins: implemented some helpers to construct function types from parameter lists. (user: achavasse size: 1132)

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

        return !!result;
    }
}

namespace empathy::ir
{
    const Term& Bridge< Decl >::Type( const Term& declType )
    {
        static auto type = ValueToIRExpr( Value( TSID( type ), TVEC( TSID( decl ), declType ) ) );
        return type;
    }

    Value Bridge< Decl >::ToValue( Decl&& d )
    {
        return Value( Type( d.type() ), TERM( d.name() ) );
    }








|

|
<







16
17
18
19
20
21
22
23
24
25

26
27
28
29
30
31
32

        return !!result;
    }
}

namespace empathy::ir
{
    Term Bridge< Decl >::Type( const Term& declType )
    {
        return ValueToIRExpr( Value( TSID( type ), TVEC( TSID( decl ), declType ) ) );

    }

    Value Bridge< Decl >::ToValue( Decl&& d )
    {
        return Value( Type( d.type() ), TERM( d.name() ) );
    }