aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/YEngine/MMRScriptCompValu.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/YEngine/MMRScriptCompValu.cs41
1 files changed, 28 insertions, 13 deletions
diff --git a/OpenSim/Region/ScriptEngine/YEngine/MMRScriptCompValu.cs b/OpenSim/Region/ScriptEngine/YEngine/MMRScriptCompValu.cs
index 17bc3ec..675ab9a 100644
--- a/OpenSim/Region/ScriptEngine/YEngine/MMRScriptCompValu.cs
+++ b/OpenSim/Region/ScriptEngine/YEngine/MMRScriptCompValu.cs
@@ -107,8 +107,10 @@ namespace OpenSim.Region.ScriptEngine.Yengine
107 return (type.ToLSLWrapType() != null) ? type.ToLSLWrapType() : type.ToSysType(); 107 return (type.ToLSLWrapType() != null) ? type.ToLSLWrapType() : type.ToSysType();
108 } 108 }
109 109
110 // if a field of an XMRInstArrays array cannot be directly written, 110 /*
111 // get the method that can write it 111 * if a field of an XMRInstArrays array cannot be directly written,
112 * get the method that can write it
113 */
112 private static MethodInfo ArrVarPopMeth(FieldInfo fi) 114 private static MethodInfo ArrVarPopMeth(FieldInfo fi)
113 { 115 {
114 if(fi.Name == "iarLists") 116 if(fi.Name == "iarLists")
@@ -120,7 +122,9 @@ namespace OpenSim.Region.ScriptEngine.Yengine
120 return null; 122 return null;
121 } 123 }
122 124
123 // emit code to push value onto stack 125 /*
126 * emit code to push value onto stack
127 */
124 public void PushVal(ScriptCodeGen scg, Token errorAt, TokenType stackType) 128 public void PushVal(ScriptCodeGen scg, Token errorAt, TokenType stackType)
125 { 129 {
126 this.PushVal(scg, errorAt, stackType, false); 130 this.PushVal(scg, errorAt, stackType, false);
@@ -133,7 +137,9 @@ namespace OpenSim.Region.ScriptEngine.Yengine
133 public abstract void PushVal(ScriptCodeGen scg, Token errorAt); 137 public abstract void PushVal(ScriptCodeGen scg, Token errorAt);
134 public abstract void PushRef(ScriptCodeGen scg, Token errorAt); 138 public abstract void PushRef(ScriptCodeGen scg, Token errorAt);
135 139
136 // emit code to pop value from stack 140 /*
141 * emit code to pop value from stack
142 */
137 public void PopPost(ScriptCodeGen scg, Token errorAt, TokenType stackType) 143 public void PopPost(ScriptCodeGen scg, Token errorAt, TokenType stackType)
138 { 144 {
139 TypeCast.CastTopOfStack(scg, errorAt, stackType, this.type, false); 145 TypeCast.CastTopOfStack(scg, errorAt, stackType, this.type, false);
@@ -141,11 +147,18 @@ namespace OpenSim.Region.ScriptEngine.Yengine
141 } 147 }
142 public virtual void PopPre(ScriptCodeGen scg, Token errorAt) 148 public virtual void PopPre(ScriptCodeGen scg, Token errorAt)
143 { 149 {
144 } // call this before pushing value to be popped 150 }
151
152 /*
153 * call this before pushing value to be popped
154 */
145 public abstract void PopPost(ScriptCodeGen scg, Token errorAt); // call this after pushing value to be popped 155 public abstract void PopPost(ScriptCodeGen scg, Token errorAt); // call this after pushing value to be popped
146 156
147 // return true: doing a PushVal() does not involve CheckRun() 157
148 // false: otherwise 158 /*
159 * return true: doing a PushVal() does not involve CheckRun()
160 * false: otherwise
161 */
149 public virtual bool IsReadTrivial(ScriptCodeGen scg, Token readAt) 162 public virtual bool IsReadTrivial(ScriptCodeGen scg, Token readAt)
150 { 163 {
151 return true; 164 return true;
@@ -173,12 +186,14 @@ namespace OpenSim.Region.ScriptEngine.Yengine
173 return ((TokenTypeSDTypeDelegate)type).decl.GetArgSig(); 186 return ((TokenTypeSDTypeDelegate)type).decl.GetArgSig();
174 } 187 }
175 188
176 // These are used only if type is a delegate too 189 /*
177 // - but it is a real delegate pointer in a global or local variable or a field, etc 190 * These are used only if type is a delegate too
178 // ie, PushVal() pushes a delegate pointer 191 * - but it is a real delegate pointer in a global or local variable or a field, etc
179 // - so we must have CallPre() push the delegate pointer as a 'this' for this.Invoke(...) 192 * - ie, PushVal() pushes a delegate pointer
180 // - and CallPost() call the delegate's Invoke() method 193 * - so we must have CallPre() push the delegate pointer as a 'this' for this.Invoke(...)
181 // - we assume the target function is non-trivial so we always use a call label 194 * - and CallPost() call the delegate's Invoke() method
195 * - we assume the target function is non-trivial so we always use a call label
196 */
182 public virtual void CallPre(ScriptCodeGen scg, Token errorAt) // call this before pushing arguments 197 public virtual void CallPre(ScriptCodeGen scg, Token errorAt) // call this before pushing arguments
183 { 198 {
184 new ScriptCodeGen.CallLabel(scg, errorAt); 199 new ScriptCodeGen.CallLabel(scg, errorAt);