Goose  Diff

Differences From Artifact [bb76a7e996]:

  • File bs/builtins/types/runtime/array.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: 1606)

To Artifact [797461f729]:

  • File bs/builtins/types/runtime/array.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: 1605)

23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
    }
}

namespace empathy::ir
{
    Value Bridge< ArrayType >::ToValue( const ArrayType& a )
    {
        return Value( Type(), TVEC( TSID( rt_type ),
            TERM( llvm::ArrayType::get( GetLLVMType( *ValueFromIRExpr( a.m_containedType ) ), a.m_count ) ),
            TSID( array ), TERM( a.m_count ), a.m_containedType ) );
    }

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







|







23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
    }
}

namespace empathy::ir
{
    Value Bridge< ArrayType >::ToValue( const ArrayType& a )
    {
        return Value( Type(), VEC( TSID( rt_type ),
            TERM( llvm::ArrayType::get( GetLLVMType( *ValueFromIRExpr( a.m_containedType ) ), a.m_count ) ),
            TSID( array ), TERM( a.m_count ), a.m_containedType ) );
    }

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