Goose  Diff

Differences From Artifact [ae46ea2692]:

  • File bs/builtins/api/compiler.cpp — part of check-in [972c1d8b47] at 2019-08-12 20:15:11 on branch trunk —
    • Implemented a system to temporarily silence error outputs.
    • Syntax errors now silence further errors encountered while parsing the same block and nested children blocks.
    • All errors are also silenced while speculatively attempting to evaluate invocations at compilation time.
    (user: achavasse size: 5826)

To Artifact [402cd0689a]:

  • File bs/builtins/api/compiler.cpp — part of check-in [59ecc02baa] at 2019-08-13 00:42:47 on branch trunk — Diagnostics: use value poisoning to (hopefully) fix most cases of superfluous cascading error messages. (user: achavasse size: 5954)

29
30
31
32
33
34
35

36
37
38
39
40
41
42
                    DiagnosticsManager::GetInstance().emitErrorMessage( 0,
                        format( "can't open '{}'.", filename ) );
                    return 0;
                }

                sema::Context c( pEnv.lock(), RootIdentity(), GetValueType< uint32_t >() );
                DiagnosticsContext dc( 0, true );


                auto r = make_shared< parse::Resolver >(
                    make_shared< lex::Lexer >( sourcefile, filename ), c );
                parse::Parser p( r );

                auto cfg = make_shared< llr::CFG >();
                p.setCFG( cfg );







>







29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
                    DiagnosticsManager::GetInstance().emitErrorMessage( 0,
                        format( "can't open '{}'.", filename ) );
                    return 0;
                }

                sema::Context c( pEnv.lock(), RootIdentity(), GetValueType< uint32_t >() );
                DiagnosticsContext dc( 0, true );
                VerbosityContext vc( Verbosity::Normal, true );

                auto r = make_shared< parse::Resolver >(
                    make_shared< lex::Lexer >( sourcefile, filename ), c );
                parse::Parser p( r );

                auto cfg = make_shared< llr::CFG >();
                p.setCFG( cfg );
86
87
88
89
90
91
92

93
94
95
96
97
98
99

                auto ftype = BuildFuncType( sema::DomainAny(), rt, params );

                // TODO at some point we'll want to pass the base identity to use as a param but
                // let's wait and see how the module and namespace stuff pans out first
                sema::Context c( pEnv.lock(), RootIdentity(), ftype.returnType() );
                DiagnosticsContext dc( 0, true );


                auto identity = AppendToVectorTerm( InjectDomainIntoIdentity( RootIdentity(), DomainRunTime() ),
                    TERM( StringId( pEnv.lock()->GetUniqueId() ) ) );
                auto func = BuildFunc( c, ftype, identity, params, make_shared< Vector >(), c );
                const auto& pFuncLLR = func.llr();

                ifstream sourcefile( filename.c_str() );







>







87
88
89
90
91
92
93
94
95
96
97
98
99
100
101

                auto ftype = BuildFuncType( sema::DomainAny(), rt, params );

                // TODO at some point we'll want to pass the base identity to use as a param but
                // let's wait and see how the module and namespace stuff pans out first
                sema::Context c( pEnv.lock(), RootIdentity(), ftype.returnType() );
                DiagnosticsContext dc( 0, true );
                VerbosityContext vc( Verbosity::Normal, true );

                auto identity = AppendToVectorTerm( InjectDomainIntoIdentity( RootIdentity(), DomainRunTime() ),
                    TERM( StringId( pEnv.lock()->GetUniqueId() ) ) );
                auto func = BuildFunc( c, ftype, identity, params, make_shared< Vector >(), c );
                const auto& pFuncLLR = func.llr();

                ifstream sourcefile( filename.c_str() );