Skip to content

Commit

Permalink
shortcuts
Browse files Browse the repository at this point in the history
  • Loading branch information
AqlaSolutions committed Feb 14, 2016
1 parent b8cb816 commit 2055b02
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
24 changes: 24 additions & 0 deletions RunSharpShared/Aqla/ContextualOperand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,30 @@ public ContextualOperand InvokeGetType()
return InvokeGetType();
}

public ContextualOperand InvokeToString()
{
return base.InvokeToString(TypeMapper);
}

[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Don't pass typeMapper", true)]
public new Operand InvokeToString(ITypeMapper typeMapper)
{
return InvokeToString();
}

public ContextualOperand InvokeGetHashCode()
{
return base.InvokeGetHashCode(TypeMapper);
}

[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Don't pass typeMapper", true)]
public new Operand InvokeGetHashCode(ITypeMapper typeMapper)
{
return InvokeGetHashCode();
}

public new ContextualOperand ArrayLength()
{
return OperandExtensions.SetLeakedState(new ContextualOperand(base.ArrayLength(), TypeMapper), true);
Expand Down
5 changes: 5 additions & 0 deletions RunSharpShared/CodeGen.Statements.cs
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,11 @@ public void DebugAssert(Operand condition)
Invoke(TypeMapper.MapType(typeof(System.Diagnostics.Debug)), "Assert", condition);
}

public void DebugWriteLine(Operand message)
{
Invoke(TypeMapper.MapType(typeof(System.Diagnostics.Debug)), "WriteLine", message);
}

public void DebugAssert(Operand condition, Operand message)
{
Invoke(TypeMapper.MapType(typeof(System.Diagnostics.Debug)), "Assert", condition, message);
Expand Down
10 changes: 10 additions & 0 deletions RunSharpShared/Operand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,16 @@ public ContextualOperand InvokeGetType(ITypeMapper typeMapper)
return Invoke("GetType", typeMapper);
}

public ContextualOperand InvokeToString(ITypeMapper typeMapper)
{
return Invoke("ToString", typeMapper);
}

public ContextualOperand InvokeGetHashCode(ITypeMapper typeMapper)
{
return Invoke("GetHashCode", typeMapper);
}

#endregion

#region Member access
Expand Down

0 comments on commit 2055b02

Please sign in to comment.