diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Runtime/YieldProlog/YP.cs | 64 |
1 files changed, 32 insertions, 32 deletions
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; |