Goose  Diff

Differences From Artifact [ee91ff5a3a]:

  • File bs/builtins/types/overloadset/helpers.cpp — part of check-in [16dd587889] at 2021-11-16 21:18:12 on branch trunk — The details of creating a new visibility scope are now handled by the builder instead of being hardcoded in the parser (user: zlodo size: 3271)

To Artifact [dae12eceba]:

  • File bs/builtins/types/overloadset/helpers.cpp — part of check-in [3b954688f3] at 2022-01-07 20:02:04 on branch trunk —
    • Use non-experimental std::coroutine
    • Get rid of fmt lib, use std::format instead
    (user: zlodo size: 3289)

19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36

        switch( env.retrieveValue( identity, RootG0Identity(), result ) )
        {
            case sema::Env::Status::Success:
                return *FromValue< ptr< OverloadSet > >( *EIRToValue( result ) );

            case sema::Env::Status::NoMatch:
                G_ERROR( format( "fatal: overload set {} not found", name ) );

            case sema::Env::Status::AmbiguousMatch:
                G_ERROR( format( "fatal: ambiguous match for overload set {}", name ) );
        }

        return nullptr;
    }

    ptr< OverloadSet > GetOrCreateOverloadSet( Env& env, StringId name )
    {







|


|







19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36

        switch( env.retrieveValue( identity, RootG0Identity(), result ) )
        {
            case sema::Env::Status::Success:
                return *FromValue< ptr< OverloadSet > >( *EIRToValue( result ) );

            case sema::Env::Status::NoMatch:
                G_ERROR( format( "fatal: overload set {} not found", name.str() ) );

            case sema::Env::Status::AmbiguousMatch:
                G_ERROR( format( "fatal: ambiguous match for overload set {}", name.str() ) );
        }

        return nullptr;
    }

    ptr< OverloadSet > GetOrCreateOverloadSet( Env& env, StringId name )
    {
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
            {
                auto pOvlSet = make_shared< OverloadSet >( identity );
                env.storeValue( identity, ANYTERM( _ ), ValueToEIR( ToValue( pOvlSet ) ) );
                return pOvlSet;
            }

            case sema::Env::Status::AmbiguousMatch:
                G_ERROR( format( "fatal: ambiguous match for overload set {}", name ) );
        }

        return nullptr;
    }

    Value InvokeOverloadSet( const Context& c, const ptr< OverloadSet >& pOvlSet, Value args )
    {







|







47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
            {
                auto pOvlSet = make_shared< OverloadSet >( identity );
                env.storeValue( identity, ANYTERM( _ ), ValueToEIR( ToValue( pOvlSet ) ) );
                return pOvlSet;
            }

            case sema::Env::Status::AmbiguousMatch:
                G_ERROR( format( "fatal: ambiguous match for overload set {}", name.str() ) );
        }

        return nullptr;
    }

    Value InvokeOverloadSet( const Context& c, const ptr< OverloadSet >& pOvlSet, Value args )
    {