Goose  Diff

Differences From Artifact [4aff07bb69]:

  • File bs/builtins/types/localvar/localvar.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: 9608)

To Artifact [1a8f286986]:

  • File bs/builtins/types/localvar/localvar.cpp — part of check-in [4d4d76607a] at 2023-03-05 22:24:05 on branch trunk —
    • removed fmtlib, now use std::format
    • vastly improved the overload resolution debugging tools
    • prelude: started adding some extra error detection for small things that don't need to be builtin
    • prelude: started working on implementing #for for tuples, some stuff needs to be addressed still
    • fixed some type checking issue with wrapped args
    • fixed superfluous nested lifetime scope in brace blocks (which caused redundant calls to some extension points)
    (user: zlodo size: 9647)

46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
        {
            DiagnosticsContext dc( 0, "When invoking Initialize." );

            if( initializer )
            {
                initResult = InvokeOverloadSet( c,
                    c.env()->extInitialize(),
                    MakeClosedTuple( ToValue( lv ).setLocationId( locId ), *initializer ) );
            }
            else
            {
                initResult = InvokeOverloadSet( c,
                    c.env()->extInitialize(),
                    MakeClosedTuple( ToValue( lv ).setLocationId( locId ) ) );
            }
        }

        if( !initResult.isPoison() )
        {
            DiagnosticsContext dc2( initResult.locationId(), "When invoking DropValue." );
            InvokeOverloadSet( c, c.env()->extDropValue(),
                MakeClosedTuple( c.builder(), move( initResult ) ) );
        }

        auto locVar = ToValue( lv );
        auto identity = AppendToVectorTerm( c.identity(), name );

        c.env()->storeValue( identity, ANYTERM( _ ),
            ValueToEIR( locVar ) );







|





|







|







46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
        {
            DiagnosticsContext dc( 0, "When invoking Initialize." );

            if( initializer )
            {
                initResult = InvokeOverloadSet( c,
                    c.env()->extInitialize(),
                    MakeClosedTuple( ToValue( lv ).setLocationId( locId ), *initializer ), locId );
            }
            else
            {
                initResult = InvokeOverloadSet( c,
                    c.env()->extInitialize(),
                    MakeClosedTuple( ToValue( lv ).setLocationId( locId ) ), locId );
            }
        }

        if( !initResult.isPoison() )
        {
            DiagnosticsContext dc2( initResult.locationId(), "When invoking DropValue." );
            InvokeOverloadSet( c, c.env()->extDropValue(),
                MakeClosedTuple( c.builder(), move( initResult ) ), initResult.locationId() );
        }

        auto locVar = ToValue( lv );
        auto identity = AppendToVectorTerm( c.identity(), name );

        c.env()->storeValue( identity, ANYTERM( _ ),
            ValueToEIR( locVar ) );