Differences From Artifact [1cb8ca46eb]:
- File
bs/builtins/api/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.
To Artifact [0b08aca32b]:
- File bs/builtins/api/compiler.cpp — part of check-in [0b95fe304a] at 2019-10-05 14:50:29 on branch trunk — verification: implemented a trace mode that only dumps the z3 expressions. (user: achavasse size: 7200)
1 2 3 4 5 6 7 8 9 | 1 2 3 4 5 6 7 8 9 10 | + |
#include "builtins/builtins.h"
#include "parse/parse.h"
#include "analyze/analyze.h"
#include "execute/execute.h"
#include "compiler.h"
using namespace goose;
namespace goose::builtins
{
|
| ︙ | |||
25 26 27 28 29 30 31 32 33 34 35 36 37 38 | 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | + + + + + + + + + + + + + |
} );
RegisterBuiltinFunc< void ( bool ) >( e, "DiagnosticsForceColors"_sid,
[pEnv]( bool enable )
{
DiagnosticsManager::GetInstance().setForceColors( enable );
} );
RegisterBuiltinFunc< Intrinsic< void ( bool ) > >( e, "#VerificationTraceMode"_sid,
[pEnv]( const Value& enable )
{
if( !enable.isConstant() )
{
DiagnosticsManager::GetInstance().emitErrorMessage( enable.locationId(),
"#VerificationTraceMode: the expression doesn't evaluate to a constant." );
return;
}
analyze::FuncValidator::SetTraceMode( *FromValue< bool >( enable ) );
} );
RegisterBuiltinFunc< Intrinsic< void ( uint32_t ) > >( e, "#SetExecutionBudget"_sid,
[pEnv]( const Value& budget )
{
static bool used = false;
if( !budget.isConstant() )
|
| ︙ |