diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/XMREngine/MMRScriptCodeGen.cs | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/OpenSim/Region/ScriptEngine/XMREngine/MMRScriptCodeGen.cs b/OpenSim/Region/ScriptEngine/XMREngine/MMRScriptCodeGen.cs index 5219fa8..3b0ba66 100644 --- a/OpenSim/Region/ScriptEngine/XMREngine/MMRScriptCodeGen.cs +++ b/OpenSim/Region/ScriptEngine/XMREngine/MMRScriptCodeGen.cs | |||
@@ -141,9 +141,6 @@ namespace OpenSim.Region.ScriptEngine.XMREngine | |||
141 | new Type[] { typeof (LSL_Vector) }); | 141 | new Type[] { typeof (LSL_Vector) }); |
142 | private static MethodInfo scriptRestoreCatchExceptionUnwrap = GetStaticMethod (typeof (ScriptRestoreCatchException), "Unwrap", new Type[] { typeof (Exception) }); | 142 | private static MethodInfo scriptRestoreCatchExceptionUnwrap = GetStaticMethod (typeof (ScriptRestoreCatchException), "Unwrap", new Type[] { typeof (Exception) }); |
143 | private static MethodInfo thrownExceptionWrapMethodInfo = GetStaticMethod (typeof (ScriptThrownException), "Wrap", new Type[] { typeof (object) }); | 143 | private static MethodInfo thrownExceptionWrapMethodInfo = GetStaticMethod (typeof (ScriptThrownException), "Wrap", new Type[] { typeof (object) }); |
144 | private static MethodInfo heapTrackerListPush = typeof (HeapTrackerList). GetMethod ("Push", new Type[0]); | ||
145 | private static MethodInfo heapTrackerObjectPush = typeof (HeapTrackerObject).GetMethod ("Push", new Type[0]); | ||
146 | private static MethodInfo heapTrackerStringPush = typeof (HeapTrackerString).GetMethod ("Push", new Type[0]); | ||
147 | 144 | ||
148 | private static MethodInfo catchExcToStrMethodInfo = GetStaticMethod (typeof (ScriptCodeGen), | 145 | private static MethodInfo catchExcToStrMethodInfo = GetStaticMethod (typeof (ScriptCodeGen), |
149 | "CatchExcToStr", | 146 | "CatchExcToStr", |
@@ -1510,16 +1507,13 @@ namespace OpenSim.Region.ScriptEngine.XMREngine | |||
1510 | ilGen.Emit (curDeclFunc, OpCodes.Ldloc, lcl); | 1507 | ilGen.Emit (curDeclFunc, OpCodes.Ldloc, lcl); |
1511 | Type t = lcl.type; | 1508 | Type t = lcl.type; |
1512 | if (t == typeof (HeapTrackerList)) { | 1509 | if (t == typeof (HeapTrackerList)) { |
1513 | ilGen.Emit (curDeclFunc, OpCodes.Call, heapTrackerListPush); | 1510 | t = HeapTrackerList.GenPush (curDeclFunc, ilGen); |
1514 | t = typeof (LSL_List); | ||
1515 | } | 1511 | } |
1516 | if (t == typeof (HeapTrackerObject)) { | 1512 | if (t == typeof (HeapTrackerObject)) { |
1517 | ilGen.Emit (curDeclFunc, OpCodes.Call, heapTrackerObjectPush); | 1513 | t = HeapTrackerObject.GenPush (curDeclFunc, ilGen); |
1518 | t = typeof (object); | ||
1519 | } | 1514 | } |
1520 | if (t == typeof (HeapTrackerString)) { | 1515 | if (t == typeof(HeapTrackerString)) { |
1521 | ilGen.Emit (curDeclFunc, OpCodes.Call, heapTrackerStringPush); | 1516 | t = HeapTrackerString.GenPush (curDeclFunc, ilGen); |
1522 | t = typeof (string); | ||
1523 | } | 1517 | } |
1524 | if (t.IsValueType) { | 1518 | if (t.IsValueType) { |
1525 | ilGen.Emit (curDeclFunc, OpCodes.Box, t); | 1519 | ilGen.Emit (curDeclFunc, OpCodes.Box, t); |
@@ -1615,7 +1609,9 @@ namespace OpenSim.Region.ScriptEngine.XMREngine | |||
1615 | ilGen.Emit (curDeclFunc, OpCodes.Castclass, u); | 1609 | ilGen.Emit (curDeclFunc, OpCodes.Castclass, u); |
1616 | } | 1610 | } |
1617 | if (u != t) { | 1611 | if (u != t) { |
1618 | ilGen.Emit (curDeclFunc, OpCodes.Call, t.GetMethod ("Pop", new Type[] { u })); | 1612 | if (t == typeof (HeapTrackerList)) HeapTrackerList.GenPop (curDeclFunc, ilGen); |
1613 | if (t == typeof (HeapTrackerObject)) HeapTrackerObject.GenPop (curDeclFunc, ilGen); | ||
1614 | if (t == typeof (HeapTrackerString)) HeapTrackerString.GenPop (curDeclFunc, ilGen); | ||
1619 | } else { | 1615 | } else { |
1620 | ilGen.Emit (curDeclFunc, OpCodes.Stloc, lcl); | 1616 | ilGen.Emit (curDeclFunc, OpCodes.Stloc, lcl); |
1621 | } | 1617 | } |