Open srxqds opened 1 month ago
td->stack
and InterpInst*
is information that is used only during compilation time. The list of InterpInst
is iterated as the last step of compilation and in generate_compacted_code
this list is compacted into an array of guint16
that represents the final generated code.
mono interp transfer il code to opcode in
generate
function: https://github.com/dotnet/runtime/blob/1e5bae2e56180897c95ac3f9adaa5609d14d20b3/src/mono/mono/mini/interp/transform.c#L9424the
TransformData
allocate stack at below: https://github.com/dotnet/runtime/blob/1e5bae2e56180897c95ac3f9adaa5609d14d20b3/src/mono/mono/mini/interp/transform.c#L9501-L9508and will store the custom data in
data_items
: https://github.com/dotnet/runtime/blob/1e5bae2e56180897c95ac3f9adaa5609d14d20b3/src/mono/mono/mini/interp/transform.c#L9476at end of the function
generate
, I found theopcode
ordata_items
will copy to InterpMethod in below code:https://github.com/dotnet/runtime/blob/1e5bae2e56180897c95ac3f9adaa5609d14d20b3/src/mono/mono/mini/interp/transform.c#L9584-L9614
and copy
InterpInst
(allocated ininterp_add_ins
) atgenerate_compacted_code
:https://github.com/dotnet/runtime/blob/1e5bae2e56180897c95ac3f9adaa5609d14d20b3/src/mono/mono/mini/interp/transform.c#L9286-L9289
but I could not found the
td->stack
been copy before being freed at :https://github.com/dotnet/runtime/blob/1e5bae2e56180897c95ac3f9adaa5609d14d20b3/src/mono/mono/mini/interp/transform.c#L9675-L9688
why not these data not restore to
InterpMethod
or maybe other place restore it?could you help me? @BrzVlad