Goose  Diff

Differences From Artifact [8de12512a6]:

  • File bs/builtins/types/template/tvar.cpp — part of check-in [0e66d22527] at 2019-03-30 15:30:31 on branch trunk —
    • Changed type's type representation to be able to pass types around as value anywhere.
    • Fixed a bunch of bugs.
    (user: achavasse size: 1471)

To Artifact [c402aa66eb]:

  • File bs/builtins/types/template/tvar.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: 1451)

1
2
3
4
5
6
7
8
9
10
11

12
13
14
15
16
17
18
19
20
21
22
23

24
25
26
27
28
29
30
1
2
3
4
5
6
7
8
9
10

11
12
13
14
15
16
17
18
19
20
21
22

23
24
25
26
27
28
29
30










-
+











-
+







#include "builtins/builtins.h"

using namespace empathy::builtins;

namespace empathy::builtins
{
    bool IsTExpr( const Value& te )
    {
        if( te.isConstant() )
        {
            const auto* ppVec = get_if< pvec >( &te.val().content() );
            const auto* ppVec = get_if< pvec >( &te.val() );
            if( ppVec && !( *ppVec )->empty()
                &&( **ppVec )[0] == TSID( texpr ) )
            {
                return true;
            }
        }

        auto typeVal = ValueFromIRExpr( te.type() );
        if( !typeVal )
            return false;

        const auto* ppVec = get_if< pvec >( &typeVal->val().content() );
        const auto* ppVec = get_if< pvec >( &typeVal->val() );
        if( !ppVec )
            return false;

        if( ( *ppVec )->empty() )
            return false;

        return ( **ppVec )[0] == TSID( texpr );