diff options
author | Tedd Hansen | 2007-08-17 18:39:04 +0000 |
---|---|---|
committer | Tedd Hansen | 2007-08-17 18:39:04 +0000 |
commit | f2dd6c86f79d01cbb885331dcef00b794258d448 (patch) | |
tree | a70d0a7aa40cdcfe9e4babae6504a3d42e817738 | |
parent | krinkec's updates to ll* interface and functions. (diff) | |
download | opensim-SC-f2dd6c86f79d01cbb885331dcef00b794258d448.zip opensim-SC-f2dd6c86f79d01cbb885331dcef00b794258d448.tar.gz opensim-SC-f2dd6c86f79d01cbb885331dcef00b794258d448.tar.bz2 opensim-SC-f2dd6c86f79d01cbb885331dcef00b794258d448.tar.xz |
Added RAIL.dll
Updated DotSets.dll and Mono.PEToolkit.dll
Started on microthreading - currently display exception during startup
-rw-r--r-- | OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/DotNetEngine/TempDotNetMicroThreadingCodeInjector.cs | 41 | ||||
-rw-r--r-- | bin/RAIL.dll | bin | 0 -> 200704 bytes | |||
-rw-r--r-- | prebuild.xml | 1 |
4 files changed, 43 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs index 5606287..b6debcf 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs | |||
@@ -190,7 +190,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine | |||
190 | private string ProcessYield(string FileName) | 190 | private string ProcessYield(string FileName) |
191 | { | 191 | { |
192 | // TODO: Create a new assembly and copy old but insert Yield Code | 192 | // TODO: Create a new assembly and copy old but insert Yield Code |
193 | return FileName; | 193 | return TempDotNetMicroThreadingCodeInjector.TestFix(FileName); |
194 | } | 194 | } |
195 | 195 | ||
196 | private AppDomain GetFreeAppDomain() | 196 | private AppDomain GetFreeAppDomain() |
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/TempDotNetMicroThreadingCodeInjector.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/TempDotNetMicroThreadingCodeInjector.cs new file mode 100644 index 0000000..dd3ce09 --- /dev/null +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/TempDotNetMicroThreadingCodeInjector.cs | |||
@@ -0,0 +1,41 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | using Rail.Transformation; | ||
5 | using Rail.Reflect; | ||
6 | using Rail.Exceptions; | ||
7 | using Rail.MSIL; | ||
8 | |||
9 | namespace OpenSim.Region.ScriptEngine.DotNetEngine | ||
10 | { | ||
11 | class TempDotNetMicroThreadingCodeInjector | ||
12 | { | ||
13 | public static string TestFix(string FileName) | ||
14 | { | ||
15 | string ret = System.IO.Path.GetFileNameWithoutExtension(FileName + "_fixed.dll"); | ||
16 | |||
17 | Console.WriteLine("Loading: \"" + FileName + "\""); | ||
18 | RAssemblyDef rAssembly = RAssemblyDef.LoadAssembly(FileName); | ||
19 | |||
20 | |||
21 | //Get the type of the method to copy from assembly Teste2.exe to assembly Teste.exe | ||
22 | RTypeDef type = (RTypeDef)rAssembly.RModuleDef.GetType("SecondLife.Script"); | ||
23 | |||
24 | //Get the methods in the type | ||
25 | RMethod[] m = type.GetMethods(); | ||
26 | |||
27 | //Create a MethodPrologueAdder visitor object with the method to add | ||
28 | //and with the flag that enables local variable creation set to true | ||
29 | MethodPrologueAdder mpa = new MethodPrologueAdder((RMethodDef)m[0], true); | ||
30 | |||
31 | //Apply the changes to the assembly | ||
32 | rAssembly.Accept(mpa); | ||
33 | |||
34 | //Save the new assembly | ||
35 | rAssembly.SaveAssembly(ret); | ||
36 | |||
37 | return ret; | ||
38 | |||
39 | } | ||
40 | } | ||
41 | } | ||
diff --git a/bin/RAIL.dll b/bin/RAIL.dll new file mode 100644 index 0000000..f2632d7 --- /dev/null +++ b/bin/RAIL.dll | |||
Binary files differ | |||
diff --git a/prebuild.xml b/prebuild.xml index d1bb30f..1e84541 100644 --- a/prebuild.xml +++ b/prebuild.xml | |||
@@ -958,6 +958,7 @@ | |||
958 | <Reference name="OpenSim.Region.Environment" /> | 958 | <Reference name="OpenSim.Region.Environment" /> |
959 | <Reference name="Axiom.MathLib.dll" localCopy="false"/> | 959 | <Reference name="Axiom.MathLib.dll" localCopy="false"/> |
960 | <Reference name="libsecondlife.dll"/> | 960 | <Reference name="libsecondlife.dll"/> |
961 | <Reference name="RAIL.dll"/> | ||
961 | <Reference name="OpenSim.Framework"/> | 962 | <Reference name="OpenSim.Framework"/> |
962 | <Reference name="OpenSim.Framework.Console"/> | 963 | <Reference name="OpenSim.Framework.Console"/> |
963 | <Files> | 964 | <Files> |