diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ExtensionsScriptModule/Engines/JVMEngine/JVM/Thread.cs | 111 |
1 files changed, 0 insertions, 111 deletions
diff --git a/OpenSim/Region/ExtensionsScriptModule/Engines/JVMEngine/JVM/Thread.cs b/OpenSim/Region/ExtensionsScriptModule/Engines/JVMEngine/JVM/Thread.cs deleted file mode 100644 index 3e9d0f4..0000000 --- a/OpenSim/Region/ExtensionsScriptModule/Engines/JVMEngine/JVM/Thread.cs +++ /dev/null | |||
@@ -1,111 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSim Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using OpenSim.Region.Environment.Scenes; | ||
29 | using OpenSim.Region.ExtensionsScriptModule.Engines.JVMEngine.Types; | ||
30 | using OpenSim.Region.ExtensionsScriptModule.Engines.JVMEngine.Types.PrimitiveTypes; | ||
31 | |||
32 | namespace OpenSim.Region.ExtensionsScriptModule.Engines.JVMEngine.JVM | ||
33 | { | ||
34 | public partial class Thread | ||
35 | { | ||
36 | // Is this smart? | ||
37 | public static MainMemory GlobalMemory; | ||
38 | public static Scene World; | ||
39 | private int PC = 0; | ||
40 | private Stack stack; | ||
41 | private Interpreter m_Interpreter; | ||
42 | public ClassRecord currentClass; | ||
43 | public ClassInstance currentInstance; | ||
44 | private StackFrame m_currentFrame; | ||
45 | public int excutionCounter = 0; | ||
46 | public bool running = false; | ||
47 | |||
48 | public ScriptInfo scriptInfo; | ||
49 | |||
50 | public Thread() | ||
51 | { | ||
52 | m_Interpreter = new Interpreter(this); | ||
53 | stack = new Stack(); | ||
54 | } | ||
55 | |||
56 | public void SetPC(int methodpointer) | ||
57 | { | ||
58 | //Console.WriteLine("Thread PC has been set to " + methodpointer); | ||
59 | PC = methodpointer; | ||
60 | } | ||
61 | |||
62 | public void StartMethod(ClassRecord rec, string methName) | ||
63 | { | ||
64 | m_currentFrame = new StackFrame(); | ||
65 | stack.StackFrames.Push(m_currentFrame); | ||
66 | currentClass = rec; | ||
67 | currentClass.StartMethod(this, methName); | ||
68 | } | ||
69 | |||
70 | public void StartMethod(string methName) | ||
71 | { | ||
72 | m_currentFrame = new StackFrame(); | ||
73 | stack.StackFrames.Push(m_currentFrame); | ||
74 | currentClass.StartMethod(this, methName); | ||
75 | } | ||
76 | |||
77 | public void JumpToStaticVoidMethod(string methName, int returnPC) | ||
78 | { | ||
79 | m_currentFrame = new StackFrame(); | ||
80 | m_currentFrame.ReturnPC = returnPC; | ||
81 | stack.StackFrames.Push(m_currentFrame); | ||
82 | currentClass.StartMethod(this, methName); | ||
83 | } | ||
84 | |||
85 | public void JumpToStaticParamMethod(string methName, string param, int returnPC) | ||
86 | { | ||
87 | if (param == "I") | ||
88 | { | ||
89 | BaseType bs1 = m_currentFrame.OpStack.Pop(); | ||
90 | m_currentFrame = new StackFrame(); | ||
91 | m_currentFrame.ReturnPC = returnPC; | ||
92 | stack.StackFrames.Push(m_currentFrame); | ||
93 | m_currentFrame.LocalVariables[0] = ((Int) bs1); | ||
94 | currentClass.StartMethod(this, methName); | ||
95 | } | ||
96 | if (param == "F") | ||
97 | { | ||
98 | } | ||
99 | } | ||
100 | |||
101 | public void JumpToClassStaticVoidMethod(string className, string methName, int returnPC) | ||
102 | { | ||
103 | } | ||
104 | |||
105 | public bool Excute() | ||
106 | { | ||
107 | excutionCounter++; | ||
108 | return m_Interpreter.Excute(); | ||
109 | } | ||
110 | } | ||
111 | } \ No newline at end of file | ||