Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复Binding结构体赋值时抛出的NotImplementedException异常 #609

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Siuming93
Copy link
Contributor

当一个做了值类型绑定的结构体赋值给一个object对象,并对一个新的object对象进行赋值时,会抛出NotImplementedException异常.

{
var ct = domain.GetTypeByIndex(dst->Value) as CLRType;
var binder = ct.ValueTypeBinder;
v->ObjectType = ObjectTypes.ValueTypeObjectReference;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

将值类型绑定的对象往object存的语义是将该对象装箱,因此正确的做法应该是调用StackObject.ToObject(esp)拿到object, 再存入mStack[v->Value]中,然后FreeStackValueType(esp);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants