Goose  Diff

Differences From Artifact [de358cc8a2]:

  • File bs/builtins/types/decl.cpp — part of check-in [aee388d9c0] at 2019-08-09 19:54:22 on branch trunk — Cleanup: got rid of the half-assed location and poisoning systems in ir::Terms. (user: achavasse size: 1352)

To Artifact [921ce15983]:

  • File bs/builtins/types/decl.cpp — part of check-in [27fc719d74] at 2019-08-16 14:48:20 on branch trunk — Added a new type of template expression: TVec, along with a helper function to make it possible for parametric types to be constructed either normally or as a template expression when passed template parameters. Only used by LocalVar for now, parametric runtime types require some refactoring. (user: achavasse size: 1350)

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40

        return !!result;
    }

    const Term& Decl::PatternTypeT::GetPattern()
    {
        static auto pattern = ValueToIRExpr(
            Value( TypeType(), TVEC( TSID( decl ), MkHole( "T"_sid ) ) ) );

        return pattern;
    }
}

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

    Value Bridge< Decl >::ToValue( const 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
33
34
35
36
37
38
39
40

        return !!result;
    }

    const Term& Decl::PatternTypeT::GetPattern()
    {
        static auto pattern = ValueToIRExpr(
            Value( TypeType(), VEC( TSID( decl ), MkHole( "T"_sid ) ) ) );

        return pattern;
    }
}

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

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