By now you all have learned that when I'm committing scripting usually doesn't work, so no big surprise. :)

Modified baseclass for compiled script to incorp new OSSL commands class and renamed it to follow standards and all that. Scripts may work again. :)
This commit is contained in:
Tedd Hansen
2008-02-24 16:41:56 +00:00
parent 952c8de189
commit 8af64c979f
6 changed files with 2284 additions and 2278 deletions

View File

@@ -86,7 +86,7 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
TypeBuilder typeBuilder = modBuilder.DefineType(
"LSL_ScriptObject",
TypeAttributes.Public | TypeAttributes.BeforeFieldInit,
typeof (LSL_BaseClass));
typeof (BuiltIn_Commands_BaseClass));
//,
// typeof());
//, typeof(LSL_BuiltIn_Commands_Interface));
@@ -179,7 +179,7 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
new Type[0]);
//Define the reflection ConstructorInfor for System.Object
ConstructorInfo conObj = typeof (LSL_BaseClass).GetConstructor(new Type[0]);
ConstructorInfo conObj = typeof (BuiltIn_Commands_BaseClass).GetConstructor(new Type[0]);
//call constructor of base object
ILGenerator il = constructor.GetILGenerator();
@@ -272,7 +272,7 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
// Make call
il.Emit(OpCodes.Call,
typeof (LSL_BaseClass).GetMethod("AddToStatic", new Type[] {typeof (UInt32), datatype}));
typeof (BuiltIn_Commands_BaseClass).GetMethod("AddToStatic", new Type[] {typeof (UInt32), datatype}));
}
}

View File

@@ -162,7 +162,7 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
if (mi.Name == fname)
{
il.Emit(OpCodes.Ldarg_0);
il.Emit(OpCodes.Call, typeof (LSL_BaseClass).GetMethod("GetLSL_BuiltIn", new Type[] {}));
il.Emit(OpCodes.Call, typeof (BuiltIn_Commands_BaseClass).GetMethod("GetLSL_BuiltIn", new Type[] {}));
// Pop required number of items from my stack to .Net stack
IL_PopToStack(il, mi.GetParameters().Length);
il.Emit(OpCodes.Callvirt, mi);
@@ -377,7 +377,7 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
private void IL_CallBaseFunction(ILGenerator il, string methodname)
{
il.Emit(OpCodes.Ldarg_0);
il.Emit(OpCodes.Call, typeof (LSL_BaseClass).GetMethod(methodname, new Type[] {}));
il.Emit(OpCodes.Call, typeof (BuiltIn_Commands_BaseClass).GetMethod(methodname, new Type[] {}));
}
private void IL_CallBaseFunction(ILGenerator il, string methodname, object data)
@@ -387,7 +387,7 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
il.Emit(OpCodes.Ldstr, (string) data);
if (data.GetType() == typeof (UInt32))
il.Emit(OpCodes.Ldc_I4, (UInt32) data);
il.Emit(OpCodes.Call, typeof (LSL_BaseClass).GetMethod(methodname, new Type[] {data.GetType()}));
il.Emit(OpCodes.Call, typeof (BuiltIn_Commands_BaseClass).GetMethod(methodname, new Type[] {data.GetType()}));
}
private void IL_Push(ILGenerator il, object data)
@@ -397,7 +397,7 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine.LSO
IL_PushDataTypeToILStack(il, data);
il.Emit(OpCodes.Call, typeof (LSL_BaseClass).GetMethod("PUSH", new Type[] {data.GetType()}));
il.Emit(OpCodes.Call, typeof (BuiltIn_Commands_BaseClass).GetMethod("PUSH", new Type[] {data.GetType()}));
}
private void IL_PushDataTypeToILStack(ILGenerator il, object data)