Goose  Diff

Differences From Artifact [112e35cf5e]:

  • File bs/builtins/types/localvar/typecheck.cpp — part of check-in [9b8306c3af] at 2023-01-05 19:44:44 on branch trunk — Fixed passing tuple by value to functions, which involved properly handling type checking of constant tuples containing computed data and some codegen bugs (user: zlodo size: 1284)

To Artifact [cf6a7cd315]:

  • File bs/builtins/types/localvar/typecheck.cpp — part of check-in [d9414ddc6f] at 2023-03-28 19:44:45 on branch trunk — Get rid of the TCRINFOS macro, use std::source_location instead to remove some noise (user: zlodo size: 1274)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "builtins/builtins.h"

using namespace goose;
using namespace goose::eir;
using namespace goose::cir;

namespace goose::builtins
{
    void SetupLocalVarTypeChecking( Env& e )
    {
        auto localVarPattern = GetValueType< LocalVar >( ANYTERM( _ ) );

        // LocalVar type checking against another LocalVar: unify their types.
        e.typeCheckingRuleSet()->addTypeCheckingRule( TCRINFOS,

            ParamPat( localVarPattern ),

            ValueToEIR( ValuePattern(
                ANYTERM( _ ),
                localVarPattern,
                ANYTERM( _ ) ) ),













|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "builtins/builtins.h"

using namespace goose;
using namespace goose::eir;
using namespace goose::cir;

namespace goose::builtins
{
    void SetupLocalVarTypeChecking( Env& e )
    {
        auto localVarPattern = GetValueType< LocalVar >( ANYTERM( _ ) );

        // LocalVar type checking against another LocalVar: unify their types.
        e.typeCheckingRuleSet()->addTypeCheckingRule(

            ParamPat( localVarPattern ),

            ValueToEIR( ValuePattern(
                ANYTERM( _ ),
                localVarPattern,
                ANYTERM( _ ) ) ),