diff options
author | Adam Frisby | 2007-07-11 08:02:47 +0000 |
---|---|---|
committer | Adam Frisby | 2007-07-11 08:02:47 +0000 |
commit | 5c7ffdde0b9642a42e8f5987e06eb01220ff7776 (patch) | |
tree | 4b825dc642cb6eb9a060e54bf8d69288fbee4904 /OpenSim/OpenSim.Scripting/EmbeddedJVM/Thread.cs | |
parent | Who would have known that the only way of specifying utf-8 without preamble, ... (diff) | |
download | opensim-SC-5c7ffdde0b9642a42e8f5987e06eb01220ff7776.zip opensim-SC-5c7ffdde0b9642a42e8f5987e06eb01220ff7776.tar.gz opensim-SC-5c7ffdde0b9642a42e8f5987e06eb01220ff7776.tar.bz2 opensim-SC-5c7ffdde0b9642a42e8f5987e06eb01220ff7776.tar.xz |
* Wiping trunk in prep for Sugilite
Diffstat (limited to '')
-rw-r--r-- | OpenSim/OpenSim.Scripting/EmbeddedJVM/Thread.cs | 115 |
1 files changed, 0 insertions, 115 deletions
diff --git a/OpenSim/OpenSim.Scripting/EmbeddedJVM/Thread.cs b/OpenSim/OpenSim.Scripting/EmbeddedJVM/Thread.cs deleted file mode 100644 index 6813a20..0000000 --- a/OpenSim/OpenSim.Scripting/EmbeddedJVM/Thread.cs +++ /dev/null | |||
@@ -1,115 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://www.openmetaverse.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 System; | ||
29 | using System.Collections.Generic; | ||
30 | using System.Text; | ||
31 | using OpenSim.Scripting.EmbeddedJVM.Types; | ||
32 | using OpenSim.Scripting.EmbeddedJVM.Types.PrimitiveTypes; | ||
33 | using OpenSim.Framework; | ||
34 | using OpenSim.Framework.Interfaces; | ||
35 | |||
36 | namespace OpenSim.Scripting.EmbeddedJVM | ||
37 | { | ||
38 | public partial class Thread | ||
39 | { | ||
40 | public static MainMemory GlobalMemory; | ||
41 | public static IScriptAPI OpenSimScriptAPI; | ||
42 | private int PC = 0; | ||
43 | private Stack stack; | ||
44 | private Interpreter mInterpreter; | ||
45 | public ClassRecord currentClass; | ||
46 | public ClassInstance currentInstance; | ||
47 | private StackFrame currentFrame; | ||
48 | public int excutionCounter = 0; | ||
49 | public bool running = false; | ||
50 | public uint EntityId = 0; | ||
51 | |||
52 | public Thread() | ||
53 | { | ||
54 | this.mInterpreter = new Interpreter(this); | ||
55 | this.stack = new Stack(); | ||
56 | } | ||
57 | |||
58 | public void SetPC(int methodpointer) | ||
59 | { | ||
60 | //Console.WriteLine("Thread PC has been set to " + methodpointer); | ||
61 | PC = methodpointer; | ||
62 | } | ||
63 | |||
64 | public void StartMethod(ClassRecord rec, string methName) | ||
65 | { | ||
66 | currentFrame = new StackFrame(); | ||
67 | this.stack.StackFrames.Push(currentFrame); | ||
68 | this.currentClass = rec; | ||
69 | currentClass.StartMethod(this, methName); | ||
70 | } | ||
71 | |||
72 | public void StartMethod( string methName) | ||
73 | { | ||
74 | currentFrame = new StackFrame(); | ||
75 | this.stack.StackFrames.Push(currentFrame); | ||
76 | currentClass.StartMethod(this, methName); | ||
77 | } | ||
78 | |||
79 | public void JumpToStaticVoidMethod(string methName, int returnPC) | ||
80 | { | ||
81 | currentFrame = new StackFrame(); | ||
82 | currentFrame.ReturnPC = returnPC; | ||
83 | this.stack.StackFrames.Push(currentFrame); | ||
84 | currentClass.StartMethod(this, methName); | ||
85 | } | ||
86 | |||
87 | public void JumpToStaticParamMethod(string methName, string param, int returnPC) | ||
88 | { | ||
89 | if (param == "I") | ||
90 | { | ||
91 | BaseType bs1 = currentFrame.OpStack.Pop(); | ||
92 | currentFrame = new StackFrame(); | ||
93 | currentFrame.ReturnPC = returnPC; | ||
94 | this.stack.StackFrames.Push(currentFrame); | ||
95 | currentFrame.LocalVariables[0] = ((Int)bs1); | ||
96 | currentClass.StartMethod(this, methName); | ||
97 | } | ||
98 | if (param == "F") | ||
99 | { | ||
100 | |||
101 | } | ||
102 | } | ||
103 | |||
104 | public void JumpToClassStaticVoidMethod(string className, string methName, int returnPC) | ||
105 | { | ||
106 | |||
107 | } | ||
108 | |||
109 | public bool Excute() | ||
110 | { | ||
111 | excutionCounter++; | ||
112 | return this.mInterpreter.Excute(); | ||
113 | } | ||
114 | } | ||
115 | } | ||