mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 14:16:07 +08:00
* Optimised using statements and namespace references across entire project (this took a while to run).
This commit is contained in:
@@ -33,7 +33,6 @@ using System.Reflection.Emit;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using OpenSim.Region.ScriptEngine.Common;
|
||||
using OpenSim.Region.ScriptEngine.LSOEngine.LSO;
|
||||
|
||||
namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
|
||||
{
|
||||
@@ -59,11 +58,11 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
|
||||
string DLL_FileName = asmName.Name + ".dll";
|
||||
string DLL_FileName_WithPath = Path.GetDirectoryName(LSO_FileName) + @"\" + DLL_FileName;
|
||||
|
||||
LSOEngine.LSO.Common.SendToLog("LSO File Name: " + Path.GetFileName(LSO_FileName));
|
||||
LSOEngine.LSO.Common.SendToLog("Assembly name: " + asmName.Name);
|
||||
LSOEngine.LSO.Common.SendToLog("Assembly File Name: " + asmName.Name + ".dll");
|
||||
LSOEngine.LSO.Common.SendToLog("Starting processing of LSL ByteCode...");
|
||||
LSOEngine.LSO.Common.SendToLog(String.Empty);
|
||||
Common.SendToLog("LSO File Name: " + Path.GetFileName(LSO_FileName));
|
||||
Common.SendToLog("Assembly name: " + asmName.Name);
|
||||
Common.SendToLog("Assembly File Name: " + asmName.Name + ".dll");
|
||||
Common.SendToLog("Starting processing of LSL ByteCode...");
|
||||
Common.SendToLog(String.Empty);
|
||||
|
||||
|
||||
// Create Assembly
|
||||
@@ -104,7 +103,7 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
|
||||
LSOP.Parse();
|
||||
|
||||
// Constructor has to be created AFTER LSO_Parser because of accumulated variables
|
||||
if (LSOEngine.LSO.Common.IL_CreateConstructor)
|
||||
if (Common.IL_CreateConstructor)
|
||||
IL_CREATE_CONSTRUCTOR(typeBuilder, LSOP);
|
||||
|
||||
LSOP.CloseFile();
|
||||
@@ -113,15 +112,15 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
|
||||
*/
|
||||
|
||||
|
||||
LSOEngine.LSO.Common.SendToLog("Attempting to compile assembly...");
|
||||
Common.SendToLog("Attempting to compile assembly...");
|
||||
// Compile it
|
||||
Type type = typeBuilder.CreateType();
|
||||
LSOEngine.LSO.Common.SendToLog("Compilation successful!");
|
||||
Common.SendToLog("Compilation successful!");
|
||||
|
||||
LSOEngine.LSO.Common.SendToLog("Saving assembly: " + DLL_FileName);
|
||||
Common.SendToLog("Saving assembly: " + DLL_FileName);
|
||||
asmBuilder.Save(DLL_FileName);
|
||||
|
||||
LSOEngine.LSO.Common.SendToLog("Returning assembly filename: " + DLL_FileName);
|
||||
Common.SendToLog("Returning assembly filename: " + DLL_FileName);
|
||||
|
||||
|
||||
return DLL_FileName;
|
||||
@@ -166,7 +165,7 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
|
||||
|
||||
private static void IL_CREATE_CONSTRUCTOR(TypeBuilder typeBuilder, LSO_Parser LSOP)
|
||||
{
|
||||
LSOEngine.LSO.Common.SendToDebug("IL_CREATE_CONSTRUCTOR()");
|
||||
Common.SendToDebug("IL_CREATE_CONSTRUCTOR()");
|
||||
//ConstructorBuilder constructor = typeBuilder.DefineConstructor(
|
||||
// MethodAttributes.Public,
|
||||
// CallingConventions.Standard,
|
||||
@@ -235,7 +234,7 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
|
||||
Type datatype = null;
|
||||
|
||||
// Push data to stack
|
||||
LSOEngine.LSO.Common.SendToDebug("Adding to static (" + pos + ") type: " +
|
||||
Common.SendToDebug("Adding to static (" + pos + ") type: " +
|
||||
((LSO_Enums.Variable_Type_Codes) sb.ObjectType).ToString() + " (" + sb.ObjectType +
|
||||
")");
|
||||
switch ((LSO_Enums.Variable_Type_Codes) sb.ObjectType)
|
||||
|
||||
@@ -26,10 +26,6 @@
|
||||
*/
|
||||
|
||||
/* Original code: Tedd Hansen */
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Reflection.Emit;
|
||||
|
||||
namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
|
||||
{
|
||||
internal partial class LSO_Parser
|
||||
|
||||
@@ -25,9 +25,6 @@
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
|
||||
{
|
||||
//public partial class LSL_BaseClass
|
||||
|
||||
@@ -33,7 +33,6 @@ using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Reflection.Emit;
|
||||
using System.Text;
|
||||
using OpenSim.Region.ScriptEngine.LSOEngine.LSO;
|
||||
|
||||
namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
|
||||
{
|
||||
|
||||
@@ -25,10 +25,6 @@
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using OpenSim.Region.ScriptEngine.LSOEngine.LSO;
|
||||
|
||||
namespace OpenSim.Region.ScriptEngine.LSOEngine
|
||||
|
||||
@@ -27,18 +27,12 @@
|
||||
|
||||
using System;
|
||||
using Nini.Config;
|
||||
using OpenSim.Framework.Console;
|
||||
using OpenSim.Region.Environment.Interfaces;
|
||||
using OpenSim.Region.Environment.Scenes;
|
||||
using OpenSim.Region.ScriptEngine.Common;
|
||||
using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase;
|
||||
using EventManager = OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.EventManager;
|
||||
using ScriptManager=OpenSim.Region.ScriptEngine.LSOEngine.ScriptManager;
|
||||
|
||||
namespace OpenSim.Region.ScriptEngine.LSOEngine
|
||||
{
|
||||
[Serializable]
|
||||
public class ScriptEngine : OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.ScriptEngine
|
||||
public class ScriptEngine : Common.ScriptEngineBase.ScriptEngine
|
||||
{
|
||||
// We need to override a few things for our DotNetEngine
|
||||
public override void Initialise(Scene scene, IConfigSource config)
|
||||
@@ -46,7 +40,7 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine
|
||||
InitializeEngine(scene, config, true, GetScriptManager());
|
||||
}
|
||||
|
||||
public override OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.ScriptManager _GetScriptManager()
|
||||
public override Common.ScriptEngineBase.ScriptManager _GetScriptManager()
|
||||
{
|
||||
return new ScriptManager(this);
|
||||
}
|
||||
|
||||
@@ -26,11 +26,6 @@
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Serialization.Formatters.Binary;
|
||||
using System.Threading;
|
||||
using libsecondlife;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Region.Environment.Scenes;
|
||||
@@ -39,7 +34,7 @@ using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase;
|
||||
|
||||
namespace OpenSim.Region.ScriptEngine.LSOEngine
|
||||
{
|
||||
public class ScriptManager : OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.ScriptManager
|
||||
public class ScriptManager : Common.ScriptEngineBase.ScriptManager
|
||||
{
|
||||
public ScriptManager(Common.ScriptEngineBase.ScriptEngine scriptEngine)
|
||||
: base(scriptEngine)
|
||||
|
||||
Reference in New Issue
Block a user