177 }
178
179 static class VarHandleSourceAccessTestCase extends AccessTestCase<VarHandleSource> {
180 final ByteArrayViewSource<?> bs;
181 final VarHandleSource vhs;
182
183 VarHandleSourceAccessTestCase(String desc, ByteArrayViewSource<?> bs, VarHandleSource vhs, AccessTestAction<VarHandleSource> ata) {
184 this(desc, bs, vhs, ata, true);
185 }
186
187 VarHandleSourceAccessTestCase(String desc, ByteArrayViewSource<?> bs, VarHandleSource vhs, AccessTestAction<VarHandleSource> ata, boolean loop) {
188 super(vhs + " -> " + bs + " " + desc, ata, loop);
189 this.bs = bs;
190 this.vhs = vhs;
191 }
192
193 @Override
194 VarHandleSource get() {
195 return vhs;
196 }
197 }
198
199
200 static double rotateLeft(double i, int distance) {
201 return Double.longBitsToDouble(
202 Long.rotateLeft(Double.doubleToRawLongBits(i), distance));
203 }
204
205 static double rotateRight(double i, int distance) {
206 return Double.longBitsToDouble(
207 Long.rotateRight(Double.doubleToRawLongBits(i), distance));
208 }
209
210 static float rotateLeft(float i, int distance) {
211 return Float.intBitsToFloat(
212 Integer.rotateLeft(Float.floatToRawIntBits(i), distance));
213 }
214
215 static float rotateRight(float i, int distance) {
216 return Float.intBitsToFloat(
|
177 }
178
179 static class VarHandleSourceAccessTestCase extends AccessTestCase<VarHandleSource> {
180 final ByteArrayViewSource<?> bs;
181 final VarHandleSource vhs;
182
183 VarHandleSourceAccessTestCase(String desc, ByteArrayViewSource<?> bs, VarHandleSource vhs, AccessTestAction<VarHandleSource> ata) {
184 this(desc, bs, vhs, ata, true);
185 }
186
187 VarHandleSourceAccessTestCase(String desc, ByteArrayViewSource<?> bs, VarHandleSource vhs, AccessTestAction<VarHandleSource> ata, boolean loop) {
188 super(vhs + " -> " + bs + " " + desc, ata, loop);
189 this.bs = bs;
190 this.vhs = vhs;
191 }
192
193 @Override
194 VarHandleSource get() {
195 return vhs;
196 }
197
198 public String toString() {
199 return super.toString() + ", bs: " + bs + ", vhs: " + vhs;
200 }
201 }
202
203
204 static double rotateLeft(double i, int distance) {
205 return Double.longBitsToDouble(
206 Long.rotateLeft(Double.doubleToRawLongBits(i), distance));
207 }
208
209 static double rotateRight(double i, int distance) {
210 return Double.longBitsToDouble(
211 Long.rotateRight(Double.doubleToRawLongBits(i), distance));
212 }
213
214 static float rotateLeft(float i, int distance) {
215 return Float.intBitsToFloat(
216 Integer.rotateLeft(Float.floatToRawIntBits(i), distance));
217 }
218
219 static float rotateRight(float i, int distance) {
220 return Float.intBitsToFloat(
|