From 65c5efe43b68700bad94076d4cd421160203c5de Mon Sep 17 00:00:00 2001
From: Jeff Ames
Date: Fri, 16 May 2008 01:22:11 +0000
Subject: Formatting cleanup.
---
.../Region/ScriptEngine/LSOEngine/LSO/Engine.cs | 10 ++++----
.../LSOEngine/LSO/LSL_BaseClass_OPCODES.cs | 4 ++--
.../ScriptEngine/LSOEngine/LSO/LSO_Parser.cs | 28 +++-------------------
.../LSOEngine/Properties/AssemblyInfo.cs | 10 ++++----
.../Region/ScriptEngine/LSOEngine/ScriptManager.cs | 2 +-
5 files changed, 16 insertions(+), 38 deletions(-)
(limited to 'OpenSim/Region/ScriptEngine/LSOEngine')
diff --git a/OpenSim/Region/ScriptEngine/LSOEngine/LSO/Engine.cs b/OpenSim/Region/ScriptEngine/LSOEngine/LSO/Engine.cs
index 0208350..f53772e 100644
--- a/OpenSim/Region/ScriptEngine/LSOEngine/LSO/Engine.cs
+++ b/OpenSim/Region/ScriptEngine/LSOEngine/LSO/Engine.cs
@@ -168,7 +168,7 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
Common.SendToDebug("IL_CREATE_CONSTRUCTOR()");
//ConstructorBuilder constructor = typeBuilder.DefineConstructor(
// MethodAttributes.Public,
- // CallingConventions.Standard,
+ // CallingConventions.Standard,
// new Type[0]);
ConstructorBuilder constructor = typeBuilder.DefineConstructor(
MethodAttributes.Public |
@@ -192,8 +192,8 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
//// Create state object
//FieldName = "State";
//FieldBuilder State_fb = typeBuilder.DefineField(
- // FieldName,
- // typeof(UInt32),
+ // FieldName,
+ // typeof(UInt32),
// FieldAttributes.Public);
//il.Emit(OpCodes.Ldarg_0);
//il.Emit(OpCodes.Ldc_I4, 0);
@@ -206,8 +206,8 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
//FieldName = "LSL_BuiltIns";
//FieldBuilder LSL_BuiltIns_fb = typeBuilder.DefineField(
- // FieldName,
- // objType1,
+ // FieldName,
+ // objType1,
// FieldAttributes.Public);
////LSL_BuiltIn_Commands_TestImplementation _ti = new LSL_BuiltIn_Commands_TestImplementation();
diff --git a/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSL_BaseClass_OPCODES.cs b/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSL_BaseClass_OPCODES.cs
index 1b73311..7805aa3 100644
--- a/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSL_BaseClass_OPCODES.cs
+++ b/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSL_BaseClass_OPCODES.cs
@@ -34,9 +34,9 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
// *
// * These are internal "assembly" commands,
// * basic operators like "ADD", "PUSH" and "POP"
- // *
+ // *
// * It also contains managed stack and keeps track of internal variables, etc.
- // *
+ // *
// */
diff --git a/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSO_Parser.cs b/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSO_Parser.cs
index 06ae1e9..b2a2f25 100644
--- a/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSO_Parser.cs
+++ b/OpenSim/Region/ScriptEngine/LSOEngine/LSO/LSO_Parser.cs
@@ -69,14 +69,12 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
fs.Close();
}
-
///
/// Parse LSO file.
///
public void Parse()
{
- // The LSO Format consist of 6 major blocks: header, statics, functions, states, heap, and stack.
-
+ // The LSO Format consist of 6 major blocks: header, statics, functions, states, heap, and stack.
// HEADER BLOCK
Common.SendToDebug("Reading HEADER BLOCK at: 0");
@@ -156,7 +154,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
}
Common.SendToDebug("Number of Static Blocks read: " + StaticBlockCount);
-
// FUNCTION BLOCK
// Always right after STATIC BLOCK
LSO_Struct.FunctionBlock myFunctionBlock = new LSO_Struct.FunctionBlock();
@@ -186,7 +183,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
}
}
-
// STATE FRAME BLOCK
// Always right after FUNCTION BLOCK
Common.SendToDebug("Reading STATE BLOCK at: " + myHeader.SR);
@@ -213,7 +209,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
}
}
-
// STATE BLOCK
// For each StateFrameBlock there is one StateBlock with multiple event handlers
@@ -239,7 +234,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
// We need to count number of bits flagged in EventMask?
-
// for each bit in myStateFrameBlock.StatePointer[i].EventMask
// ADDING TO ALL RIGHT NOW, SHOULD LIMIT TO ONLY THE ONES IN USE
@@ -273,7 +267,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
}
}
-
//// READ FUNCTION CODE CHUNKS
//// Functions + Function start pos (GFR)
//// TODO: Somehow be able to identify and reference this
@@ -293,7 +286,7 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
{
for (int i = 0; i < myStateFrameBlock.StateCount; i++)
{
- // TODO: Somehow organize events and functions so they can be found again,
+ // TODO: Somehow organize events and functions so they can be found again,
// two level search ain't no good
for (int ii = 0; ii < myStateFrameBlock.StatePointer[i].EventMask.Count - 1; ii++)
{
@@ -320,7 +313,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
}
}
-
if (Common.IL_CreateFunctionList)
IL_INSERT_FUNCTIONLIST();
}
@@ -371,7 +363,7 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
//private byte[] br_read_smallendian(int len)
//{
- // byte[] bytes = new byte[len];
+ // byte[] bytes = new byte[len];
// br.Read(bytes,0, len);
// return bytes;
//}
@@ -459,7 +451,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
Common.SendToDebug("Return type #" + myCodeChunk.ReturnType.ObjectType + ": " +
((LSO_Enums.Variable_Type_Codes) myCodeChunk.ReturnType.ObjectType).ToString());
-
// TODO: How to determine number of codechunks -- does this method work?
myCodeChunk.CodeChunkArguments = new List();
byte reader = br_read(1)[0];
@@ -492,7 +483,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
// End marker is 0x000
myCodeChunk.EndMarker = reader;
-
//
// Emit: START OF METHOD (FUNCTION)
//
@@ -515,11 +505,9 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
Common.SendToDebug("CLR:" + eventname + ":ILGenerator il = methodBuilder.GetILGenerator();");
ILGenerator il = methodBuilder.GetILGenerator();
-
if (Common.IL_UseTryCatch)
IL_INSERT_TRY(il, eventname);
-
// Push Console.WriteLine command to stack ... Console.WriteLine("Hello World!");
//Common.SendToDebug("CLR:" + eventname + ":il.Emit(OpCodes.Call...");
//il.Emit(OpCodes.Call, typeof(Console).GetMethod
@@ -534,7 +522,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
il.Emit(OpCodes.Ldarg, _ic);
}
-
//
// CALLING OPCODE PROCESSOR, one command at the time TO GENERATE IL
//
@@ -544,7 +531,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
FoundRet = LSL_PROCESS_OPCODE(il);
}
-
if (Common.IL_UseTryCatch)
IL_INSERT_END_TRY(il, eventname);
@@ -558,17 +544,14 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
{
Common.SendToDebug("Creating function list");
-
string eventname = "GetFunctions";
Common.SendToDebug("Creating IL " + eventname);
// Define a private String field.
//FieldBuilder myField = myTypeBuilder.DefineField("EventList", typeof(String[]), FieldAttributes.Public);
-
//FieldBuilder mem = typeBuilder.DefineField("mem", typeof(Array), FieldAttributes.Private);
-
MethodBuilder methodBuilder = typeBuilder.DefineMethod(eventname,
MethodAttributes.Public,
typeof (string[]),
@@ -579,7 +562,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
ILGenerator il = methodBuilder.GetILGenerator();
-
// IL_INSERT_TRY(il, eventname);
// // Push string to stack
@@ -615,17 +597,14 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
//il.Emit(OpCodes.Call, typeof(LSL_BaseClass).GetMethod("AddFunction", new Type[] { typeof(string) }));
}
-
// IL_INSERT_END_TRY(il, eventname);
-
il.Emit(OpCodes.Ldloc_0); // Load local variable 0 onto stack
// il.Emit(OpCodes.Call, typeof(LSL_BaseClass).GetMethod("SetFunctionList", new Type[] { typeof(Array) }));
il.Emit(OpCodes.Ret); // Return
}
-
private void IL_INSERT_TRY(ILGenerator il, string eventname)
{
/*
@@ -687,7 +666,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
{
Common.SendToDebug("Found cached STATIC BLOCK");
-
return StaticBlocks[pos];
}
diff --git a/OpenSim/Region/ScriptEngine/LSOEngine/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/LSOEngine/Properties/AssemblyInfo.cs
index 78b44a0..5210ff0 100644
--- a/OpenSim/Region/ScriptEngine/LSOEngine/Properties/AssemblyInfo.cs
+++ b/OpenSim/Region/ScriptEngine/LSOEngine/Properties/AssemblyInfo.cs
@@ -28,7 +28,7 @@
using System.Reflection;
using System.Runtime.InteropServices;
-// General Information about an assembly is controlled through the following
+// General information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
@@ -41,8 +41,8 @@ using System.Runtime.InteropServices;
[assembly : AssemblyTrademark("")]
[assembly : AssemblyCulture("")]
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly : ComVisible(false)]
@@ -54,11 +54,11 @@ using System.Runtime.InteropServices;
// Version information for an assembly consists of the following four values:
//
// Major Version
-// Minor Version
+// Minor Version
// Build Number
// Revision
//
-// You can specify all the values or you can default the Revision and Build Numbers
+// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly : AssemblyVersion("1.0.0.0")]
diff --git a/OpenSim/Region/ScriptEngine/LSOEngine/ScriptManager.cs b/OpenSim/Region/ScriptEngine/LSOEngine/ScriptManager.cs
index 20d1a58..617d6f6 100644
--- a/OpenSim/Region/ScriptEngine/LSOEngine/ScriptManager.cs
+++ b/OpenSim/Region/ScriptEngine/LSOEngine/ScriptManager.cs
@@ -92,7 +92,7 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine
// Fire the first start-event
int eventFlags = m_scriptEngine.m_ScriptManager.GetStateEventFlags(localID, itemID);
- m_host.SetScriptEvents(itemID, eventFlags);
+ m_host.SetScriptEvents(itemID, eventFlags);
m_scriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "state_entry", EventQueueManager.llDetectNull, new object[] { });
}
catch (Exception e) // LEGIT - User Script Compilation
--
cgit v1.1