1111import static jdk .incubator .vector .VectorOperators .LSHL ;
1212import static jdk .incubator .vector .VectorOperators .LSHR ;
1313import static jdk .incubator .vector .VectorOperators .NE ;
14- import static jdk .incubator .vector .VectorOperators .UNSIGNED_GE ;
15- import static jdk .incubator .vector .VectorOperators .UNSIGNED_GT ;
14+ import static jdk .incubator .vector .VectorOperators .UGE ;
15+ import static jdk .incubator .vector .VectorOperators .UGT ;
1616import static jdk .incubator .vector .VectorShuffle .iota ;
1717import static org .simdjson .VectorUtils .BYTE_SPECIES ;
1818import static org .simdjson .VectorUtils .INT_SPECIES ;
@@ -65,7 +65,7 @@ static void validate(byte[] buffer, int length) {
6565 if (chunk .and (ALL_ASCII_MASK ).compare (EQ , 0 ).allTrue ()) {
6666 errors |= previousIncomplete ;
6767 } else {
68- previousIncomplete = chunk .compare (UNSIGNED_GE , INCOMPLETE_CHECK ).toLong ();
68+ previousIncomplete = chunk .compare (UGE , INCOMPLETE_CHECK ).toLong ();
6969 // Shift the input forward by four bytes to make space for the previous four bytes.
7070 // The previous three bytes are required for validation, pulling in the last integer
7171 // will give the previous four bytes. The switch to integer vectors is to allow for
@@ -97,13 +97,13 @@ static void validate(byte[] buffer, int length) {
9797 .or (chunkWithPreviousFourBytes .lanewise (LSHR , TWO_BYTES_SIZE ))
9898 .reinterpretAsBytes ();
9999 // The minimum leading byte of 3-byte sequences is always greater than the maximum leading byte of 2-byte sequences.
100- VectorMask <Byte > is3ByteLead = previousTwoBytes .compare (UNSIGNED_GT , MAX_2_LEADING_BYTE );
100+ VectorMask <Byte > is3ByteLead = previousTwoBytes .compare (UGT , MAX_2_LEADING_BYTE );
101101 ByteVector previousThreeBytes = chunkAsInts
102102 .lanewise (LSHL , THREE_BYTES_SIZE )
103103 .or (chunkWithPreviousFourBytes .lanewise (LSHR , Byte .SIZE ))
104104 .reinterpretAsBytes ();
105105 // The minimum leading byte of 4-byte sequences is always greater than the maximum leading byte of 3-byte sequences.
106- VectorMask <Byte > is4ByteLead = previousThreeBytes .compare (UNSIGNED_GT , MAX_3_LEADING_BYTE );
106+ VectorMask <Byte > is4ByteLead = previousThreeBytes .compare (UGT , MAX_3_LEADING_BYTE );
107107 // The firstCheck vector contains 0x80 values on continuation byte indexes.
108108 // The leading bytes of 3 and 4-byte sequences should match up with these indexes and zero them out.
109109 ByteVector secondCheck = firstCheck .add ((byte ) 0x80 , is3ByteLead .or (is4ByteLead ));
@@ -117,7 +117,7 @@ static void validate(byte[] buffer, int length) {
117117 ByteVector chunk = ByteVector .fromArray (BYTE_SPECIES , buffer , offset , remainingBytes );
118118 if (!chunk .and (ALL_ASCII_MASK ).compare (EQ , 0 ).allTrue ()) {
119119 IntVector chunkAsInts = chunk .reinterpretAsInts ();
120- previousIncomplete = chunk .compare (UNSIGNED_GE , INCOMPLETE_CHECK ).toLong ();
120+ previousIncomplete = chunk .compare (UGE , INCOMPLETE_CHECK ).toLong ();
121121 // Shift the input forward by four bytes to make space for the previous four bytes.
122122 // The previous three bytes are required for validation, pulling in the last integer
123123 // will give the previous four bytes. The switch to integer vectors is to allow for
@@ -149,13 +149,13 @@ static void validate(byte[] buffer, int length) {
149149 .or (chunkWithPreviousFourBytes .lanewise (LSHR , TWO_BYTES_SIZE ))
150150 .reinterpretAsBytes ();
151151 // The minimum leading byte of 3-byte sequences is always greater than the maximum leading byte of 2-byte sequences.
152- VectorMask <Byte > is3ByteLead = previousTwoBytes .compare (UNSIGNED_GT , MAX_2_LEADING_BYTE );
152+ VectorMask <Byte > is3ByteLead = previousTwoBytes .compare (UGT , MAX_2_LEADING_BYTE );
153153 ByteVector previousThreeBytes = chunkAsInts
154154 .lanewise (LSHL , THREE_BYTES_SIZE )
155155 .or (chunkWithPreviousFourBytes .lanewise (LSHR , Byte .SIZE ))
156156 .reinterpretAsBytes ();
157157 // The minimum leading byte of 4-byte sequences is always greater than the maximum leading byte of 3-byte sequences.
158- VectorMask <Byte > is4ByteLead = previousThreeBytes .compare (UNSIGNED_GT , MAX_3_LEADING_BYTE );
158+ VectorMask <Byte > is4ByteLead = previousThreeBytes .compare (UGT , MAX_3_LEADING_BYTE );
159159 // The firstCheck vector contains 0x80 values on continuation byte indexes.
160160 // The leading bytes of 3 and 4-byte sequences should match up with these indexes and zero them out.
161161 ByteVector secondCheck = firstCheck .add ((byte ) 0x80 , is3ByteLead .or (is4ByteLead ));
0 commit comments