提交 246d9f14 编写于 作者: T tanghai

直接使用指针转换,提升性能

上级 6b5c160d
......@@ -20,13 +20,19 @@ namespace ILRuntime.Runtime.Stack
{
get
{
return (StackObject*)((uint)Value << 32 | (uint)this.ValueLow);
fixed (int* i = &this.Value)
{
ulong* p = (ulong*) i;
return (StackObject*) (*p);
}
}
set
{
ulong v = (ulong) value;
this.ValueLow = (int)(v & 0x00000000ffffffff);
this.Value = (int)(v >> 32);
fixed (int* i = &this.Value)
{
ulong* p = (ulong*) i;
*p = (ulong)value;
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册