aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/OpenSim.Scripting/EmbeddedJVM/Interpreter.cs
diff options
context:
space:
mode:
authorMW2007-06-14 10:36:19 +0000
committerMW2007-06-14 10:36:19 +0000
commit1fef45bc2ba7111f9fd8b89d71334b741940580a (patch)
tree70744347f1c9b558fe39078bec6bd40cb65dc0b6 /OpenSim/OpenSim.Scripting/EmbeddedJVM/Interpreter.cs
parentFixed the bug that makes a region use its water height as its name (in region... (diff)
downloadopensim-SC-1fef45bc2ba7111f9fd8b89d71334b741940580a.zip
opensim-SC-1fef45bc2ba7111f9fd8b89d71334b741940580a.tar.gz
opensim-SC-1fef45bc2ba7111f9fd8b89d71334b741940580a.tar.bz2
opensim-SC-1fef45bc2ba7111f9fd8b89d71334b741940580a.tar.xz
Commented out the Scene.Backup method for now as there isn't really anything to Backup yet and it might be the cause of a memory leak.
Deleted EmbeddedJVM scripting engine, not being used. "If" we ever decide to use it then it can be re-added.
Diffstat (limited to '')
-rw-r--r--OpenSim/OpenSim.Scripting/EmbeddedJVM/Interpreter.cs135
1 files changed, 0 insertions, 135 deletions
diff --git a/OpenSim/OpenSim.Scripting/EmbeddedJVM/Interpreter.cs b/OpenSim/OpenSim.Scripting/EmbeddedJVM/Interpreter.cs
deleted file mode 100644
index c5995b2..0000000
--- a/OpenSim/OpenSim.Scripting/EmbeddedJVM/Interpreter.cs
+++ /dev/null
@@ -1,135 +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*/
28using System;
29using System.Collections.Generic;
30using System.Text;
31using OpenSim.Scripting.EmbeddedJVM.Types;
32using OpenSim.Scripting.EmbeddedJVM.Types.PrimitiveTypes;
33
34namespace OpenSim.Scripting.EmbeddedJVM
35{
36 partial class Thread
37 {
38 private partial class Interpreter
39 {
40 private Thread _mThread;
41
42 public Interpreter(Thread parentThread)
43 {
44 _mThread = parentThread;
45 }
46
47 public bool Excute()
48 {
49 bool run = true;
50 byte currentOpCode = GlobalMemory.MethodArea.MethodBuffer[this._mThread.PC++];
51 // Console.WriteLine("opCode is: " + currentOpCode);
52 bool handled = false;
53
54 handled = this.IsLogicOpCode(currentOpCode);
55 if (!handled)
56 {
57 handled = this.IsMethodOpCode(currentOpCode);
58 }
59 if (!handled)
60 {
61 if (currentOpCode == 172)
62 {
63 if (this._mThread.stack.StackFrames.Count > 1)
64 {
65 Console.WriteLine("returning int from function");
66 int retPC1 = this._mThread.currentFrame.ReturnPC;
67 BaseType bas1 = this._mThread.currentFrame.OpStack.Pop();
68 this._mThread.stack.StackFrames.Pop();
69 this._mThread.currentFrame = this._mThread.stack.StackFrames.Peek();
70 this._mThread.PC = retPC1;
71 if (bas1 is Int)
72 {
73 this._mThread.currentFrame.OpStack.Push((Int)bas1);
74 }
75 }
76 else
77 {
78 // Console.WriteLine("No parent function so ending program");
79 this._mThread.stack.StackFrames.Pop();
80 run = false;
81 }
82 handled = true;
83 }
84 if (currentOpCode == 174)
85 {
86 if (this._mThread.stack.StackFrames.Count > 1)
87 {
88 Console.WriteLine("returning float from function");
89 int retPC1 = this._mThread.currentFrame.ReturnPC;
90 BaseType bas1 = this._mThread.currentFrame.OpStack.Pop();
91 this._mThread.stack.StackFrames.Pop();
92 this._mThread.currentFrame = this._mThread.stack.StackFrames.Peek();
93 this._mThread.PC = retPC1;
94 if (bas1 is Float)
95 {
96 this._mThread.currentFrame.OpStack.Push((Float)bas1);
97 }
98 }
99 else
100 {
101 // Console.WriteLine("No parent function so ending program");
102 this._mThread.stack.StackFrames.Pop();
103 run = false;
104 }
105 handled = true;
106 }
107 if (currentOpCode == 177)
108 {
109 if (this._mThread.stack.StackFrames.Count > 1)
110 {
111 Console.WriteLine("returning from function");
112 int retPC = this._mThread.currentFrame.ReturnPC;
113 this._mThread.stack.StackFrames.Pop();
114 this._mThread.currentFrame = this._mThread.stack.StackFrames.Peek();
115 this._mThread.PC = retPC;
116 }
117 else
118 {
119 // Console.WriteLine("No parent function so ending program");
120 this._mThread.stack.StackFrames.Pop();
121 run = false;
122 }
123 handled = true;
124 }
125 }
126 if (!handled)
127 {
128 Console.WriteLine("opcode " + currentOpCode + " not been handled ");
129 }
130 return run;
131
132 }
133 }
134 }
135}