You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vxquery.apache.org by pr...@apache.org on 2012/08/14 23:04:41 UTC

svn commit: r1373099 - in /incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions: arithmetic/ cast/

Author: prestonc
Date: Tue Aug 14 21:04:41 2012
New Revision: 1373099

URL: http://svn.apache.org/viewvc?rev=1373099&view=rev
Log:
Updated the unsigned values to use one size larger signed storage unit. Updated the arithmetic conversion to allow support this change.

Modified:
    incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/arithmetic/AbstractArithmeticScalarEvaluatorFactory.java
    incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToUnsignedByteOperation.java
    incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToUnsignedIntOperation.java
    incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToUnsignedShortOperation.java

Modified: incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/arithmetic/AbstractArithmeticScalarEvaluatorFactory.java
URL: http://svn.apache.org/viewvc/incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/arithmetic/AbstractArithmeticScalarEvaluatorFactory.java?rev=1373099&r1=1373098&r2=1373099&view=diff
==============================================================================
--- incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/arithmetic/AbstractArithmeticScalarEvaluatorFactory.java (original)
+++ incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/arithmetic/AbstractArithmeticScalarEvaluatorFactory.java Tue Aug 14 21:04:41 2012
@@ -480,33 +480,34 @@ public abstract class AbstractArithmetic
                 long value;
                 switch (tvp.getTag()) {
                     case ValueTag.XS_INTEGER_TAG:
-                    case ValueTag.XS_NON_POSITIVE_INTEGER_TAG:
-                    case ValueTag.XS_NEGATIVE_INTEGER_TAG:
                     case ValueTag.XS_LONG_TAG:
+                    case ValueTag.XS_NEGATIVE_INTEGER_TAG:
+                    case ValueTag.XS_NON_POSITIVE_INTEGER_TAG:
                     case ValueTag.XS_NON_NEGATIVE_INTEGER_TAG:
-                    case ValueTag.XS_UNSIGNED_LONG_TAG:
                     case ValueTag.XS_POSITIVE_INTEGER_TAG:
+                    case ValueTag.XS_UNSIGNED_INT_TAG:
+                    case ValueTag.XS_UNSIGNED_LONG_TAG:
                         tvp.getValue(tp.longp);
                         value = tp.longp.longValue();
                         break;
 
                     case ValueTag.XS_INT_TAG:
-                    case ValueTag.XS_UNSIGNED_INT_TAG:
+                    case ValueTag.XS_UNSIGNED_SHORT_TAG:
                         tvp.getValue(tp.intp);
                         value = tp.intp.longValue();
                         break;
 
                     case ValueTag.XS_SHORT_TAG:
-                    case ValueTag.XS_UNSIGNED_SHORT_TAG:
+                    case ValueTag.XS_UNSIGNED_BYTE_TAG:
                         tvp.getValue(tp.shortp);
                         value = tp.shortp.longValue();
                         break;
 
                     case ValueTag.XS_BYTE_TAG:
-                    case ValueTag.XS_UNSIGNED_BYTE_TAG:
                         tvp.getValue(tp.bytep);
                         value = tp.bytep.longValue();
                         break;
+
                     default:
                         value = 0;
                 }

Modified: incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToUnsignedByteOperation.java
URL: http://svn.apache.org/viewvc/incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToUnsignedByteOperation.java?rev=1373099&r1=1373098&r2=1373099&view=diff
==============================================================================
--- incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToUnsignedByteOperation.java (original)
+++ incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToUnsignedByteOperation.java Tue Aug 14 21:04:41 2012
@@ -2,7 +2,7 @@ package org.apache.vxquery.runtime.funct
 
 import org.apache.vxquery.datamodel.values.ValueTag;
 
-public class CastToUnsignedByteOperation extends CastToByteOperation {
+public class CastToUnsignedByteOperation extends CastToShortOperation {
     boolean negativeAllowed = false;
     int returnTag = ValueTag.XS_UNSIGNED_BYTE_TAG;
 }
\ No newline at end of file

Modified: incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToUnsignedIntOperation.java
URL: http://svn.apache.org/viewvc/incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToUnsignedIntOperation.java?rev=1373099&r1=1373098&r2=1373099&view=diff
==============================================================================
--- incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToUnsignedIntOperation.java (original)
+++ incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToUnsignedIntOperation.java Tue Aug 14 21:04:41 2012
@@ -2,7 +2,7 @@ package org.apache.vxquery.runtime.funct
 
 import org.apache.vxquery.datamodel.values.ValueTag;
 
-public class CastToUnsignedIntOperation extends CastToIntOperation {
+public class CastToUnsignedIntOperation extends CastToLongOperation {
     boolean negativeAllowed = false;
     int returnTag = ValueTag.XS_UNSIGNED_INT_TAG;
 }
\ No newline at end of file

Modified: incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToUnsignedShortOperation.java
URL: http://svn.apache.org/viewvc/incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToUnsignedShortOperation.java?rev=1373099&r1=1373098&r2=1373099&view=diff
==============================================================================
--- incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToUnsignedShortOperation.java (original)
+++ incubator/vxquery/trunk/vxquery/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToUnsignedShortOperation.java Tue Aug 14 21:04:41 2012
@@ -2,7 +2,7 @@ package org.apache.vxquery.runtime.funct
 
 import org.apache.vxquery.datamodel.values.ValueTag;
 
-public class CastToUnsignedShortOperation extends CastToShortOperation {
+public class CastToUnsignedShortOperation extends CastToIntOperation {
     boolean negativeAllowed = false;
     int returnTag = ValueTag.XS_UNSIGNED_SHORT_TAG;
 }
\ No newline at end of file