diff options
author | Dr Scofield | 2008-06-30 11:57:47 +0000 |
---|---|---|
committer | Dr Scofield | 2008-06-30 11:57:47 +0000 |
commit | 313f7f60fda81c987e0ac4da4dc8c2f5def46b72 (patch) | |
tree | 71c30ab49c97a17d157c59877842d159f5eac3e1 /OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog | |
parent | disables spam-like debugging messages inadvertently left on in last commit (o... (diff) | |
download | opensim-SC_OLD-313f7f60fda81c987e0ac4da4dc8c2f5def46b72.zip opensim-SC_OLD-313f7f60fda81c987e0ac4da4dc8c2f5def46b72.tar.gz opensim-SC_OLD-313f7f60fda81c987e0ac4da4dc8c2f5def46b72.tar.bz2 opensim-SC_OLD-313f7f60fda81c987e0ac4da4dc8c2f5def46b72.tar.xz |
properly explaining each #pragma warning disable
massaging OSHttpRequestPump to not abort on exceptions...
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog')
7 files changed, 93 insertions, 93 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/BagofAnswers.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/BagofAnswers.cs index c52adb1..c2bb0b7 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/BagofAnswers.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/BagofAnswers.cs | |||
@@ -127,27 +127,27 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
127 | // No unbound free variables, so we only filled one bag. If empty, bagof fails. | 127 | // No unbound free variables, so we only filled one bag. If empty, bagof fails. |
128 | if (_findallBagArray.Count > 0) | 128 | if (_findallBagArray.Count > 0) |
129 | { | 129 | { |
130 | // disable warning on l1, don't see how we can | 130 | // disable warning: don't see how we can code this differently short |
131 | // code this differently | 131 | // of rewriting the whole thing |
132 | #pragma warning disable 0168 | 132 | #pragma warning disable 0168 |
133 | foreach (bool l1 in bagArrayVariable.unify(_findallBagArray)) | 133 | foreach (bool l1 in bagArrayVariable.unify(_findallBagArray)) |
134 | yield return false; | 134 | yield return false; |
135 | #pragma warning restore 0168 | 135 | #pragma warning restore 0168 |
136 | } | 136 | } |
137 | } | 137 | } |
138 | else | 138 | else |
139 | { | 139 | { |
140 | foreach (KeyValuePair<object[], List<object>> valuesAndBag in _bagForFreeVariables) | 140 | foreach (KeyValuePair<object[], List<object>> valuesAndBag in _bagForFreeVariables) |
141 | { | 141 | { |
142 | // disable warning on l1 and l2, don't see how we can | 142 | // disable warning: don't see how we can code this differently short |
143 | // code this differently | 143 | // of rewriting the whole thing |
144 | #pragma warning disable 0168 | 144 | #pragma warning disable 0168 |
145 | foreach (bool l1 in YP.unifyArrays(_freeVariables, valuesAndBag.Key)) | 145 | foreach (bool l1 in YP.unifyArrays(_freeVariables, valuesAndBag.Key)) |
146 | { | 146 | { |
147 | foreach (bool l2 in bagArrayVariable.unify(valuesAndBag.Value)) | 147 | foreach (bool l2 in bagArrayVariable.unify(valuesAndBag.Value)) |
148 | yield return false; | 148 | yield return false; |
149 | } | 149 | } |
150 | #pragma warning restore 0168 | 150 | #pragma warning restore 0168 |
151 | // Debug: Should we free memory of the answers already returned? | 151 | // Debug: Should we free memory of the answers already returned? |
152 | } | 152 | } |
153 | } | 153 | } |
@@ -161,15 +161,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
161 | public IEnumerable<bool> result(object Bag) | 161 | public IEnumerable<bool> result(object Bag) |
162 | { | 162 | { |
163 | Variable bagArrayVariable = new Variable(); | 163 | Variable bagArrayVariable = new Variable(); |
164 | // disable warning on l1, don't see how we can | 164 | // disable warning: don't see how we can code this differently short |
165 | // code this differently | 165 | // of rewriting the whole thing |
166 | #pragma warning disable 0168 | 166 | #pragma warning disable 0168 |
167 | foreach (bool l1 in resultArray(bagArrayVariable)) | 167 | foreach (bool l1 in resultArray(bagArrayVariable)) |
168 | { | 168 | { |
169 | foreach (bool l2 in YP.unify(Bag, ListPair.make((List<object>)bagArrayVariable.getValue()))) | 169 | foreach (bool l2 in YP.unify(Bag, ListPair.make((List<object>)bagArrayVariable.getValue()))) |
170 | yield return false; | 170 | yield return false; |
171 | } | 171 | } |
172 | #pragma warning restore 0168 | 172 | #pragma warning restore 0168 |
173 | } | 173 | } |
174 | 174 | ||
175 | /// <summary> | 175 | /// <summary> |
@@ -181,9 +181,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
181 | public IEnumerable<bool> resultSet(object Bag) | 181 | public IEnumerable<bool> resultSet(object Bag) |
182 | { | 182 | { |
183 | Variable bagArrayVariable = new Variable(); | 183 | Variable bagArrayVariable = new Variable(); |
184 | // disable warning on l1, don't see how we can | 184 | // disable warning: don't see how we can code this differently short |
185 | // code this differently | 185 | // of rewriting the whole thing |
186 | #pragma warning disable 0168 | 186 | #pragma warning disable 0168 |
187 | foreach (bool l1 in resultArray(bagArrayVariable)) | 187 | foreach (bool l1 in resultArray(bagArrayVariable)) |
188 | { | 188 | { |
189 | List<object> bagArray = (List<object>)bagArrayVariable.getValue(); | 189 | List<object> bagArray = (List<object>)bagArrayVariable.getValue(); |
@@ -191,19 +191,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
191 | foreach (bool l2 in YP.unify(Bag, ListPair.makeWithoutRepeatedTerms(bagArray))) | 191 | foreach (bool l2 in YP.unify(Bag, ListPair.makeWithoutRepeatedTerms(bagArray))) |
192 | yield return false; | 192 | yield return false; |
193 | } | 193 | } |
194 | #pragma warning restore 0168 | 194 | #pragma warning restore 0168 |
195 | } | 195 | } |
196 | 196 | ||
197 | public static IEnumerable<bool> bagofArray | 197 | public static IEnumerable<bool> bagofArray |
198 | (object Template, object Goal, IEnumerable<bool> goalIterator, Variable bagArrayVariable) | 198 | (object Template, object Goal, IEnumerable<bool> goalIterator, Variable bagArrayVariable) |
199 | { | 199 | { |
200 | BagofAnswers bagOfAnswers = new BagofAnswers(Template, Goal); | 200 | BagofAnswers bagOfAnswers = new BagofAnswers(Template, Goal); |
201 | // disable warning on l1, don't see how we can | 201 | // disable warning: don't see how we can code this differently short |
202 | // code this differently | 202 | // of rewriting the whole thing |
203 | #pragma warning disable 0168 | 203 | #pragma warning disable 0168 |
204 | foreach (bool l1 in goalIterator) | 204 | foreach (bool l1 in goalIterator) |
205 | bagOfAnswers.add(); | 205 | bagOfAnswers.add(); |
206 | #pragma warning restore 0168 | 206 | #pragma warning restore 0168 |
207 | return bagOfAnswers.resultArray(bagArrayVariable); | 207 | return bagOfAnswers.resultArray(bagArrayVariable); |
208 | } | 208 | } |
209 | 209 | ||
@@ -211,12 +211,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
211 | (object Template, object Goal, IEnumerable<bool> goalIterator, object Bag) | 211 | (object Template, object Goal, IEnumerable<bool> goalIterator, object Bag) |
212 | { | 212 | { |
213 | BagofAnswers bagOfAnswers = new BagofAnswers(Template, Goal); | 213 | BagofAnswers bagOfAnswers = new BagofAnswers(Template, Goal); |
214 | // disable warning on l1, don't see how we can | 214 | // disable warning: don't see how we can code this differently short |
215 | // code this differently | 215 | // of rewriting the whole thing |
216 | #pragma warning disable 0168 | 216 | #pragma warning disable 0168 |
217 | foreach (bool l1 in goalIterator) | 217 | foreach (bool l1 in goalIterator) |
218 | bagOfAnswers.add(); | 218 | bagOfAnswers.add(); |
219 | #pragma warning restore 0168 | 219 | #pragma warning restore 0168 |
220 | return bagOfAnswers.result(Bag); | 220 | return bagOfAnswers.result(Bag); |
221 | } | 221 | } |
222 | 222 | ||
@@ -224,12 +224,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
224 | (object Template, object Goal, IEnumerable<bool> goalIterator, object Bag) | 224 | (object Template, object Goal, IEnumerable<bool> goalIterator, object Bag) |
225 | { | 225 | { |
226 | BagofAnswers bagOfAnswers = new BagofAnswers(Template, Goal); | 226 | BagofAnswers bagOfAnswers = new BagofAnswers(Template, Goal); |
227 | // disable warning on l1, don't see how we can | 227 | // disable warning: don't see how we can code this differently short |
228 | // code this differently | 228 | // of rewriting the whole thing |
229 | #pragma warning disable 0168 | 229 | #pragma warning disable 0168 |
230 | foreach (bool l1 in goalIterator) | 230 | foreach (bool l1 in goalIterator) |
231 | bagOfAnswers.add(); | 231 | bagOfAnswers.add(); |
232 | #pragma warning restore 0168 | 232 | #pragma warning restore 0168 |
233 | return bagOfAnswers.resultSet(Bag); | 233 | return bagOfAnswers.resultSet(Bag); |
234 | } | 234 | } |
235 | 235 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor2.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor2.cs index 7e4f27d..4ae325e 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor2.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor2.cs | |||
@@ -59,25 +59,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
59 | Functor2 argFunctor = (Functor2)arg; | 59 | Functor2 argFunctor = (Functor2)arg; |
60 | if (_name.Equals(argFunctor._name)) | 60 | if (_name.Equals(argFunctor._name)) |
61 | { | 61 | { |
62 | // disable warning on l1, don't see how we can | 62 | // disable warning: don't see how we can code this differently short |
63 | // code this differently | 63 | // of rewriting the whole thing |
64 | #pragma warning disable 0168 | 64 | #pragma warning disable 0168 |
65 | foreach (bool l1 in YP.unify(_arg1, argFunctor._arg1)) | 65 | foreach (bool l1 in YP.unify(_arg1, argFunctor._arg1)) |
66 | { | 66 | { |
67 | foreach (bool l2 in YP.unify(_arg2, argFunctor._arg2)) | 67 | foreach (bool l2 in YP.unify(_arg2, argFunctor._arg2)) |
68 | yield return false; | 68 | yield return false; |
69 | } | 69 | } |
70 | #pragma warning restore 0168 | 70 | #pragma warning restore 0168 |
71 | } | 71 | } |
72 | } | 72 | } |
73 | else if (arg is Variable) | 73 | else if (arg is Variable) |
74 | { | 74 | { |
75 | // disable warning on l1, don't see how we can | 75 | // disable warning: don't see how we can code this differently short |
76 | // code this differently | 76 | // of rewriting the whole thing |
77 | #pragma warning disable 0168 | 77 | #pragma warning disable 0168 |
78 | foreach (bool l1 in ((Variable)arg).unify(this)) | 78 | foreach (bool l1 in ((Variable)arg).unify(this)) |
79 | yield return false; | 79 | yield return false; |
80 | #pragma warning restore 0168 | 80 | #pragma warning restore 0168 |
81 | } | 81 | } |
82 | } | 82 | } |
83 | 83 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor3.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor3.cs index 6ef8327..907bfca 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor3.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Functor3.cs | |||
@@ -61,9 +61,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
61 | Functor3 argFunctor = (Functor3)arg; | 61 | Functor3 argFunctor = (Functor3)arg; |
62 | if (_name.Equals(argFunctor._name)) | 62 | if (_name.Equals(argFunctor._name)) |
63 | { | 63 | { |
64 | // disable warning on l1, l2, l3 don't see how we can | 64 | // disable warning: don't see how we can code this differently short |
65 | // code this differently | 65 | // of rewriting the whole thing |
66 | #pragma warning disable 0168 | 66 | #pragma warning disable 0168 |
67 | foreach (bool l1 in YP.unify(_arg1, argFunctor._arg1)) | 67 | foreach (bool l1 in YP.unify(_arg1, argFunctor._arg1)) |
68 | { | 68 | { |
69 | foreach (bool l2 in YP.unify(_arg2, argFunctor._arg2)) | 69 | foreach (bool l2 in YP.unify(_arg2, argFunctor._arg2)) |
@@ -72,17 +72,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
72 | yield return false; | 72 | yield return false; |
73 | } | 73 | } |
74 | } | 74 | } |
75 | #pragma warning restore 0168 | 75 | #pragma warning restore 0168 |
76 | } | 76 | } |
77 | } | 77 | } |
78 | else if (arg is Variable) | 78 | else if (arg is Variable) |
79 | { | 79 | { |
80 | // disable warning on l1, don't see how we can | 80 | // disable warning: don't see how we can code this differently short |
81 | // code this differently | 81 | // of rewriting the whole thing |
82 | #pragma warning disable 0168 | 82 | #pragma warning disable 0168 |
83 | foreach (bool l1 in ((Variable)arg).unify(this)) | 83 | foreach (bool l1 in ((Variable)arg).unify(this)) |
84 | yield return false; | 84 | yield return false; |
85 | #pragma warning restore 0168 | 85 | #pragma warning restore 0168 |
86 | } | 86 | } |
87 | } | 87 | } |
88 | 88 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Parser.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Parser.cs index e9dd8f1..3d86905 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Parser.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Parser.cs | |||
@@ -44,9 +44,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
44 | yield return false; | 44 | yield return false; |
45 | } | 45 | } |
46 | 46 | ||
47 | // disable warning about unused variables: the following code | 47 | // disable warning: don't see how we can code this differently short |
48 | // is infested with it. | 48 | // of rewriting the whole thing |
49 | #pragma warning disable 0168, 0219 | 49 | #pragma warning disable 0168, 0219 |
50 | 50 | ||
51 | // Debug: Hand-modify this central predicate to do tail recursion. | 51 | // Debug: Hand-modify this central predicate to do tail recursion. |
52 | public static IEnumerable<bool> read_tokens(object arg1, object arg2, object arg3) | 52 | public static IEnumerable<bool> read_tokens(object arg1, object arg2, object arg3) |
@@ -4457,6 +4457,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
4457 | { } | 4457 | { } |
4458 | } | 4458 | } |
4459 | } | 4459 | } |
4460 | #pragma warning restore 0168 | 4460 | #pragma warning restore 0168 |
4461 | } | 4461 | } |
4462 | } | 4462 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Variable.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Variable.cs index 8e2aa7e..f68a941 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Variable.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/Variable.cs | |||
@@ -92,12 +92,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
92 | } | 92 | } |
93 | else | 93 | else |
94 | { | 94 | { |
95 | // disable warning on l1, don't see how we can | 95 | // disable warning: don't see how we can code this differently short |
96 | // code this differently | 96 | // of rewriting the whole thing |
97 | #pragma warning disable 0168 | 97 | #pragma warning disable 0168 |
98 | foreach (bool l1 in YP.unify(this, arg)) | 98 | foreach (bool l1 in YP.unify(this, arg)) |
99 | yield return false; | 99 | yield return false; |
100 | #pragma warning restore 0168 | 100 | #pragma warning restore 0168 |
101 | } | 101 | } |
102 | } | 102 | } |
103 | 103 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YP.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YP.cs index f0e8147..c212fb8 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YP.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YP.cs | |||
@@ -572,9 +572,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
572 | 572 | ||
573 | Variable Name = new Variable(); | 573 | Variable Name = new Variable(); |
574 | Variable ArgList = new Variable(); | 574 | Variable ArgList = new Variable(); |
575 | // disable warning on l1, don't see how we can | 575 | // disable warning: don't see how we can code this differently short |
576 | // code this differently | 576 | // of rewriting the whole thing |
577 | #pragma warning disable 0168 | 577 | #pragma warning disable 0168 |
578 | foreach (bool l1 in new ListPair(Name, ArgList).unify(List)) | 578 | foreach (bool l1 in new ListPair(Name, ArgList).unify(List)) |
579 | { | 579 | { |
580 | object[] args = ListPair.toArray(ArgList); | 580 | object[] args = ListPair.toArray(ArgList); |
@@ -588,7 +588,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
588 | 588 | ||
589 | return YP.unify(Term, Functor.make((Atom)YP.getValue(Name), args)); | 589 | return YP.unify(Term, Functor.make((Atom)YP.getValue(Name), args)); |
590 | } | 590 | } |
591 | #pragma warning restore 0168 | 591 | #pragma warning restore 0168 |
592 | 592 | ||
593 | return YP.fail(); | 593 | return YP.fail(); |
594 | } | 594 | } |
@@ -601,15 +601,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
601 | 601 | ||
602 | if (!(Term is Variable)) | 602 | if (!(Term is Variable)) |
603 | { | 603 | { |
604 | // disable warning on l1, don't see how we can | 604 | // disable warning: don't see how we can code this differently short |
605 | // code this differently | 605 | // of rewriting the whole thing |
606 | #pragma warning disable 0168 | 606 | #pragma warning disable 0168 |
607 | foreach (bool l1 in YP.unify(FunctorName, getFunctorName(Term))) | 607 | foreach (bool l1 in YP.unify(FunctorName, getFunctorName(Term))) |
608 | { | 608 | { |
609 | foreach (bool l2 in YP.unify(Arity, getFunctorArgs(Term).Length)) | 609 | foreach (bool l2 in YP.unify(Arity, getFunctorArgs(Term).Length)) |
610 | yield return false; | 610 | yield return false; |
611 | } | 611 | } |
612 | #pragma warning restore 0168 | 612 | #pragma warning restore 0168 |
613 | } | 613 | } |
614 | else | 614 | else |
615 | throw new NotImplementedException("Debug: must finish functor/3"); | 615 | throw new NotImplementedException("Debug: must finish functor/3"); |
@@ -629,12 +629,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
629 | if (argNumberInt >= 1 && argNumberInt <= termArgs.Length) | 629 | if (argNumberInt >= 1 && argNumberInt <= termArgs.Length) |
630 | { | 630 | { |
631 | // The first ArgNumber is at 1, not 0. | 631 | // The first ArgNumber is at 1, not 0. |
632 | // disable warning on l1, don't see how we can | 632 | // disable warning: don't see how we can code this differently short |
633 | // code this differently | 633 | // of rewriting the whole thing |
634 | #pragma warning disable 0168 | 634 | #pragma warning disable 0168 |
635 | foreach (bool l1 in YP.unify(Value, termArgs[argNumberInt - 1])) | 635 | foreach (bool l1 in YP.unify(Value, termArgs[argNumberInt - 1])) |
636 | yield return false; | 636 | yield return false; |
637 | #pragma warning restore 0168 | 637 | #pragma warning restore 0168 |
638 | } | 638 | } |
639 | } | 639 | } |
640 | } | 640 | } |
@@ -826,12 +826,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
826 | object[] args = new object[] { Priority, Specifier, Operator }; | 826 | object[] args = new object[] { Priority, Specifier, Operator }; |
827 | foreach (object[] answer in _operatorTable) | 827 | foreach (object[] answer in _operatorTable) |
828 | { | 828 | { |
829 | // disable warning on l1, don't see how we can | 829 | // disable warning: don't see how we can code this differently short |
830 | // code this differently | 830 | // of rewriting the whole thing |
831 | #pragma warning disable 0168 | 831 | #pragma warning disable 0168 |
832 | foreach (bool l1 in YP.unifyArrays(args, answer)) | 832 | foreach (bool l1 in YP.unifyArrays(args, answer)) |
833 | yield return false; | 833 | yield return false; |
834 | #pragma warning restore 0168 | 834 | #pragma warning restore 0168 |
835 | } | 835 | } |
836 | } | 836 | } |
837 | 837 | ||
@@ -863,16 +863,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
863 | int afterInt = atomAtom._name.Length - (beforeInt + lengthInt); | 863 | int afterInt = atomAtom._name.Length - (beforeInt + lengthInt); |
864 | if (afterInt >= 0) | 864 | if (afterInt >= 0) |
865 | { | 865 | { |
866 | // disable warning on l1, don't see how we can | 866 | // disable warning: don't see how we can code this differently short |
867 | // code this differently | 867 | // of rewriting the whole thing |
868 | #pragma warning disable 0168 | 868 | #pragma warning disable 0168 |
869 | foreach (bool l1 in YP.unify(After, afterInt)) | 869 | foreach (bool l1 in YP.unify(After, afterInt)) |
870 | { | 870 | { |
871 | foreach (bool l2 in YP.unify | 871 | foreach (bool l2 in YP.unify |
872 | (Sub_atom, Atom.a(atomAtom._name.Substring(beforeInt, lengthInt)))) | 872 | (Sub_atom, Atom.a(atomAtom._name.Substring(beforeInt, lengthInt)))) |
873 | yield return false; | 873 | yield return false; |
874 | } | 874 | } |
875 | #pragma warning restore 0168 | 875 | #pragma warning restore 0168 |
876 | } | 876 | } |
877 | } | 877 | } |
878 | 878 | ||
@@ -1221,13 +1221,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
1221 | if (arity == 2 && (name == Atom.a(",") || name == Atom.a(";") || name == Atom.DOT)) | 1221 | if (arity == 2 && (name == Atom.a(",") || name == Atom.a(";") || name == Atom.DOT)) |
1222 | return false; | 1222 | return false; |
1223 | // Use the same mapping to static predicates in YP as the compiler. | 1223 | // Use the same mapping to static predicates in YP as the compiler. |
1224 | // disable warning on l1, don't see how we can | 1224 | // disable warning: don't see how we can code this differently short |
1225 | // code this differently | 1225 | // of rewriting the whole thing |
1226 | #pragma warning disable 0168 | 1226 | #pragma warning disable 0168 |
1227 | foreach (bool l1 in YPCompiler.functorCallYPFunctionName(name, arity, new Variable())) | 1227 | foreach (bool l1 in YPCompiler.functorCallYPFunctionName(name, arity, new Variable())) |
1228 | return false; | 1228 | return false; |
1229 | // Debug: Do we need to check if name._module is null? | 1229 | // Debug: Do we need to check if name._module is null? |
1230 | #pragma warning restore 0168 | 1230 | #pragma warning restore 0168 |
1231 | return true; | 1231 | return true; |
1232 | } | 1232 | } |
1233 | 1233 | ||
@@ -1366,13 +1366,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
1366 | 1366 | ||
1367 | foreach (NameArity key in _predicatesStore.Keys) | 1367 | foreach (NameArity key in _predicatesStore.Keys) |
1368 | { | 1368 | { |
1369 | // disable warning on l1, don't see how we can | 1369 | // disable warning: don't see how we can code this differently short |
1370 | // code this differently | 1370 | // of rewriting the whole thing |
1371 | #pragma warning disable 0168 | 1371 | #pragma warning disable 0168 |
1372 | foreach (bool l1 in YP.unify | 1372 | foreach (bool l1 in YP.unify |
1373 | (new Functor2(Atom.SLASH, key._name, key._arity), NameSlashArity)) | 1373 | (new Functor2(Atom.SLASH, key._name, key._arity), NameSlashArity)) |
1374 | yield return false; | 1374 | yield return false; |
1375 | #pragma warning restore 0168 | 1375 | #pragma warning restore 0168 |
1376 | } | 1376 | } |
1377 | } | 1377 | } |
1378 | 1378 | ||
@@ -1628,15 +1628,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
1628 | if (_exception != null) | 1628 | if (_exception != null) |
1629 | { | 1629 | { |
1630 | bool didUnify = false; | 1630 | bool didUnify = false; |
1631 | // disable warning on l1, don't see how we can | 1631 | // disable warning: don't see how we can code this differently short |
1632 | // code this differently | 1632 | // of rewriting the whole thing |
1633 | #pragma warning disable 0168 | 1633 | #pragma warning disable 0168 |
1634 | foreach (bool l1 in YP.unify(_exception._term, Catcher)) | 1634 | foreach (bool l1 in YP.unify(_exception._term, Catcher)) |
1635 | { | 1635 | { |
1636 | didUnify = true; | 1636 | didUnify = true; |
1637 | yield return false; | 1637 | yield return false; |
1638 | } | 1638 | } |
1639 | #pragma warning restore 0168 | 1639 | #pragma warning restore 0168 |
1640 | 1640 | ||
1641 | if (!didUnify) | 1641 | if (!didUnify) |
1642 | throw _exception; | 1642 | throw _exception; |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YPCompiler.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YPCompiler.cs index d6115ce..96f2b89 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YPCompiler.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YPCompiler.cs | |||
@@ -209,9 +209,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
209 | object[] functorArgs = YP.getFunctorArgs(Term); | 209 | object[] functorArgs = YP.getFunctorArgs(Term); |
210 | 210 | ||
211 | Variable pred = new Variable(); | 211 | Variable pred = new Variable(); |
212 | // disable warning on l1, don't see how we can | 212 | // disable warning: don't see how we can code this differently short |
213 | // code this differently | 213 | // of rewriting the whole thing |
214 | #pragma warning disable 0168 | 214 | #pragma warning disable 0168 |
215 | foreach (bool l1 in ((CompilerState)State)._pred.match | 215 | foreach (bool l1 in ((CompilerState)State)._pred.match |
216 | (new object[] { functorName, functorArgs.Length, pred, Atom.a("det") })) | 216 | (new object[] { functorName, functorArgs.Length, pred, Atom.a("det") })) |
217 | { | 217 | { |
@@ -220,7 +220,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
220 | return true; | 220 | return true; |
221 | } | 221 | } |
222 | } | 222 | } |
223 | #pragma warning restore 0168 | 223 | #pragma warning restore 0168 |
224 | 224 | ||
225 | return false; | 225 | return false; |
226 | } | 226 | } |
@@ -232,9 +232,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
232 | object[] functorArgs = YP.getFunctorArgs(Term); | 232 | object[] functorArgs = YP.getFunctorArgs(Term); |
233 | 233 | ||
234 | Variable pred = new Variable(); | 234 | Variable pred = new Variable(); |
235 | // disable warning on l1, don't see how we can | 235 | // disable warning: don't see how we can code this differently short |
236 | // code this differently | 236 | // of rewriting the whole thing |
237 | #pragma warning disable 0168 | 237 | #pragma warning disable 0168 |
238 | foreach (bool l1 in ((CompilerState)State)._pred.match | 238 | foreach (bool l1 in ((CompilerState)State)._pred.match |
239 | (new object[] { functorName, functorArgs.Length, pred, Atom.a("semidet") })) | 239 | (new object[] { functorName, functorArgs.Length, pred, Atom.a("semidet") })) |
240 | { | 240 | { |
@@ -243,7 +243,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
243 | return true; | 243 | return true; |
244 | } | 244 | } |
245 | } | 245 | } |
246 | #pragma warning restore 0168 | 246 | #pragma warning restore 0168 |
247 | 247 | ||
248 | return false; | 248 | return false; |
249 | } | 249 | } |
@@ -285,7 +285,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.YieldProlog | |||
285 | 285 | ||
286 | // disable warning unused variables, the following code is | 286 | // disable warning unused variables, the following code is |
287 | // infested with it. | 287 | // infested with it. |
288 | #pragma warning disable 0168, 0219 | 288 | #pragma warning disable 0168, 0219 |
289 | 289 | ||
290 | /// <summary> | 290 | /// <summary> |
291 | /// Use makeFunctionPseudoCode, convertFunctionCSharp and compileAnonymousFunction | 291 | /// Use makeFunctionPseudoCode, convertFunctionCSharp and compileAnonymousFunction |