Goose  Diff

Differences From Artifact [e636bfc1ea]:

  • File bs/builtins/types/runtime/array.cpp — part of check-in [1f7039ee83] at 2019-07-16 20:06:39 on branch trunk — builtins:
    • fixed runtime type definitions.
    • added definitions for runtime struct types.
    (user: achavasse size: 1089)

To Artifact [eff6940e15]:

  • File bs/builtins/types/runtime/array.cpp — part of check-in [64244c6d0c] at 2019-07-22 14:50:03 on branch trunk — builtins: runtime types: added a common prefix to easily be able to check if a type is a runtime type. (user: achavasse size: 1144)

16
17
18
19
20
21
22
23
24
25
26
27
28
29

30
31
32
33
34
35
36
    }
}

namespace empathy::ir
{
    Value Bridge< RTArray >::ToValue( const RTArray& a )
    {
        return Value( Type(), TVEC( TSID( rt_array ), TERM( a.m_count ), a.m_containedType ) );
    }

    optional< RTArray > Bridge< RTArray >::FromValue( const Value& v )
    {
        auto result = Decompose( v.val(),
            Vec(

                Lit( "rt_array"_sid ),
                Val< uint64_t >(),
                SubTerm()
            )
        );

        if( !result )







|






>







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

namespace empathy::ir
{
    Value Bridge< RTArray >::ToValue( const RTArray& a )
    {
        return Value( Type(), TVEC( TSID( rt_type ), TSID( rt_array ), TERM( a.m_count ), a.m_containedType ) );
    }

    optional< RTArray > Bridge< RTArray >::FromValue( const Value& v )
    {
        auto result = Decompose( v.val(),
            Vec(
                Lit( "rt_type"_sid ),
                Lit( "rt_array"_sid ),
                Val< uint64_t >(),
                SubTerm()
            )
        );

        if( !result )