diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Common.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/Common.cs similarity index 96% rename from OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Common.cs rename to OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/Common.cs index 1f24d9bebd..3ea167c000 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Common.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/Common.cs @@ -30,7 +30,7 @@ using System; using System.Collections.Generic; using System.Text; -namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL +namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSO { public static class Common { diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Engine.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/Engine.cs similarity index 96% rename from OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Engine.cs rename to OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/Engine.cs index 2db35c4bed..b0608411c9 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Engine.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/Engine.cs @@ -32,7 +32,7 @@ using System.Reflection.Emit; using System.Threading; -namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL +namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSO { @@ -86,7 +86,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL TypeBuilder typeBuilder = modBuilder.DefineType( "LSL_ScriptObject", TypeAttributes.Public | TypeAttributes.BeforeFieldInit, - typeof(OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL.LSL_BaseClass)); + typeof(OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSO.LSL_BaseClass)); //, // typeof()); //, typeof(LSL_BuiltIn_Commands_Interface)); diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/IL_common_functions.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/IL_common_functions.cs similarity index 95% rename from OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/IL_common_functions.cs rename to OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/IL_common_functions.cs index 76738b8437..70533fbc1d 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/IL_common_functions.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/IL_common_functions.cs @@ -32,7 +32,7 @@ using System.Text; using System.Reflection; using System.Reflection.Emit; -namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL +namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSO { partial class LSO_Parser { diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/LSL_BaseClass.cs similarity index 91% rename from OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs rename to OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/LSL_BaseClass.cs index b88a905a9a..99904d4ed0 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/LSL_BaseClass.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Text; using System.IO; -namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL +namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSO { public partial class LSL_BaseClass { @@ -41,7 +41,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL { LSL_Builtins = LSLBuiltins; - Common.SendToLog("OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL.LSL_BaseClass.Start() called"); + Common.SendToLog("OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSO.LSL_BaseClass.Start() called"); //LSL_Builtins.llSay(0, "Test"); return; } diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass_Builtins.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/LSL_BaseClass_Builtins.cs similarity index 97% rename from OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass_Builtins.cs rename to OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/LSL_BaseClass_Builtins.cs index d6f9a88b4d..d3ca62524d 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass_Builtins.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/LSL_BaseClass_Builtins.cs @@ -2,7 +2,7 @@ //using System.Collections.Generic; //using System.Text; -//namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL +//namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSO //{ // public partial class LSL_BaseClass // { diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass_OPCODES.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/LSL_BaseClass_OPCODES.cs similarity index 93% rename from OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass_OPCODES.cs rename to OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/LSL_BaseClass_OPCODES.cs index b7716781e0..e55f28df8c 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass_OPCODES.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/LSL_BaseClass_OPCODES.cs @@ -2,11 +2,19 @@ using System; using System.Collections.Generic; using System.Text; -namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL +namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSO { public partial class LSL_BaseClass { - + /* + * OPCODES + * + * These are internal "assembly" commands, + * basic operators like "ADD", "PUSH" and "POP" + * + * It also contains managed stack and keeps track of internal variables, etc. + * + */ public void StoreToLocal(UInt32 index) diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_CLRInterface.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/LSL_CLRInterface.cs similarity index 95% rename from OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_CLRInterface.cs rename to OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/LSL_CLRInterface.cs index 84cb20c1a8..7d5356062a 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_CLRInterface.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/LSL_CLRInterface.cs @@ -30,7 +30,7 @@ using System; using System.Collections.Generic; using System.Text; -namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL +namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSO { public class LSL_CLRInterface { diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_OPCODE_IL_processor.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/LSL_OPCODE_IL_processor.cs similarity index 97% rename from OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_OPCODE_IL_processor.cs rename to OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/LSL_OPCODE_IL_processor.cs index 8836195450..e472f4a125 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_OPCODE_IL_processor.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/LSL_OPCODE_IL_processor.cs @@ -32,7 +32,7 @@ using System.Text; using System.Reflection; using System.Reflection.Emit; -namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL +namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSO { partial class LSO_Parser { diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSO_Enums.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/LSO_Enums.cs similarity index 96% rename from OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSO_Enums.cs rename to OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/LSO_Enums.cs index f3eef3dbc9..dde6609aa5 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSO_Enums.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/LSO_Enums.cs @@ -30,7 +30,7 @@ using System; using System.Collections.Generic; using System.Text; -namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL +namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSO { public static class LSO_Enums { diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSO_Parser.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/LSO_Parser.cs similarity index 97% rename from OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSO_Parser.cs rename to OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/LSO_Parser.cs index b486c46bc0..324f201000 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSO_Parser.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/LSO_Parser.cs @@ -33,7 +33,7 @@ using System.IO; using System.Reflection; using System.Reflection.Emit; -namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL +namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSO { partial class LSO_Parser { diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSO_Struct.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/LSO_Struct.cs similarity index 95% rename from OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSO_Struct.cs rename to OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/LSO_Struct.cs index 8ea618c83b..74cf1e19bd 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSO_Struct.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/LSO_Struct.cs @@ -31,7 +31,7 @@ using System; using System.Collections.Generic; using System.Text; -namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL +namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSO { static class LSO_Struct { diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Server_API/LSL_BuiltIn_Commands_Interface.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/Server_API/LSL_BuiltIn_Commands_Interface.cs similarity index 96% rename from OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Server_API/LSL_BuiltIn_Commands_Interface.cs rename to OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/Server_API/LSL_BuiltIn_Commands_Interface.cs index b6f2889317..8a5d4b6bb3 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Server_API/LSL_BuiltIn_Commands_Interface.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/Server_API/LSL_BuiltIn_Commands_Interface.cs @@ -30,7 +30,7 @@ using System; using System.Collections.Generic; using System.Text; -namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL +namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSO { public interface LSL_BuiltIn_Commands_Interface { diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Server_API/LSL_BuiltIn_Commands_TestImplementation.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/Server_API/LSL_BuiltIn_Commands_TestImplementation.cs similarity index 97% rename from OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Server_API/LSL_BuiltIn_Commands_TestImplementation.cs rename to OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/Server_API/LSL_BuiltIn_Commands_TestImplementation.cs index 3536bf37e4..38adf9f280 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Server_API/LSL_BuiltIn_Commands_TestImplementation.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSO/Server_API/LSL_BuiltIn_Commands_TestImplementation.cs @@ -30,7 +30,7 @@ using System; using System.Collections.Generic; using System.Text; -namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL +namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSO { public class LSL_BuiltIn_Commands_TestImplementation : LSL_BuiltIn_Commands_Interface { diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs index f2080ebb84..6d1ecda04d 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs @@ -46,46 +46,46 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine // Object> - internal Dictionary> Scripts = new Dictionary>(); + internal Dictionary> Scripts = new Dictionary>(); - internal Dictionary.KeyCollection GetScriptKeys(string ObjectID) + internal Dictionary.KeyCollection GetScriptKeys(string ObjectID) { if (Scripts.ContainsKey(ObjectID) == false) return null; - Dictionary Obj; + Dictionary Obj; Scripts.TryGetValue(ObjectID, out Obj); return Obj.Keys; } - internal OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL.LSL_BaseClass GetScript(string ObjectID, string ScriptID) + internal OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSO.LSL_BaseClass GetScript(string ObjectID, string ScriptID) { if (Scripts.ContainsKey(ObjectID) == false) return null; - Dictionary Obj; + Dictionary Obj; Scripts.TryGetValue(ObjectID, out Obj); if (Obj.ContainsKey(ScriptID) == false) return null; // Get script - OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL.LSL_BaseClass Script; + OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSO.LSL_BaseClass Script; Obj.TryGetValue(ScriptID, out Script); return Script; } - internal void SetScript(string ObjectID, string ScriptID, OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL.LSL_BaseClass Script) + internal void SetScript(string ObjectID, string ScriptID, OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSO.LSL_BaseClass Script) { // Create object if it doesn't exist if (Scripts.ContainsKey(ObjectID) == false) - Scripts.Add(ObjectID, new Dictionary()); + Scripts.Add(ObjectID, new Dictionary()); // Delete script if it exists - Dictionary Obj; + Dictionary Obj; Scripts.TryGetValue(ObjectID, out Obj); if (Obj.ContainsKey(ScriptID) == true) Obj.Remove(ScriptID); @@ -118,7 +118,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine { Common.SendToDebug("ScriptManager Script is LSO, compiling to .Net Assembly"); // Create a new instance of the compiler (currently we don't want reuse) - OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL.Engine LSLCompiler = new OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL.Engine(); + OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSO.Engine LSLCompiler = new OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSO.Engine(); // Compile FileName = LSLCompiler.Compile(FileName); } @@ -130,14 +130,14 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine AppDomain FreeAppDomain = GetFreeAppDomain(); // * Load and start script - OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL.LSL_BaseClass Script = LoadAndInitAssembly(FreeAppDomain, FileName); + OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSO.LSL_BaseClass Script = LoadAndInitAssembly(FreeAppDomain, FileName); string FullScriptID = ScriptID + "." + ObjectID; // Add it to our temporary active script keeper //Scripts.Add(FullScriptID, Script); SetScript(ObjectID, ScriptID, Script); // We need to give (untrusted) assembly a private instance of BuiltIns // this private copy will contain Read-Only FullScriptID so that it can bring that on to the server whenever needed. - OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL.LSL_BuiltIn_Commands_Interface LSLB = new OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL.LSL_BuiltIn_Commands_TestImplementation(FullScriptID); + OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSO.LSL_BuiltIn_Commands_Interface LSLB = new OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSO.LSL_BuiltIn_Commands_TestImplementation(FullScriptID); // Start the script - giving it BuiltIns Common.SendToDebug("ScriptManager initializing script, handing over private builtin command interface"); Script.Start(LSLB); @@ -162,7 +162,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine /// AppDomain to load script into /// FileName of script assembly (.dll) /// - private OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL.LSL_BaseClass LoadAndInitAssembly(AppDomain FreeAppDomain, string FileName) + private OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSO.LSL_BaseClass LoadAndInitAssembly(AppDomain FreeAppDomain, string FileName) { Common.SendToDebug("ScriptManager Loading Assembly " + FileName); // Load .Net Assembly (.dll) @@ -201,7 +201,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine //{ //} - return (OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL.LSL_BaseClass)Activator.CreateInstance(t); + return (OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSO.LSL_BaseClass)Activator.CreateInstance(t); } @@ -209,13 +209,13 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine internal void ExecuteFunction(string ObjectID, string ScriptID, string FunctionName, object[] args) { Common.SendToDebug("Executing Function ObjectID: " + ObjectID + ", ScriptID: " + ScriptID + ", FunctionName: " + FunctionName); - OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL.LSL_BaseClass Script = myScriptEngine.myScriptManager.GetScript(ObjectID, ScriptID); + OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSO.LSL_BaseClass Script = myScriptEngine.myScriptManager.GetScript(ObjectID, ScriptID); Type type = Script.GetType(); //object o = (object)Script; //System.Collections.Generic.List Functions = (System.Collections.Generic.List) - //Type type = typeof(OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL.LSL_BaseClass); + //Type type = typeof(OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSO.LSL_BaseClass); Common.SendToDebug("Invoke: \"" + Script.State + "_event_" + FunctionName + "\""); type.InvokeMember(Script.State + "_event_" + FunctionName, BindingFlags.InvokeMethod, null, Script, args); //System.Collections.Generic.List Functions = (System.Collections.Generic.List)type.InvokeMember("GetFunctions", BindingFlags.InvokeMethod, null, Script, null);