Goose  Diff

Differences From Artifact [5b0edf56db]:

  • File bs/compiler.cpp — part of check-in [af650a9e95] at 2019-09-22 14:37:55 on branch trunk — Project renaming. (user: achavasse size: 3248)

To Artifact [df7930b8d2]:

  • File bs/compiler.cpp — part of check-in [4ae6912760] at 2019-09-29 22:30:12 on branch trunk —
    • Fixed some issues with implicit termination of void functions.
    • llr: give an index to each basic block, and keep track of back links towards previous blocks.
    (user: achavasse size: 3463)

111
112
113
114
115
116
117








118
119
120
        return cfg;

    if( !r->eos() )
    {
        DiagnosticsManager::GetInstance().emitSyntaxErrorMessage(
            r->getCurrentLocation(), "syntax error." );
    }









    return cfg;
}







>
>
>
>
>
>
>
>



111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
        return cfg;

    if( !r->eos() )
    {
        DiagnosticsManager::GetInstance().emitSyntaxErrorMessage(
            r->getCurrentLocation(), "syntax error." );
    }

    if( p.cfg()->currentBB() && !cfg->currentBB()->terminator() )
    {
        p.emitTerminator( llr::Ret() );

        if( returnType == GetValueType< void >() )
            p.emitTerminator( llr::Ret() );
    }

    return cfg;
}