Differences From Artifact [2fb5971151]:
- File
bs/builtins/types/func/invoke.cpp
— part of check-in
[43e22af793]
at
2019-08-05 02:45:01
on branch trunk
—
- Unification now works in two passes. The second pass gives unification rules a chance to match again after all the holes have been resolved and substituted.
- Fixed many horrible bugs in various unification rules that managed to go by unnoticed until the above change, after which they made everything catch on fire.
- Simplified the ct_int and ct_string unification rules to take advantage of the new unification behavior. Everything finally works as intended wrt to ct_int versus RT integers.
- Removed unification callbacks. It was a system to provide a way to perform unification work post hole substitution, so it is now obsolete.
To Artifact [b0b98c2f98]:
- File bs/builtins/types/func/invoke.cpp — part of check-in [ffa2c830dd] at 2019-08-10 19:33:22 on branch trunk — Implemented a DiagnosticsContext class which can be used to push contextual informations that are printed when an error is emitted. (user: achavasse size: 4055)
| ︙ | |||
87 88 89 90 91 92 93 94 95 96 97 98 99 100 | 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | + + + |
return GetFuncSig( callee );
}
optional< Value > prepareFunc( const Context& c, const Value& callee, const Term& unifiedCallPat, UnificationContext& uc ) const final
{
if( IsBuiltinFunc( callee ) || IsIntrinsicFunc( callee ) )
return callee;
// TODO better description with the function's name if possible (we may need to explicitely store it in the func)
DiagnosticsContext dc( callee.locationId(), "function being compiled", true );
return CompileFunc( c, callee );
}
};
void SetupFunctionInvocationRule( Env& e )
{
|
| ︙ |