public override void Emit (EmitContext ec)
{
Store (ec);
- AddressOf (ec, AddressOp.LoadStore);
- ec.ig.EmitCall (OpCodes.Call, info.Value, null);
+ Invocation.EmitCall (ec, false, this, info.Value, null, loc);
}
public void EmitCheck (EmitContext ec)
{
Store (ec);
- AddressOf (ec, AddressOp.LoadStore);
- ec.ig.EmitCall (OpCodes.Call, info.HasValue, null);
+ Invocation.EmitCall (ec, false, this, info.HasValue, null, loc);
}
public void EmitGetValueOrDefault (EmitContext ec)
{
Store (ec);
- AddressOf (ec, AddressOp.LoadStore);
- ec.ig.EmitCall (OpCodes.Call, info.GetValueOrDefault, null);
+ Invocation.EmitCall (ec, false, this, info.GetValueOrDefault, null, loc);
}
public override bool Equals (object obj)
// Arguments can be lifted for equal operators when the return type is bool and both
// arguments are of same type
//
- if (left is NullLiteral) {
+ if (left_orig.IsNull) {
left = right;
left_null_lifted = true;
type = TypeManager.bool_type;
}
- if (right is NullLiteral) {
+ if (right_orig.IsNull) {
right = left;
right_null_lifted = true;
type = TypeManager.bool_type;