diff options
author | UbitUmarov | 2018-02-07 19:52:18 +0000 |
---|---|---|
committer | UbitUmarov | 2018-02-07 19:52:18 +0000 |
commit | 01ceb4d17e80b794432062ff3bf3b85f884c9548 (patch) | |
tree | b74cb4ddb1dea21276991ae379e084708aa3fce2 /OpenSim/Region/ScriptEngine/XMREngine/MMRScriptInlines.cs | |
parent | add a warning about XMR only suoprting one region per instance at this point,... (diff) | |
download | opensim-SC-01ceb4d17e80b794432062ff3bf3b85f884c9548.zip opensim-SC-01ceb4d17e80b794432062ff3bf3b85f884c9548.tar.gz opensim-SC-01ceb4d17e80b794432062ff3bf3b85f884c9548.tar.bz2 opensim-SC-01ceb4d17e80b794432062ff3bf3b85f884c9548.tar.xz |
try to fix xmr on multiregions per instance. Ugly spargetti ...; remove fixes for 2 llparcel functions that should not be needed; remove xmr own API, it has no business having one.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/XMREngine/MMRScriptInlines.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/XMREngine/MMRScriptInlines.cs | 56 |
1 files changed, 29 insertions, 27 deletions
diff --git a/OpenSim/Region/ScriptEngine/XMREngine/MMRScriptInlines.cs b/OpenSim/Region/ScriptEngine/XMREngine/MMRScriptInlines.cs index dc00001..fcb4b66 100644 --- a/OpenSim/Region/ScriptEngine/XMREngine/MMRScriptInlines.cs +++ b/OpenSim/Region/ScriptEngine/XMREngine/MMRScriptInlines.cs | |||
@@ -589,11 +589,11 @@ namespace OpenSim.Region.ScriptEngine.XMREngine | |||
589 | * @brief Generate code for the usual ll...() functions. | 589 | * @brief Generate code for the usual ll...() functions. |
590 | */ | 590 | */ |
591 | public class TokenDeclInline_BEApi : TokenDeclInline { | 591 | public class TokenDeclInline_BEApi : TokenDeclInline { |
592 | private static readonly MethodInfo fixLLParcelMediaQuery = ScriptCodeGen.GetStaticMethod | 592 | // private static readonly MethodInfo fixLLParcelMediaQuery = ScriptCodeGen.GetStaticMethod |
593 | (typeof (XMRInstAbstract), "FixLLParcelMediaQuery", new Type[] { typeof (LSL_List) }); | 593 | // (typeof (XMRInstAbstract), "FixLLParcelMediaQuery", new Type[] { typeof (LSL_List) }); |
594 | 594 | ||
595 | private static readonly MethodInfo fixLLParcelMediaCommandList = ScriptCodeGen.GetStaticMethod | 595 | // private static readonly MethodInfo fixLLParcelMediaCommandList = ScriptCodeGen.GetStaticMethod |
596 | (typeof (XMRInstAbstract), "FixLLParcelMediaCommandList", new Type[] { typeof (LSL_List) }); | 596 | // (typeof (XMRInstAbstract), "FixLLParcelMediaCommandList", new Type[] { typeof (LSL_List) }); |
597 | 597 | ||
598 | public bool doCheckRun; | 598 | public bool doCheckRun; |
599 | private FieldInfo apiContextField; | 599 | private FieldInfo apiContextField; |
@@ -626,39 +626,41 @@ namespace OpenSim.Region.ScriptEngine.XMREngine | |||
626 | */ | 626 | */ |
627 | public override void CodeGen (ScriptCodeGen scg, Token errorAt, CompValuTemp result, CompValu[] args) | 627 | public override void CodeGen (ScriptCodeGen scg, Token errorAt, CompValuTemp result, CompValu[] args) |
628 | { | 628 | { |
629 | if (isTaggedCallsCheckRun) { // see if 'xmr' method that calls CheckRun() internally | 629 | if (isTaggedCallsCheckRun) |
630 | new ScriptCodeGen.CallLabel (scg, errorAt); // if so, put a call label immediately before it | 630 | { // see if 'xmr' method that calls CheckRun() internally |
631 | // .. so restoring the frame will jump immediately to the | 631 | new ScriptCodeGen.CallLabel (scg, errorAt); // if so, put a call label immediately before it |
632 | // .. call without re-executing any code before this | 632 | // .. so restoring the frame will jump immediately to the |
633 | // .. call without re-executing any code before this | ||
633 | } | 634 | } |
634 | if (!methInfo.IsStatic) { | 635 | if (!methInfo.IsStatic) |
636 | { | ||
635 | scg.PushXMRInst (); // XMRInstanceSuperType pointer | 637 | scg.PushXMRInst (); // XMRInstanceSuperType pointer |
636 | if (apiContextField != null) { | 638 | if (apiContextField != null) // 'this' pointer for API function |
637 | scg.ilGen.Emit (errorAt, OpCodes.Ldfld, apiContextField); | 639 | scg.ilGen.Emit (errorAt, OpCodes.Ldfld, apiContextField); |
638 | // 'this' pointer for API function | 640 | |
639 | } | ||
640 | } | 641 | } |
641 | for (int i = 0; i < args.Length; i ++) { // push arguments, boxing/unboxing as needed | 642 | for (int i = 0; i < args.Length; i ++) // push arguments, boxing/unboxing as needed |
642 | args[i].PushVal (scg, errorAt, argDecl.types[i]); | 643 | args[i].PushVal (scg, errorAt, argDecl.types[i]); |
643 | } | 644 | |
644 | if (methInfo.Name == "llParcelMediaQuery") { | 645 | // this should not be needed |
645 | scg.ilGen.Emit (errorAt, OpCodes.Call, fixLLParcelMediaQuery); | 646 | // if (methInfo.Name == "llParcelMediaQuery") { |
646 | } | 647 | // scg.ilGen.Emit (errorAt, OpCodes.Call, fixLLParcelMediaQuery); |
647 | if (methInfo.Name == "llParcelMediaCommandList") { | 648 | // } |
648 | scg.ilGen.Emit (errorAt, OpCodes.Call, fixLLParcelMediaCommandList); | 649 | // this should not be needed |
649 | } | 650 | // if (methInfo.Name == "llParcelMediaCommandList") { |
650 | if (methInfo.IsVirtual) { // call API function | 651 | // scg.ilGen.Emit (errorAt, OpCodes.Call, fixLLParcelMediaCommandList); |
652 | // } | ||
653 | if (methInfo.IsVirtual) // call API function | ||
651 | scg.ilGen.Emit (errorAt, OpCodes.Callvirt, methInfo); | 654 | scg.ilGen.Emit (errorAt, OpCodes.Callvirt, methInfo); |
652 | } else { | 655 | else |
653 | scg.ilGen.Emit (errorAt, OpCodes.Call, methInfo); | 656 | scg.ilGen.Emit (errorAt, OpCodes.Call, methInfo); |
654 | } | 657 | |
655 | result.Pop (scg, errorAt, retType); // pop result, boxing/unboxing as needed | 658 | result.Pop (scg, errorAt, retType); // pop result, boxing/unboxing as needed |
656 | if (isTaggedCallsCheckRun) { | 659 | if (isTaggedCallsCheckRun) |
657 | scg.openCallLabel = null; | 660 | scg.openCallLabel = null; |
658 | } | 661 | |
659 | if (doCheckRun) { | 662 | if (doCheckRun) |
660 | scg.EmitCallCheckRun (errorAt, false); // maybe call CheckRun() | 663 | scg.EmitCallCheckRun (errorAt, false); // maybe call CheckRun() |
661 | } | ||
662 | } | 664 | } |
663 | } | 665 | } |
664 | } | 666 | } |