mantis 8551: Simplify Yengine heap usage control

This commit is contained in:
UbitUmarov
2019-11-18 17:33:02 +00:00
parent 496a2228f5
commit bf0697d5f4
5 changed files with 66 additions and 108 deletions

View File

@@ -1484,7 +1484,6 @@ namespace OpenSim.Region.ScriptEngine.Yengine
if(type.ToHeapTrackerType() != null)
{
localBuilder = scg.ilGen.DeclareLocal(type.ToHeapTrackerType(), name);
scg.HeapLocals.Add(localBuilder);
scg.PushXMRInst();
scg.ilGen.Emit(type, OpCodes.Newobj, type.GetHeapTrackerCtor());
scg.ilGen.Emit(type, OpCodes.Stloc, localBuilder);
@@ -1548,11 +1547,9 @@ namespace OpenSim.Region.ScriptEngine.Yengine
scg.ilGen.Emit(errorAt, OpCodes.Ldloc, localBuilder);
scg.ilGen.Emit(errorAt, OpCodes.Ldloc, htpop);
type.CallHeapTrackerPopMeth(errorAt, scg.ilGen);
scg.HeapLocals.Add(htpop);
}
}
else
{
/*
* Not a heap-tracked local var, just pop directly into it.
*/