Differences From Artifact [9d739514d2]:
- File
bs/builtins/api/compiler.cpp
— part of check-in
[397f594186]
at
2020-05-17 17:30:43
on branch trunk
—
- Clean up the "default return value from top level file functions" stuff.
- Standardize to a default return value of 0 for the top level file both in execution mode and in compilation mode.
- Implemented a combined execution/compilation test for tuples in preparation for implementing tuple compilation. (not enabled yet)
To Artifact [930ffd92af]:
- File
bs/builtins/api/compiler.cpp
— part of check-in
[bb17e9f3dd]
at
2020-05-25 22:08:44
on branch trunk
—
- Added a "LowerConstantForRuntime" extension point, similar to LowerTypeForRunTime.
- Added a way to represent Record constants.
- Implemented LowerConstantForRunTime for tuples, which lowers them into a constant record.
- Implemented codegen for constant records.
- Implemented codegen for storing an aggregate constant.
- Implemented a way (not exposed in the syntax for now) to create vararg function types, to be able to call vararg external functions such as printf.
- Enabled the tuple runtime/compilation combined test which is now working.
- Various bug fixes.
| ︙ | ︙ | |||
99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
{
auto ft = FromValue< FuncType >( f );
if( !ft )
return PoisonValue();
return ToValue( BuildExternalFunc( *ft, symbol ) );
} );
RegisterBuiltinFunc< void ( string, Value ) >( e, "CreateConstant"_sid,
[pEnv]( const string& name, const Value& v )
{
if( !v.isConstant() )
{
DiagnosticsManager::GetInstance().emitErrorMessage( v.locationId(),
| > > > > > > > > > > | 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
{
auto ft = FromValue< FuncType >( f );
if( !ft )
return PoisonValue();
return ToValue( BuildExternalFunc( *ft, symbol ) );
} );
RegisterBuiltinFunc< Eager< Value > ( Value, string ) >( e, "ExternalVarArgFunction"_sid,
[pEnv]( const Value& f, const string& symbol )
{
auto ft = FromValue< FuncType >( f );
if( !ft )
return PoisonValue();
return ToValue( BuildExternalFunc( *ft, symbol, true ) );
} );
RegisterBuiltinFunc< void ( string, Value ) >( e, "CreateConstant"_sid,
[pEnv]( const string& name, const Value& v )
{
if( !v.isConstant() )
{
DiagnosticsManager::GetInstance().emitErrorMessage( v.locationId(),
|
| ︙ | ︙ |