From 239d2c288865d2581e2b91bd51f3e7761b64dbc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Kozak?= Date: Fri, 27 Feb 2026 13:38:34 +0100 Subject: [PATCH 1/5] Remove Java 7-specific atomic utilities from project --- .../execution/internal/atomic/Factory.java | 300 ++++++------------ .../internal/atomic/Left128Java7BoxedInt.java | 83 ----- .../atomic/Left128Java7BoxedLong.java | 82 ----- .../atomic/Left128Java7BoxedObject.java | 75 ----- .../internal/atomic/Left64Java7BoxedInt.java | 82 ----- .../internal/atomic/Left64Java7BoxedLong.java | 83 ----- .../atomic/Left64Java7BoxedObject.java | 75 ----- .../atomic/LeftRight128Java7BoxedInt.java | 104 ------ .../atomic/LeftRight128Java7BoxedLong.java | 104 ------ .../atomic/LeftRight128Java7BoxedObject.java | 96 ------ .../atomic/LeftRight256Java7BoxedInt.java | 107 ------- .../atomic/LeftRight256Java7BoxedLong.java | 108 ------- .../atomic/LeftRight256Java7BoxedObject.java | 100 ------ .../internal/atomic/NormalJava7BoxedInt.java | 82 ----- .../internal/atomic/NormalJava7BoxedLong.java | 82 ----- .../atomic/NormalJava7BoxedObject.java | 74 ----- .../atomic/Right128Java7BoxedInt.java | 105 ------ .../atomic/Right128Java7BoxedLong.java | 105 ------ .../atomic/Right128Java7BoxedObject.java | 98 ------ .../internal/atomic/Right64Java7BoxedInt.java | 102 ------ .../atomic/Right64Java7BoxedLong.java | 102 ------ .../atomic/Right64Java7BoxedObject.java | 94 ------ .../monix/execution/atomic/AtomicAny.scala | 12 +- .../execution/atomic/AtomicBoolean.scala | 13 +- .../execution/atomic/AtomicBuilder.scala | 57 +++- .../monix/execution/atomic/AtomicByte.scala | 24 +- .../monix/execution/atomic/AtomicChar.scala | 25 +- .../monix/execution/atomic/AtomicDouble.scala | 24 +- .../monix/execution/atomic/AtomicFloat.scala | 24 +- .../monix/execution/atomic/AtomicInt.scala | 21 +- .../monix/execution/atomic/AtomicLong.scala | 27 +- .../execution/atomic/AtomicNumberAny.scala | 23 +- .../monix/execution/atomic/AtomicShort.scala | 25 +- .../collection/queues/FromCircularQueue.scala | 28 +- .../queues/FromMessagePassingQueue.scala | 27 +- .../LowLevelConcurrentQueueBuilders.scala | 14 +- 36 files changed, 278 insertions(+), 2309 deletions(-) delete mode 100644 monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java7BoxedInt.java delete mode 100644 monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java7BoxedLong.java delete mode 100644 monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java7BoxedObject.java delete mode 100644 monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java7BoxedInt.java delete mode 100644 monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java7BoxedLong.java delete mode 100644 monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java7BoxedObject.java delete mode 100644 monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java7BoxedInt.java delete mode 100644 monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java7BoxedLong.java delete mode 100644 monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java7BoxedObject.java delete mode 100644 monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java7BoxedInt.java delete mode 100644 monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java7BoxedLong.java delete mode 100644 monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java7BoxedObject.java delete mode 100644 monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava7BoxedInt.java delete mode 100644 monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava7BoxedLong.java delete mode 100644 monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava7BoxedObject.java delete mode 100644 monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java7BoxedInt.java delete mode 100644 monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java7BoxedLong.java delete mode 100644 monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java7BoxedObject.java delete mode 100644 monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java7BoxedInt.java delete mode 100644 monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java7BoxedLong.java delete mode 100644 monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java7BoxedObject.java diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Factory.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Factory.java index 26b3335f0..5734173c6 100644 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Factory.java +++ b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Factory.java @@ -23,208 +23,116 @@ /** * INTERNAL API — used in the implementation of * `monix.execution.atomic.Atomic`. - * + *

* Being internal it can always change between minor versions, * providing no backwards compatibility guarantees and is only public * because Java does not provide the capability of marking classes as * "internal" to a package and all its sub-packages. */ -@InternalApi public final class Factory { - public static BoxedObject newBoxedObject(Object initial, BoxPaddingStrategy padding, boolean allowUnsafe, boolean allowJava8Intrinsics) { - boolean useJava7Unsafe = allowUnsafe && UnsafeAccess.IS_AVAILABLE; - boolean useJava8Unsafe = useJava7Unsafe && allowJava8Intrinsics && UnsafeAccess.HAS_JAVA8_INTRINSICS; - - switch (padding) { - case NO_PADDING: - if (useJava8Unsafe) - return new NormalJava8BoxedObject(initial); - else if (useJava7Unsafe) - return new NormalJava7BoxedObject(initial); - else - return new NormalJavaXBoxedObject(initial); - - case LEFT_64: - if (useJava8Unsafe) - return new Left64Java8BoxedObject(initial); - else if (useJava7Unsafe) - return new Left64Java7BoxedObject(initial); - else - return new Left64JavaXBoxedObject(initial); - - case RIGHT_64: - if (useJava8Unsafe) - return new Right64Java8BoxedObject(initial); - else if (useJava7Unsafe) - return new Right64Java7BoxedObject(initial); - else - return new Right64JavaXBoxedObject(initial); - - case LEFT_RIGHT_128: - if (useJava8Unsafe) - return new LeftRight128Java8BoxedObject(initial); - else if (useJava7Unsafe) - return new LeftRight128Java7BoxedObject(initial); - else - return new LeftRight128JavaXBoxedObject(initial); - - case LEFT_128: - if (useJava8Unsafe) - return new Left128Java8BoxedObject(initial); - else if (useJava7Unsafe) - return new Left128Java7BoxedObject(initial); - else - return new Left128JavaXBoxedObject(initial); - - case RIGHT_128: - if (useJava8Unsafe) - return new Right128Java8BoxedObject(initial); - else if (useJava7Unsafe) - return new Right128Java7BoxedObject(initial); - else - return new Right128JavaXBoxedObject(initial); - - case LEFT_RIGHT_256: - if (useJava8Unsafe) - return new LeftRight256Java8BoxedObject(initial); - else if (useJava7Unsafe) - return new LeftRight256Java7BoxedObject(initial); - else - return new LeftRight256JavaXBoxedObject(initial); - - default: - throw new MatchError(padding); +@InternalApi +public final class Factory { + public static BoxedObject newBoxedObject(Object initial, BoxPaddingStrategy padding, boolean allowUnsafe) { + switch (padding) { + case NO_PADDING: + if (allowUnsafe) return new NormalJava8BoxedObject(initial); + else return new NormalJavaXBoxedObject(initial); + + case LEFT_64: + if (allowUnsafe) return new Left64Java8BoxedObject(initial); + else return new Left64JavaXBoxedObject(initial); + + case RIGHT_64: + if (allowUnsafe) return new Right64Java8BoxedObject(initial); + else return new Right64JavaXBoxedObject(initial); + + case LEFT_RIGHT_128: + if (allowUnsafe) return new LeftRight128Java8BoxedObject(initial); + else return new LeftRight128JavaXBoxedObject(initial); + + case LEFT_128: + if (allowUnsafe) return new Left128Java8BoxedObject(initial); + else return new Left128JavaXBoxedObject(initial); + + case RIGHT_128: + if (allowUnsafe) return new Right128Java8BoxedObject(initial); + else return new Right128JavaXBoxedObject(initial); + + case LEFT_RIGHT_256: + if (allowUnsafe) return new LeftRight256Java8BoxedObject(initial); + else return new LeftRight256JavaXBoxedObject(initial); + + default: + throw new MatchError(padding); + } } - } - - public static BoxedInt newBoxedInt(int initial, BoxPaddingStrategy padding, boolean allowUnsafe, boolean allowJava8Intrinsics) { - boolean useJava7Unsafe = allowUnsafe && UnsafeAccess.IS_AVAILABLE; - boolean useJava8Unsafe = useJava7Unsafe && allowJava8Intrinsics && UnsafeAccess.HAS_JAVA8_INTRINSICS; - - switch (padding) { - case NO_PADDING: - if (useJava8Unsafe) - return new NormalJava8BoxedInt(initial); - else if (useJava7Unsafe) - return new NormalJava7BoxedInt(initial); - else - return new NormalJavaXBoxedInt(initial); - - case LEFT_64: - if (useJava8Unsafe) - return new Left64Java8BoxedInt(initial); - else if (useJava7Unsafe) - return new Left64Java7BoxedInt(initial); - else - return new Left64JavaXBoxedInt(initial); - - case RIGHT_64: - if (useJava8Unsafe) - return new Right64Java8BoxedInt(initial); - else if (useJava7Unsafe) - return new Right64Java7BoxedInt(initial); - else - return new Right64JavaXBoxedInt(initial); - - case LEFT_RIGHT_128: - if (useJava8Unsafe) - return new LeftRight128Java8BoxedInt(initial); - else if (useJava7Unsafe) - return new LeftRight128Java7BoxedInt(initial); - else - return new LeftRight128JavaXBoxedInt(initial); - - case LEFT_128: - if (useJava8Unsafe) - return new Left128Java8BoxedInt(initial); - else if (useJava7Unsafe) - return new Left128Java7BoxedInt(initial); - else - return new Left128JavaXBoxedInt(initial); - - case RIGHT_128: - if (useJava8Unsafe) - return new Right128Java8BoxedInt(initial); - else if (useJava7Unsafe) - return new Right128Java7BoxedInt(initial); - else - return new Right128JavaXBoxedInt(initial); - - case LEFT_RIGHT_256: - if (useJava8Unsafe) - return new LeftRight256Java8BoxedInt(initial); - else if (useJava7Unsafe) - return new LeftRight256Java7BoxedInt(initial); - else - return new LeftRight256JavaXBoxedInt(initial); - - default: - throw new MatchError(padding); + + public static BoxedInt newBoxedInt(int initial, BoxPaddingStrategy padding, boolean allowUnsafe) { + switch (padding) { + case NO_PADDING: + if (allowUnsafe) return new NormalJava8BoxedInt(initial); + else return new NormalJavaXBoxedInt(initial); + + case LEFT_64: + if (allowUnsafe) return new Left64Java8BoxedInt(initial); + else return new Left64JavaXBoxedInt(initial); + + case RIGHT_64: + if (allowUnsafe) return new Right64Java8BoxedInt(initial); + else return new Right64JavaXBoxedInt(initial); + + case LEFT_RIGHT_128: + if (allowUnsafe) return new LeftRight128Java8BoxedInt(initial); + else return new LeftRight128JavaXBoxedInt(initial); + + case LEFT_128: + if (allowUnsafe) return new Left128Java8BoxedInt(initial); + else return new Left128JavaXBoxedInt(initial); + + case RIGHT_128: + if (allowUnsafe) return new Right128Java8BoxedInt(initial); + else return new Right128JavaXBoxedInt(initial); + + case LEFT_RIGHT_256: + if (allowUnsafe) return new LeftRight256Java8BoxedInt(initial); + else return new LeftRight256JavaXBoxedInt(initial); + + default: + throw new MatchError(padding); + } } - } - - public static BoxedLong newBoxedLong(long initial, BoxPaddingStrategy padding, boolean allowUnsafe, boolean allowJava8Intrinsics) { - boolean useJava7Unsafe = allowUnsafe && UnsafeAccess.IS_AVAILABLE; - boolean useJava8Unsafe = useJava7Unsafe && allowJava8Intrinsics && UnsafeAccess.HAS_JAVA8_INTRINSICS; - - switch (padding) { - case NO_PADDING: - if (useJava8Unsafe) - return new NormalJava8BoxedLong(initial); - else if (useJava7Unsafe) - return new NormalJava7BoxedLong(initial); - else - return new NormalJavaXBoxedLong(initial); - - case LEFT_64: - if (useJava8Unsafe) - return new Left64Java8BoxedLong(initial); - else if (useJava7Unsafe) - return new Left64Java7BoxedLong(initial); - else - return new Left64JavaXBoxedLong(initial); - - case RIGHT_64: - if (useJava8Unsafe) - return new Right64Java8BoxedLong(initial); - else if (useJava7Unsafe) - return new Right64Java7BoxedLong(initial); - else - return new Right64JavaXBoxedLong(initial); - - case LEFT_RIGHT_128: - if (useJava8Unsafe) - return new LeftRight128Java8BoxedLong(initial); - else if (useJava7Unsafe) - return new LeftRight128Java7BoxedLong(initial); - else - return new LeftRight128JavaXBoxedLong(initial); - - case LEFT_128: - if (useJava8Unsafe) - return new Left128Java8BoxedLong(initial); - else if (useJava7Unsafe) - return new Left128Java7BoxedLong(initial); - else - return new Left128JavaXBoxedLong(initial); - - case RIGHT_128: - if (useJava8Unsafe) - return new Right128Java8BoxedLong(initial); - else if (useJava7Unsafe) - return new Right128Java7BoxedLong(initial); - else - return new Right128JavaXBoxedLong(initial); - - case LEFT_RIGHT_256: - if (useJava8Unsafe) - return new LeftRight256Java8BoxedLong(initial); - else if (useJava7Unsafe) - return new LeftRight256Java7BoxedLong(initial); - else - return new LeftRight256JavaXBoxedLong(initial); - - default: - throw new MatchError(padding); + + public static BoxedLong newBoxedLong(long initial, BoxPaddingStrategy padding, boolean allowUnsafe) { + switch (padding) { + case NO_PADDING: + if (allowUnsafe) return new NormalJava8BoxedLong(initial); + else return new NormalJavaXBoxedLong(initial); + + case LEFT_64: + if (allowUnsafe) return new Left64Java8BoxedLong(initial); + else return new Left64JavaXBoxedLong(initial); + + case RIGHT_64: + if (allowUnsafe) return new Right64Java8BoxedLong(initial); + else return new Right64JavaXBoxedLong(initial); + + case LEFT_RIGHT_128: + if (allowUnsafe) return new LeftRight128Java8BoxedLong(initial); + else return new LeftRight128JavaXBoxedLong(initial); + + case LEFT_128: + if (allowUnsafe) return new Left128Java8BoxedLong(initial); + else return new Left128JavaXBoxedLong(initial); + + case RIGHT_128: + if (allowUnsafe) return new Right128Java8BoxedLong(initial); + else return new Right128JavaXBoxedLong(initial); + + case LEFT_RIGHT_256: + if (allowUnsafe) return new LeftRight256Java8BoxedLong(initial); + else return new LeftRight256JavaXBoxedLong(initial); + + default: + throw new MatchError(padding); + } } - } } diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java7BoxedInt.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java7BoxedInt.java deleted file mode 100644 index 9ad14fd8a..000000000 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java7BoxedInt.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) 2014-2021 by The Monix Project Developers. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.internal.atomic; - -import monix.execution.internal.InternalApi; -import sun.misc.Unsafe; - -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -@InternalApi -final class Left128Java7BoxedInt extends LeftPadding120 implements BoxedInt { - public volatile int value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = Left128Java7BoxedInt.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - Left128Java7BoxedInt(int initialValue) { - this.value = initialValue; - } - - public int volatileGet() { - return value; - } - - public void volatileSet(int update) { - value = update; - } - - public void lazySet(int update) { - UNSAFE.putOrderedInt(this, OFFSET, update); - } - - public boolean compareAndSet(int current, int update) { - return UNSAFE.compareAndSwapInt(this, OFFSET, current, update); - } - - public int getAndSet(int update) { - int current = value; - while (!UNSAFE.compareAndSwapInt(this, OFFSET, current, update)) - current = value; - return current; - } - - public int getAndAdd(int delta) { - int current; - do { - current = UNSAFE.getIntVolatile(this, OFFSET); - } while (!UNSAFE.compareAndSwapInt(this, OFFSET, current, current+delta)); - return current; - } -} \ No newline at end of file diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java7BoxedLong.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java7BoxedLong.java deleted file mode 100644 index d4c8f2534..000000000 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java7BoxedLong.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2014-2021 by The Monix Project Developers. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.internal.atomic; - -import monix.execution.internal.InternalApi; -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -@InternalApi -final class Left128Java7BoxedLong extends LeftPadding120 implements BoxedLong { - public volatile long value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = Left128Java7BoxedLong.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - Left128Java7BoxedLong(long initialValue) { - this.value = initialValue; - } - - public long volatileGet() { - return value; - } - - public void volatileSet(long update) { - value = update; - } - - public void lazySet(long update) { - UNSAFE.putOrderedLong(this, OFFSET, update); - } - - public boolean compareAndSet(long current, long update) { - return UNSAFE.compareAndSwapLong(this, OFFSET, current, update); - } - - public long getAndSet(long update) { - long current = value; - while (!UNSAFE.compareAndSwapLong(this, OFFSET, current, update)) - current = value; - return current; - } - - public long getAndAdd(long delta) { - long current; - do { - current = UNSAFE.getLongVolatile(this, OFFSET); - } while (!UNSAFE.compareAndSwapLong(this, OFFSET, current, current+delta)); - return current; - } -} \ No newline at end of file diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java7BoxedObject.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java7BoxedObject.java deleted file mode 100644 index 82bd73d1a..000000000 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left128Java7BoxedObject.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 2014-2021 by The Monix Project Developers. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.internal.atomic; - -import monix.execution.internal.InternalApi; -import sun.misc.Unsafe; - -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -@InternalApi -final class Left128Java7BoxedObject extends LeftPadding120 implements BoxedObject { - public volatile Object value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = Left128Java7BoxedObject.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - Left128Java7BoxedObject(Object initialValue) { - this.value = initialValue; - } - - public Object volatileGet() { - return value; - } - - public void volatileSet(Object update) { - value = update; - } - - public void lazySet(Object update) { - UNSAFE.putOrderedObject(this, OFFSET, update); - } - - public boolean compareAndSet(Object current, Object update) { - return UNSAFE.compareAndSwapObject(this, OFFSET, current, update); - } - - public Object getAndSet(Object update) { - Object current = value; - while (!UNSAFE.compareAndSwapObject(this, OFFSET, current, update)) - current = value; - return current; - } -} \ No newline at end of file diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java7BoxedInt.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java7BoxedInt.java deleted file mode 100644 index c02d98000..000000000 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java7BoxedInt.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2014-2021 by The Monix Project Developers. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.internal.atomic; - -import monix.execution.internal.InternalApi; -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -@InternalApi -final class Left64Java7BoxedInt extends LeftPadding56 implements BoxedInt { - public volatile int value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = Left64Java7BoxedInt.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - Left64Java7BoxedInt(int initialValue) { - this.value = initialValue; - } - - public int volatileGet() { - return value; - } - - public void volatileSet(int update) { - value = update; - } - - public void lazySet(int update) { - UNSAFE.putOrderedInt(this, OFFSET, update); - } - - public boolean compareAndSet(int current, int update) { - return UNSAFE.compareAndSwapInt(this, OFFSET, current, update); - } - - public int getAndSet(int update) { - int current = value; - while (!UNSAFE.compareAndSwapInt(this, OFFSET, current, update)) - current = value; - return current; - } - - public int getAndAdd(int delta) { - int current; - do { - current = UNSAFE.getIntVolatile(this, OFFSET); - } while (!UNSAFE.compareAndSwapInt(this, OFFSET, current, current+ delta)); - return current; - } -} \ No newline at end of file diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java7BoxedLong.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java7BoxedLong.java deleted file mode 100644 index efee26e1b..000000000 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java7BoxedLong.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) 2014-2021 by The Monix Project Developers. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.internal.atomic; - -import monix.execution.internal.InternalApi; -import sun.misc.Unsafe; - -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -@InternalApi -final class Left64Java7BoxedLong extends LeftPadding56 implements BoxedLong { - public volatile long value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = Left64Java7BoxedLong.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - Left64Java7BoxedLong(long initialValue) { - this.value = initialValue; - } - - public long volatileGet() { - return value; - } - - public void volatileSet(long update) { - value = update; - } - - public void lazySet(long update) { - UNSAFE.putOrderedLong(this, OFFSET, update); - } - - public boolean compareAndSet(long current, long update) { - return UNSAFE.compareAndSwapLong(this, OFFSET, current, update); - } - - public long getAndSet(long update) { - long current = value; - while (!UNSAFE.compareAndSwapLong(this, OFFSET, current, update)) - current = value; - return current; - } - - public long getAndAdd(long delta) { - long current; - do { - current = UNSAFE.getLongVolatile(this, OFFSET); - } while (!UNSAFE.compareAndSwapLong(this, OFFSET, current, current+delta)); - return current; - } -} \ No newline at end of file diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java7BoxedObject.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java7BoxedObject.java deleted file mode 100644 index 58b6aa32f..000000000 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Left64Java7BoxedObject.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 2014-2021 by The Monix Project Developers. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.internal.atomic; - -import monix.execution.internal.InternalApi; -import sun.misc.Unsafe; - -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -@InternalApi -final class Left64Java7BoxedObject extends LeftPadding56 implements BoxedObject { - public volatile Object value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = Left64Java7BoxedObject.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - Left64Java7BoxedObject(Object initialValue) { - this.value = initialValue; - } - - public Object volatileGet() { - return value; - } - - public void volatileSet(Object update) { - value = update; - } - - public void lazySet(Object update) { - UNSAFE.putOrderedObject(this, OFFSET, update); - } - - public boolean compareAndSet(Object current, Object update) { - return UNSAFE.compareAndSwapObject(this, OFFSET, current, update); - } - - public Object getAndSet(Object update) { - Object current = value; - while (!UNSAFE.compareAndSwapObject(this, OFFSET, current, update)) - current = value; - return current; - } -} \ No newline at end of file diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java7BoxedInt.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java7BoxedInt.java deleted file mode 100644 index 7c0daa50b..000000000 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java7BoxedInt.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright (c) 2014-2021 by The Monix Project Developers. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.internal.atomic; - -import monix.execution.internal.InternalApi; -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -@InternalApi -final class LeftRight128Java7BoxedInt extends LeftRight128Java7BoxedIntImpl { - public volatile long r1, r2, r3, r4, r5, r6, r7, r8 = 11; - @Override public long sum() { - return p1 + p2 + p3 + p4 + p5 + p6 + p7 + - r1 + r2 + r3 + r4 + r5 + r6 + r7 + r8; - } - - LeftRight128Java7BoxedInt(int initialValue) { - super(initialValue); - } -} - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -@InternalApi -abstract class LeftRight128Java7BoxedIntImpl extends LeftPadding56 implements BoxedInt { - public volatile int value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = LeftRight128Java7BoxedIntImpl.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - LeftRight128Java7BoxedIntImpl(int initialValue) { - this.value = initialValue; - } - - public int volatileGet() { - return value; - } - - public void volatileSet(int update) { - value = update; - } - - public void lazySet(int update) { - UNSAFE.putOrderedInt(this, OFFSET, update); - } - - public boolean compareAndSet(int current, int update) { - return UNSAFE.compareAndSwapInt(this, OFFSET, current, update); - } - - public int getAndSet(int update) { - int current = value; - while (!UNSAFE.compareAndSwapInt(this, OFFSET, current, update)) - current = value; - return current; - } - - public int getAndAdd(int delta) { - int current; - do { - current = UNSAFE.getIntVolatile(this, OFFSET); - } while (!UNSAFE.compareAndSwapInt(this, OFFSET, current, current+delta)); - return current; - } -} \ No newline at end of file diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java7BoxedLong.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java7BoxedLong.java deleted file mode 100644 index 1b19b664c..000000000 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java7BoxedLong.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright (c) 2014-2021 by The Monix Project Developers. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.internal.atomic; - -import monix.execution.internal.InternalApi; -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -@InternalApi -final class LeftRight128Java7BoxedLong extends LeftRight128Java7BoxedLongImpl { - public volatile long r1, r2, r3, r4, r5, r6, r7, r8 = 11; - @Override public long sum() { - return p1 + p2 + p3 + p4 + p5 + p6 + p7 + - r1 + r2 + r3 + r4 + r5 + r6 + r7 + r8; - } - - LeftRight128Java7BoxedLong(long initialValue) { - super(initialValue); - } -} - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -@InternalApi -abstract class LeftRight128Java7BoxedLongImpl extends LeftPadding56 implements BoxedLong { - public volatile long value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = LeftRight128Java7BoxedLongImpl.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - LeftRight128Java7BoxedLongImpl(long initialValue) { - this.value = initialValue; - } - - public long volatileGet() { - return value; - } - - public void volatileSet(long update) { - value = update; - } - - public void lazySet(long update) { - UNSAFE.putOrderedLong(this, OFFSET, update); - } - - public boolean compareAndSet(long current, long update) { - return UNSAFE.compareAndSwapLong(this, OFFSET, current, update); - } - - public long getAndSet(long update) { - long current = value; - while (!UNSAFE.compareAndSwapLong(this, OFFSET, current, update)) - current = value; - return current; - } - - public long getAndAdd(long delta) { - long current; - do { - current = UNSAFE.getLongVolatile(this, OFFSET); - } while (!UNSAFE.compareAndSwapLong(this, OFFSET, current, current+delta)); - return current; - } -} \ No newline at end of file diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java7BoxedObject.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java7BoxedObject.java deleted file mode 100644 index 2716a919c..000000000 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight128Java7BoxedObject.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (c) 2014-2021 by The Monix Project Developers. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.internal.atomic; - -import monix.execution.internal.InternalApi; -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -@InternalApi -final class LeftRight128Java7BoxedObject extends LeftRight128Java7BoxedObjectImpl { - public volatile long r1, r2, r3, r4, r5, r6, r7, r8 = 11; - @Override public long sum() { - return p1 + p2 + p3 + p4 + p5 + p6 + p7 + - r1 + r2 + r3 + r4 + r5 + r6 + r7 + r8; - } - - LeftRight128Java7BoxedObject(Object initialValue) { - super(initialValue); - } -} - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -@InternalApi -abstract class LeftRight128Java7BoxedObjectImpl extends LeftPadding56 implements BoxedObject { - public volatile Object value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = LeftRight128Java7BoxedObjectImpl.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - LeftRight128Java7BoxedObjectImpl(Object initialValue) { - this.value = initialValue; - } - - public Object volatileGet() { - return value; - } - - public void volatileSet(Object update) { - value = update; - } - - public void lazySet(Object update) { - UNSAFE.putOrderedObject(this, OFFSET, update); - } - - public boolean compareAndSet(Object current, Object update) { - return UNSAFE.compareAndSwapObject(this, OFFSET, current, update); - } - - public Object getAndSet(Object update) { - Object current = value; - while (!UNSAFE.compareAndSwapObject(this, OFFSET, current, update)) - current = value; - return current; - } -} \ No newline at end of file diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java7BoxedInt.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java7BoxedInt.java deleted file mode 100644 index f0307bf03..000000000 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java7BoxedInt.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright (c) 2014-2021 by The Monix Project Developers. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.internal.atomic; - -import monix.execution.internal.InternalApi; -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -@InternalApi -final class LeftRight256Java7BoxedInt extends LeftRight256Java7BoxedIntImpl { - public volatile long r01, r02, r03, r04, r05, r06, r07, r08 = 7; - public volatile long r09, r10, r11, r12, r13, r14, r15, r16 = 8; - @Override public long sum() { - return p01 + p02 + p03 + p04 + p05 + p06 + p07 + p08 + - p09 + p10 + p11 + p12 + p13 + p14 + p15 + - r01 + r02 + r03 + r04 + r05 + r06 + r07 + r08 + - r09 + r10 + r11 + r12 + r13 + r14 + r15 + r16; - } - - LeftRight256Java7BoxedInt(int initialValue) { - super(initialValue); - } -} - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -@InternalApi -abstract class LeftRight256Java7BoxedIntImpl extends LeftPadding120 implements BoxedInt { - public volatile int value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = LeftRight256Java7BoxedIntImpl.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - LeftRight256Java7BoxedIntImpl(int initialValue) { - this.value = initialValue; - } - - public int volatileGet() { - return value; - } - - public void volatileSet(int update) { - value = update; - } - - public void lazySet(int update) { - UNSAFE.putOrderedInt(this, OFFSET, update); - } - - public boolean compareAndSet(int current, int update) { - return UNSAFE.compareAndSwapInt(this, OFFSET, current, update); - } - - public int getAndSet(int update) { - int current = value; - while (!UNSAFE.compareAndSwapInt(this, OFFSET, current, update)) - current = value; - return current; - } - - public int getAndAdd(int delta) { - int current; - do { - current = UNSAFE.getIntVolatile(this, OFFSET); - } while (!UNSAFE.compareAndSwapInt(this, OFFSET, current, current+delta)); - return current; - } -} \ No newline at end of file diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java7BoxedLong.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java7BoxedLong.java deleted file mode 100644 index af4b971a3..000000000 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java7BoxedLong.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright (c) 2014-2021 by The Monix Project Developers. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.internal.atomic; - -import monix.execution.internal.InternalApi; -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -@InternalApi -final class LeftRight256Java7BoxedLong extends LeftRight256Java7BoxedLongImpl { - public volatile long r01, r02, r03, r04, r05, r06, r07, r08 = 7; - public volatile long r09, r10, r11, r12, r13, r14, r15, r16 = 8; - @Override public long sum() { - return - p01 + p02 + p03 + p04 + p05 + p06 + p07 + p08 + - p09 + p10 + p11 + p12 + p13 + p14 + p15 + - r01 + r02 + r03 + r04 + r05 + r06 + r07 + r08 + - r09 + r10 + r11 + r12 + r13 + r14 + r15 + r16; - } - - LeftRight256Java7BoxedLong(long initialValue) { - super(initialValue); - } -} - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -@InternalApi -abstract class LeftRight256Java7BoxedLongImpl extends LeftPadding120 implements BoxedLong { - public volatile long value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = LeftRight256Java7BoxedLongImpl.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - LeftRight256Java7BoxedLongImpl(long initialValue) { - this.value = initialValue; - } - - public long volatileGet() { - return value; - } - - public void volatileSet(long update) { - value = update; - } - - public void lazySet(long update) { - UNSAFE.putOrderedLong(this, OFFSET, update); - } - - public boolean compareAndSet(long current, long update) { - return UNSAFE.compareAndSwapLong(this, OFFSET, current, update); - } - - public long getAndSet(long update) { - long current = value; - while (!UNSAFE.compareAndSwapLong(this, OFFSET, current, update)) - current = value; - return current; - } - - public long getAndAdd(long delta) { - long current; - do { - current = UNSAFE.getLongVolatile(this, OFFSET); - } while (!UNSAFE.compareAndSwapLong(this, OFFSET, current, current+delta)); - return current; - } -} \ No newline at end of file diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java7BoxedObject.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java7BoxedObject.java deleted file mode 100644 index ba77a5263..000000000 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/LeftRight256Java7BoxedObject.java +++ /dev/null @@ -1,100 +0,0 @@ -/* - * Copyright (c) 2014-2021 by The Monix Project Developers. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.internal.atomic; - -import monix.execution.internal.InternalApi; -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -@InternalApi -final class LeftRight256Java7BoxedObject extends LeftRight256Java7BoxedObjectImpl { - public volatile long r01, r02, r03, r04, r05, r06, r07, r08 = 7; - public volatile long r09, r10, r11, r12, r13, r14, r15, r16 = 8; - @Override public long sum() { - return - p01 + p02 + p03 + p04 + p05 + p06 + p07 + p08 + - p09 + p10 + p11 + p12 + p13 + p14 + p15 + - r01 + r02 + r03 + r04 + r05 + r06 + r07 + r08 + - r09 + r10 + r11 + r12 + r13 + r14 + r15 + r16; - } - - LeftRight256Java7BoxedObject(Object initialValue) { - super(initialValue); - } -} - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -@InternalApi -abstract class LeftRight256Java7BoxedObjectImpl extends LeftPadding120 implements BoxedObject { - public volatile Object value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = LeftRight256Java7BoxedObjectImpl.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - LeftRight256Java7BoxedObjectImpl(Object initialValue) { - this.value = initialValue; - } - - public Object volatileGet() { - return value; - } - - public void volatileSet(Object update) { - value = update; - } - - public void lazySet(Object update) { - UNSAFE.putOrderedObject(this, OFFSET, update); - } - - public boolean compareAndSet(Object current, Object update) { - return UNSAFE.compareAndSwapObject(this, OFFSET, current, update); - } - - public Object getAndSet(Object update) { - Object current = value; - while (!UNSAFE.compareAndSwapObject(this, OFFSET, current, update)) - current = value; - return current; - } -} \ No newline at end of file diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava7BoxedInt.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava7BoxedInt.java deleted file mode 100644 index e4a627806..000000000 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava7BoxedInt.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2014-2021 by The Monix Project Developers. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.internal.atomic; - -import monix.execution.internal.InternalApi; -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -@InternalApi -final class NormalJava7BoxedInt implements BoxedInt { - public volatile int value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = NormalJava7BoxedInt.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - NormalJava7BoxedInt(int initialValue) { - this.value = initialValue; - } - - public int volatileGet() { - return value; - } - - public void volatileSet(int update) { - value = update; - } - - public void lazySet(int update) { - UNSAFE.putOrderedInt(this, OFFSET, update); - } - - public boolean compareAndSet(int current, int update) { - return UNSAFE.compareAndSwapInt(this, OFFSET, current, update); - } - - public int getAndSet(int update) { - int current = value; - while (!UNSAFE.compareAndSwapInt(this, OFFSET, current, update)) - current = value; - return current; - } - - public int getAndAdd(int delta) { - int current; - do { - current = UNSAFE.getIntVolatile(this, OFFSET); - } while (!UNSAFE.compareAndSwapInt(this, OFFSET, current, current+delta)); - return current; - } -} \ No newline at end of file diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava7BoxedLong.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava7BoxedLong.java deleted file mode 100644 index 069a3c745..000000000 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava7BoxedLong.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2014-2021 by The Monix Project Developers. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.internal.atomic; - -import monix.execution.internal.InternalApi; -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -@InternalApi -final class NormalJava7BoxedLong implements BoxedLong { - public volatile long value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = NormalJava7BoxedLong.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - NormalJava7BoxedLong(long initialValue) { - this.value = initialValue; - } - - public long volatileGet() { - return value; - } - - public void volatileSet(long update) { - value = update; - } - - public void lazySet(long update) { - UNSAFE.putOrderedLong(this, OFFSET, update); - } - - public boolean compareAndSet(long current, long update) { - return UNSAFE.compareAndSwapLong(this, OFFSET, current, update); - } - - public long getAndSet(long update) { - long current = value; - while (!UNSAFE.compareAndSwapLong(this, OFFSET, current, update)) - current = value; - return current; - } - - public long getAndAdd(long delta) { - long current; - do { - current = UNSAFE.getLongVolatile(this, OFFSET); - } while (!UNSAFE.compareAndSwapLong(this, OFFSET, current, current+delta)); - return current; - } -} \ No newline at end of file diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava7BoxedObject.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava7BoxedObject.java deleted file mode 100644 index 48bc50ec8..000000000 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/NormalJava7BoxedObject.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2014-2021 by The Monix Project Developers. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.internal.atomic; - -import monix.execution.internal.InternalApi; -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -@InternalApi -final class NormalJava7BoxedObject implements BoxedObject { - public volatile Object value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = NormalJava7BoxedObject.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - NormalJava7BoxedObject(Object initialValue) { - this.value = initialValue; - } - - public Object volatileGet() { - return value; - } - - public void volatileSet(Object update) { - value = update; - } - - public void lazySet(Object update) { - UNSAFE.putOrderedObject(this, OFFSET, update); - } - - public boolean compareAndSet(Object current, Object update) { - return UNSAFE.compareAndSwapObject(this, OFFSET, current, update); - } - - public Object getAndSet(Object update) { - Object current = value; - while (!UNSAFE.compareAndSwapObject(this, OFFSET, current, update)) - current = value; - return current; - } -} diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java7BoxedInt.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java7BoxedInt.java deleted file mode 100644 index 347bbe82b..000000000 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java7BoxedInt.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) 2014-2021 by The Monix Project Developers. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.internal.atomic; - -import monix.execution.internal.InternalApi; -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -@InternalApi -final class Right128Java7BoxedInt extends Right128Java7BoxedIntImpl { - public volatile long p1, p2, p3, p4, p5, p6, p7, p8 = 7; - public volatile long p9, p10, p11, p12, p13, p14, p15 = 7; - public long sum() { - return p1 + p2 + p3 + p4 + p5 + p6 + p7 + p8 + - p9 + p10 + p11 + p12 + p13 + p14 + p15; - } - - Right128Java7BoxedInt(int initialValue) { - super(initialValue); - } -} - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -@InternalApi -abstract class Right128Java7BoxedIntImpl implements BoxedInt { - public volatile int value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = Right128Java7BoxedIntImpl.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - Right128Java7BoxedIntImpl(int initialValue) { - this.value = initialValue; - } - - public int volatileGet() { - return value; - } - - public void volatileSet(int update) { - value = update; - } - - public void lazySet(int update) { - UNSAFE.putOrderedInt(this, OFFSET, update); - } - - public boolean compareAndSet(int current, int update) { - return UNSAFE.compareAndSwapInt(this, OFFSET, current, update); - } - - public int getAndSet(int update) { - int current = value; - while (!UNSAFE.compareAndSwapInt(this, OFFSET, current, update)) - current = value; - return current; - } - - public int getAndAdd(int delta) { - int current; - do { - current = UNSAFE.getIntVolatile(this, OFFSET); - } while (!UNSAFE.compareAndSwapInt(this, OFFSET, current, current+delta)); - return current; - } -} \ No newline at end of file diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java7BoxedLong.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java7BoxedLong.java deleted file mode 100644 index d1d62d8a1..000000000 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java7BoxedLong.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) 2014-2021 by The Monix Project Developers. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.internal.atomic; - -import monix.execution.internal.InternalApi; -import sun.misc.Unsafe; -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -@InternalApi -final class Right128Java7BoxedLong extends Right128Java7BoxedLongImpl { - public volatile long p1, p2, p3, p4, p5, p6, p7, p8 = 7; - public volatile long p9, p10, p11, p12, p13, p14, p15 = 7; - public long sum() { - return p1 + p2 + p3 + p4 + p5 + p6 + p7 + p8 + - p9 + p10 + p11 + p12 + p13 + p14 + p15; - } - - Right128Java7BoxedLong(long initialValue) { - super(initialValue); - } -} - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -@InternalApi -abstract class Right128Java7BoxedLongImpl implements BoxedLong { - public volatile long value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = Right128Java7BoxedLongImpl.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - Right128Java7BoxedLongImpl(long initialValue) { - this.value = initialValue; - } - - public long volatileGet() { - return value; - } - - public void volatileSet(long update) { - value = update; - } - - public void lazySet(long update) { - UNSAFE.putOrderedLong(this, OFFSET, update); - } - - public boolean compareAndSet(long current, long update) { - return UNSAFE.compareAndSwapLong(this, OFFSET, current, update); - } - - public long getAndSet(long update) { - long current = value; - while (!UNSAFE.compareAndSwapLong(this, OFFSET, current, update)) - current = value; - return current; - } - - public long getAndAdd(long delta) { - long current; - do { - current = UNSAFE.getLongVolatile(this, OFFSET); - } while (!UNSAFE.compareAndSwapLong(this, OFFSET, current, current+delta)); - return current; - } -} \ No newline at end of file diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java7BoxedObject.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java7BoxedObject.java deleted file mode 100644 index 044dd9e6d..000000000 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right128Java7BoxedObject.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) 2014-2021 by The Monix Project Developers. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.internal.atomic; - -import monix.execution.internal.InternalApi; -import sun.misc.Unsafe; - -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -@InternalApi -final class Right128Java7BoxedObject extends Right128Java7BoxedObjectImpl { - public volatile long p1, p2, p3, p4, p5, p6, p7, p8 = 7; - public volatile long p9, p10, p11, p12, p13, p14, p15 = 7; - public long sum() { - return p1 + p2 + p3 + p4 + p5 + p6 + p7 + p8 + - p9 + p10 + p11 + p12 + p13 + p14 + p15; - } - - Right128Java7BoxedObject(Object initialValue) { - super(initialValue); - } -} - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -@InternalApi -abstract class Right128Java7BoxedObjectImpl implements BoxedObject { - public volatile Object value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = Right128Java7BoxedObjectImpl.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - Right128Java7BoxedObjectImpl(Object initialValue) { - this.value = initialValue; - } - - public Object volatileGet() { - return value; - } - - public void volatileSet(Object update) { - value = update; - } - - public void lazySet(Object update) { - UNSAFE.putOrderedObject(this, OFFSET, update); - } - - public boolean compareAndSet(Object current, Object update) { - return UNSAFE.compareAndSwapObject(this, OFFSET, current, update); - } - - public Object getAndSet(Object update) { - Object current = value; - while (!UNSAFE.compareAndSwapObject(this, OFFSET, current, update)) - current = value; - return current; - } -} \ No newline at end of file diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java7BoxedInt.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java7BoxedInt.java deleted file mode 100644 index 9c9b92650..000000000 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java7BoxedInt.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (c) 2014-2021 by The Monix Project Developers. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.internal.atomic; - -import monix.execution.internal.InternalApi; -import sun.misc.Unsafe; - -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -@InternalApi -abstract class Right64Java7BoxedIntImpl implements BoxedInt { - public volatile int value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = Right64Java7BoxedIntImpl.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - Right64Java7BoxedIntImpl(int initialValue) { - this.value = initialValue; - } - - public int volatileGet() { - return value; - } - - public void volatileSet(int update) { - value = update; - } - - public void lazySet(int update) { - UNSAFE.putOrderedInt(this, OFFSET, update); - } - - public boolean compareAndSet(int current, int update) { - return UNSAFE.compareAndSwapInt(this, OFFSET, current, update); - } - - public int getAndSet(int update) { - int current = value; - while (!UNSAFE.compareAndSwapInt(this, OFFSET, current, update)) - current = value; - return current; - } - - public int getAndAdd(int delta) { - int current; - do { - current = UNSAFE.getIntVolatile(this, OFFSET); - } while (!UNSAFE.compareAndSwapInt(this, OFFSET, current, current+delta)); - return current; - } -} - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -@InternalApi -final class Right64Java7BoxedInt extends Right64Java7BoxedIntImpl { - public volatile long p1, p2, p3, p4, p5, p6, p7 = 7; - public long sum() { return p1 + p2 + p3 + p4 + p5 + p6 + p7; } - - Right64Java7BoxedInt(int initialValue) { - super(initialValue); - } -} diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java7BoxedLong.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java7BoxedLong.java deleted file mode 100644 index e9b5b1df5..000000000 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java7BoxedLong.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (c) 2014-2021 by The Monix Project Developers. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.internal.atomic; - -import monix.execution.internal.InternalApi; -import sun.misc.Unsafe; - -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -@InternalApi -abstract class Right64Java7BoxedLongImpl implements BoxedLong { - public volatile long value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = Right64Java7BoxedLongImpl.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - Right64Java7BoxedLongImpl(long initialValue) { - this.value = initialValue; - } - - public long volatileGet() { - return value; - } - - public void volatileSet(long update) { - value = update; - } - - public void lazySet(long update) { - UNSAFE.putOrderedLong(this, OFFSET, update); - } - - public boolean compareAndSet(long current, long update) { - return UNSAFE.compareAndSwapLong(this, OFFSET, current, update); - } - - public long getAndSet(long update) { - long current = value; - while (!UNSAFE.compareAndSwapLong(this, OFFSET, current, update)) - current = value; - return current; - } - - public long getAndAdd(long delta) { - long current; - do { - current = UNSAFE.getLongVolatile(this, OFFSET); - } while (!UNSAFE.compareAndSwapLong(this, OFFSET, current, current+delta)); - return current; - } -} - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -@InternalApi -final class Right64Java7BoxedLong extends Right64Java7BoxedLongImpl { - public volatile long p1, p2, p3, p4, p5, p6, p7 = 7; - public long sum() { return p1 + p2 + p3 + p4 + p5 + p6 + p7; } - - Right64Java7BoxedLong(long initialValue) { - super(initialValue); - } -} diff --git a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java7BoxedObject.java b/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java7BoxedObject.java deleted file mode 100644 index 037bac470..000000000 --- a/monix-execution/jvm/src/main/java/monix/execution/internal/atomic/Right64Java7BoxedObject.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright (c) 2014-2021 by The Monix Project Developers. - * See the project homepage at: https://monix.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package monix.execution.internal.atomic; - -import monix.execution.internal.InternalApi; -import sun.misc.Unsafe; - -import java.lang.reflect.Field; - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -@InternalApi -abstract class Right64Java7BoxedObjectImpl implements BoxedObject { - public volatile Object value; - private static final long OFFSET; - private static final Unsafe UNSAFE = (Unsafe) UnsafeAccess.getInstance(); - - static { - try { - Field field = Right64Java7BoxedObjectImpl.class.getDeclaredField("value"); - OFFSET = UNSAFE.objectFieldOffset(field); - } catch (Exception ex) { - throw new RuntimeException(ex); - } - } - - Right64Java7BoxedObjectImpl(Object initialValue) { - this.value = initialValue; - } - - public Object volatileGet() { - return value; - } - - public void volatileSet(Object update) { - value = update; - } - - public void lazySet(Object update) { - UNSAFE.putOrderedObject(this, OFFSET, update); - } - - public boolean compareAndSet(Object current, Object update) { - return UNSAFE.compareAndSwapObject(this, OFFSET, current, update); - } - - public Object getAndSet(Object update) { - Object current = value; - while (!UNSAFE.compareAndSwapObject(this, OFFSET, current, update)) - current = value; - return current; - } -} - -/** - * INTERNAL API — used in the implementation of - * `monix.execution.atomic.Atomic`. - * - * Being internal it can always change between minor versions, - * providing no backwards compatibility guarantees and is only public - * because Java does not provide the capability of marking classes as - * "internal" to a package and all its sub-packages. - */ -@InternalApi -final class Right64Java7BoxedObject extends Right64Java7BoxedObjectImpl { - public volatile long p1, p2, p3, p4, p5, p6, p7 = 7; - public long sum() { return p1 + p2 + p3 + p4 + p5 + p6 + p7; } - - Right64Java7BoxedObject(Object initialValue) { - super(initialValue); - } -} diff --git a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicAny.scala b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicAny.scala index 316a4c211..2c742f619 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicAny.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicAny.scala @@ -65,7 +65,7 @@ object AtomicAny { * @param padding is the [[PaddingStrategy]] to apply */ def withPadding[A <: AnyRef](initialValue: A, padding: PaddingStrategy): AtomicAny[A] = - create(initialValue, padding, allowPlatformIntrinsics = true) + create(initialValue, padding) /** $createDesc * @@ -75,20 +75,19 @@ object AtomicAny { * * @param initialValue is the initial value with which to initialize the atomic * @param padding is the [[PaddingStrategy]] to apply - * @param allowPlatformIntrinsics is a boolean parameter that specifies whether - * the instance is allowed to use the Java 8 optimized operations - * for `getAndSet` and for `getAndAdd` */ - def create[A <: AnyRef](initialValue: A, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean): AtomicAny[A] = { + def create[A <: AnyRef](initialValue: A, padding: PaddingStrategy): AtomicAny[A] = { new AtomicAny( Factory.newBoxedObject( initialValue, boxStrategyToPaddingStrategy(padding), true, // allowUnsafe - allowPlatformIntrinsics )) } + @deprecated("Use create(initialValue, padding) instead", "3.4.0-avs6") + def create[A <: AnyRef](initialValue: A, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean): AtomicAny[A] = create(initialValue, padding) + /** $createDesc * * This builder guarantees to construct a safe atomic reference that @@ -110,6 +109,5 @@ object AtomicAny { initialValue, boxStrategyToPaddingStrategy(padding), false, // allowUnsafe - false // allowPlatformIntrinsics )) } diff --git a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicBoolean.scala b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicBoolean.scala index a628b8d52..bf4ae219f 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicBoolean.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicBoolean.scala @@ -77,7 +77,7 @@ object AtomicBoolean { * @param padding is the [[PaddingStrategy]] to apply */ def withPadding(initialValue: Boolean, padding: PaddingStrategy): AtomicBoolean = - create(initialValue, padding, allowPlatformIntrinsics = true) + create(initialValue, padding) /** $createDesc * @@ -87,19 +87,19 @@ object AtomicBoolean { * * @param initialValue is the initial value with which to initialize the atomic * @param padding is the [[PaddingStrategy]] to apply - * @param allowPlatformIntrinsics is a boolean parameter that specifies whether - * the instance is allowed to use the Java 8 optimized operations - * for `getAndSet` and for `getAndAdd` */ - def create(initialValue: Boolean, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean): AtomicBoolean = { + def create(initialValue: Boolean, padding: PaddingStrategy): AtomicBoolean = { new AtomicBoolean( Factory.newBoxedInt( if (initialValue) 1 else 0, boxStrategyToPaddingStrategy(padding), true, // allowUnsafe - allowPlatformIntrinsics)) + )) } + @deprecated("Use create(initialValue, padding) instead", "3.4.0-avs6") + def create(initialValue: Boolean, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean): AtomicBoolean = create(initialValue, padding) + /** $createDesc * * This builder guarantees to construct a safe atomic reference that @@ -121,7 +121,6 @@ object AtomicBoolean { if (initialValue) 1 else 0, boxStrategyToPaddingStrategy(padding), false, // allowUnsafe - false // allowJava8Intrinsics )) } } diff --git a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicBuilder.scala b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicBuilder.scala index 7a580eb58..9d126db29 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicBuilder.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicBuilder.scala @@ -34,8 +34,12 @@ private[atomic] object Implicits { /** Provides an [[AtomicBuilder]] instance for [[AtomicAny]]. */ implicit def AtomicRefBuilder[A <: AnyRef]: AtomicBuilder[A, AtomicAny[A]] = new AtomicBuilder[A, AtomicAny[A]] { + @deprecated("Use buildInstance(initialValue, padding) instead", "3.4.0-avs6") def buildInstance(initialValue: A, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean) = - AtomicAny.create(initialValue, padding, allowPlatformIntrinsics) + buildInstance(initialValue, padding) + + def buildInstance(initialValue: A, padding: PaddingStrategy) = + AtomicAny.create(initialValue, padding) def buildSafeInstance(initialValue: A, padding: PaddingStrategy) = AtomicAny.safe(initialValue, padding) @@ -46,8 +50,12 @@ private[atomic] object Implicits { /** Provides an [[AtomicBuilder]] instance for [[AtomicNumberAny]]. */ implicit def AtomicNumberBuilder[A <: AnyRef: Numeric]: AtomicBuilder[A, AtomicNumberAny[A]] = new AtomicBuilder[A, AtomicNumberAny[A]] { + @deprecated("Use buildInstance(initialValue, padding) instead", "3.4.0-avs6") def buildInstance(initialValue: A, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean) = - AtomicNumberAny.create(initialValue, padding, allowPlatformIntrinsics)(implicitly[Numeric[A]]) + buildInstance(initialValue, padding) + + def buildInstance(initialValue: A, padding: PaddingStrategy) = + AtomicNumberAny.create(initialValue, padding)(implicitly[Numeric[A]]) def buildSafeInstance(initialValue: A, padding: PaddingStrategy) = AtomicNumberAny.safe(initialValue, padding)(implicitly[Numeric[A]]) @@ -58,8 +66,11 @@ private[atomic] object Implicits { object AtomicBuilder extends Implicits.Level2 { /** Provides an [[AtomicBuilder]] instance for [[AtomicInt]]. */ implicit object AtomicIntBuilder extends AtomicBuilder[Int, AtomicInt] { + @deprecated("Use buildInstance(initialValue, padding) instead", "3.4.0-avs6") def buildInstance(initialValue: Int, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean): AtomicInt = - AtomicInt.create(initialValue, padding, allowPlatformIntrinsics) + buildInstance(initialValue, padding) + def buildInstance(initialValue: Int, padding: PaddingStrategy): AtomicInt = + AtomicInt.create(initialValue, padding) def buildSafeInstance(initialValue: Int, padding: PaddingStrategy): AtomicInt = AtomicInt.safe(initialValue, padding) @@ -67,17 +78,23 @@ object AtomicBuilder extends Implicits.Level2 { /** Provides an [[AtomicBuilder]] instance for [[AtomicLong]]. */ implicit object AtomicLongBuilder extends AtomicBuilder[Long, AtomicLong] { + @deprecated("Use buildInstance(initialValue, padding) instead", "3.4.0-avs6") def buildInstance(initialValue: Long, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean): AtomicLong = - AtomicLong.create(initialValue, padding, allowPlatformIntrinsics) + buildInstance(initialValue, padding) + def buildInstance(initialValue: Long, padding: PaddingStrategy): AtomicLong = + AtomicLong.create(initialValue, padding) def buildSafeInstance(initialValue: Long, padding: PaddingStrategy): AtomicLong = AtomicLong.safe(initialValue, padding) } /** Provides an [[AtomicBuilder]] instance for [[AtomicBoolean]]. */ implicit object AtomicBooleanBuilder extends AtomicBuilder[Boolean, AtomicBoolean] { + @deprecated("Use buildInstance(initialValue, padding) instead", "3.4.0-avs6") def buildInstance(initialValue: Boolean, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean) = - AtomicBoolean.create(initialValue, padding, allowPlatformIntrinsics) + buildInstance(initialValue, padding) + def buildInstance(initialValue: Boolean, padding: PaddingStrategy) = + AtomicBoolean.create(initialValue, padding) def buildSafeInstance(initialValue: Boolean, padding: PaddingStrategy) = AtomicBoolean.safe(initialValue, padding) @@ -85,8 +102,12 @@ object AtomicBuilder extends Implicits.Level2 { /** Provides an [[AtomicBuilder]] instance for [[AtomicByte]]. */ implicit object AtomicByteBuilder extends AtomicBuilder[Byte, AtomicByte] { + @deprecated("Use buildInstance(initialValue, padding) instead", "3.4.0-avs6") def buildInstance(initialValue: Byte, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean): AtomicByte = - AtomicByte.create(initialValue, padding, allowPlatformIntrinsics) + buildInstance(initialValue, padding) + + def buildInstance(initialValue: Byte, padding: PaddingStrategy): AtomicByte = + AtomicByte.create(initialValue, padding) def buildSafeInstance(initialValue: Byte, padding: PaddingStrategy): AtomicByte = AtomicByte.safe(initialValue, padding) @@ -94,8 +115,12 @@ object AtomicBuilder extends Implicits.Level2 { /** Provides an [[AtomicBuilder]] instance for [[AtomicChar]]. */ implicit object AtomicCharBuilder extends AtomicBuilder[Char, AtomicChar] { + @deprecated("Use buildInstance(initialValue, padding) instead", "3.4.0-avs6") def buildInstance(initialValue: Char, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean): AtomicChar = - AtomicChar.create(initialValue, padding, allowPlatformIntrinsics) + buildInstance(initialValue, padding) + + def buildInstance(initialValue: Char, padding: PaddingStrategy): AtomicChar = + AtomicChar.create(initialValue, padding) def buildSafeInstance(initialValue: Char, padding: PaddingStrategy): AtomicChar = AtomicChar.safe(initialValue, padding) @@ -103,8 +128,12 @@ object AtomicBuilder extends Implicits.Level2 { /** Provides an [[AtomicBuilder]] instance for [[AtomicShort]]. */ implicit object AtomicShortBuilder extends AtomicBuilder[Short, AtomicShort] { + @deprecated("Use buildInstance(initialValue, padding) instead", "3.4.0-avs6") def buildInstance(initialValue: Short, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean): AtomicShort = - AtomicShort.create(initialValue, padding, allowPlatformIntrinsics) + buildInstance(initialValue, padding) + + def buildInstance(initialValue: Short, padding: PaddingStrategy): AtomicShort = + AtomicShort.create(initialValue, padding) def buildSafeInstance(initialValue: Short, padding: PaddingStrategy): AtomicShort = AtomicShort.safe(initialValue, padding) @@ -112,8 +141,12 @@ object AtomicBuilder extends Implicits.Level2 { /** Provides an [[AtomicBuilder]] instance for [[AtomicFloat]]. */ implicit object AtomicFloatBuilder extends AtomicBuilder[Float, AtomicFloat] { + @deprecated("Use buildInstance(initialValue, padding) instead", "3.4.0-avs6") def buildInstance(initialValue: Float, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean): AtomicFloat = - AtomicFloat.create(initialValue, padding, allowPlatformIntrinsics) + buildInstance(initialValue, padding) + + def buildInstance(initialValue: Float, padding: PaddingStrategy): AtomicFloat = + AtomicFloat.create(initialValue, padding) def buildSafeInstance(initialValue: Float, padding: PaddingStrategy): AtomicFloat = AtomicFloat.safe(initialValue, padding) @@ -121,8 +154,12 @@ object AtomicBuilder extends Implicits.Level2 { /** Provides an [[AtomicBuilder]] instance for [[AtomicDouble]]. */ implicit object AtomicDoubleBuilder extends AtomicBuilder[Double, AtomicDouble] { + @deprecated("Use buildInstance(initialValue, padding) instead", "3.4.0-avs6") def buildInstance(initialValue: Double, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean): AtomicDouble = - AtomicDouble.create(initialValue, padding, allowPlatformIntrinsics) + buildInstance(initialValue, padding) + + def buildInstance(initialValue: Double, padding: PaddingStrategy): AtomicDouble = + AtomicDouble.create(initialValue, padding) def buildSafeInstance(initialValue: Double, padding: PaddingStrategy): AtomicDouble = AtomicDouble.safe(initialValue, padding) diff --git a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicByte.scala b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicByte.scala index 736282763..74d62e6bb 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicByte.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicByte.scala @@ -18,7 +18,7 @@ package monix.execution.atomic import monix.execution.atomic.PaddingStrategy.NoPadding -import monix.execution.internal.atomic.{BoxedInt, Factory} +import monix.execution.internal.atomic.{ BoxedInt, Factory } /** Atomic references wrapping `Byte` values. * @@ -29,10 +29,10 @@ final class AtomicByte private (private[this] val ref: BoxedInt) extends AtomicN private[this] val mask = 255 - def get(): Byte = + def get(): Byte = (ref.volatileGet() & mask).asInstanceOf[Byte] - def set(update: Byte): Unit = + def set(update: Byte): Unit = ref.volatileSet(update.asInstanceOf[Int]) def lazySet(update: Byte): Unit = @@ -108,7 +108,7 @@ object AtomicByte { * @param padding is the [[PaddingStrategy]] to apply */ def withPadding(initialValue: Byte, padding: PaddingStrategy): AtomicByte = - create(initialValue, padding, allowPlatformIntrinsics = true) + create(initialValue, padding) /** $createDesc * @@ -118,19 +118,19 @@ object AtomicByte { * * @param initialValue is the initial value with which to initialize the atomic * @param padding is the [[PaddingStrategy]] to apply - * @param allowPlatformIntrinsics is a boolean parameter that specifies whether - * the instance is allowed to use the Java 8 optimized operations - * for `getAndSet` and for `getAndAdd` */ - def create(initialValue: Byte, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean): AtomicByte = + def create(initialValue: Byte, padding: PaddingStrategy): AtomicByte = new AtomicByte( Factory.newBoxedInt( initialValue.toInt, boxStrategyToPaddingStrategy(padding), true, // allowUnsafe - allowPlatformIntrinsics - )) + ) + ) + @deprecated("Use create(initialValue, padding) instead", "3.4.0-avs6") + def create(initialValue: Byte, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean): AtomicByte = + create(initialValue, padding) /** $createDesc * * This builder guarantees to construct a safe atomic reference that @@ -152,7 +152,7 @@ object AtomicByte { initialValue.toInt, boxStrategyToPaddingStrategy(padding), false, // allowUnsafe - false // allowJava8Intrinsics - )) + ) + ) } } diff --git a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicChar.scala b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicChar.scala index 9d10ecadc..f1765dd63 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicChar.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicChar.scala @@ -18,7 +18,7 @@ package monix.execution.atomic import monix.execution.atomic.PaddingStrategy.NoPadding -import monix.execution.internal.atomic.{BoxedInt, Factory} +import monix.execution.internal.atomic.{ BoxedInt, Factory } /** Atomic references wrapping `Char` values. * @@ -28,10 +28,10 @@ import monix.execution.internal.atomic.{BoxedInt, Factory} final class AtomicChar private (private[this] val ref: BoxedInt) extends AtomicNumber[Char] { private[this] val mask = 255 + 255 * 256 - def get(): Char = + def get(): Char = (ref.volatileGet() & mask).asInstanceOf[Char] - def set(update: Char): Unit = + def set(update: Char): Unit = ref.volatileSet(update.asInstanceOf[Int]) def lazySet(update: Char): Unit = @@ -107,7 +107,7 @@ object AtomicChar { * @param padding is the [[PaddingStrategy]] to apply */ def withPadding(initialValue: Char, padding: PaddingStrategy): AtomicChar = - create(initialValue, padding, allowPlatformIntrinsics = true) + create(initialValue, padding) /** $createDesc * @@ -117,20 +117,21 @@ object AtomicChar { * * @param initialValue is the initial value with which to initialize the atomic * @param padding is the [[PaddingStrategy]] to apply - * @param allowPlatformIntrinsics is a boolean parameter that specifies whether - * the instance is allowed to use the Java 8 optimized operations - * for `getAndSet` and for `getAndAdd` */ - def create(initialValue: Char, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean): AtomicChar = { + def create(initialValue: Char, padding: PaddingStrategy): AtomicChar = { new AtomicChar( Factory.newBoxedInt( initialValue.toInt, boxStrategyToPaddingStrategy(padding), true, // allowUnsafe - allowPlatformIntrinsics - )) + ) + ) } + @deprecated("Use create(initialValue, padding) instead", "3.4.0-avs6") + def create(initialValue: Char, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean): AtomicChar = + create(initialValue, padding) + /** $createDesc * * This builder guarantees to construct a safe atomic reference that @@ -152,7 +153,7 @@ object AtomicChar { initialValue.toInt, boxStrategyToPaddingStrategy(padding), false, // allowUnsafe - false // allowJava8Intrinsics - )) + ) + ) } } diff --git a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicDouble.scala b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicDouble.scala index 8c1bc9df1..acf826c9b 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicDouble.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicDouble.scala @@ -18,9 +18,10 @@ package monix.execution.atomic import monix.execution.atomic.PaddingStrategy.NoPadding +import monix.execution.internal.atomic.{ BoxedLong, Factory } + +import java.lang.Double.{ doubleToLongBits, longBitsToDouble } import scala.annotation.tailrec -import java.lang.Double.{doubleToLongBits, longBitsToDouble} -import monix.execution.internal.atomic.{BoxedLong, Factory} /** Atomic references wrapping `Double` values. * @@ -162,7 +163,7 @@ object AtomicDouble { * @param padding is the [[PaddingStrategy]] to apply */ def withPadding(initialValue: Double, padding: PaddingStrategy): AtomicDouble = - create(initialValue, padding, allowPlatformIntrinsics = true) + create(initialValue, padding) /** $createDesc * @@ -172,20 +173,21 @@ object AtomicDouble { * * @param initialValue is the initial value with which to initialize the atomic * @param padding is the [[PaddingStrategy]] to apply - * @param allowPlatformIntrinsics is a boolean parameter that specifies whether - * the instance is allowed to use the Java 8 optimized operations - * for `getAndSet` and for `getAndAdd` */ - def create(initialValue: Double, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean): AtomicDouble = { + def create(initialValue: Double, padding: PaddingStrategy): AtomicDouble = { new AtomicDouble( Factory.newBoxedLong( doubleToLongBits(initialValue), boxStrategyToPaddingStrategy(padding), true, // allowIntrinsics - allowPlatformIntrinsics - )) + ) + ) } + @deprecated("Use create(initialValue, padding) instead", "3.4.0-avs6") + def create(initialValue: Double, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean): AtomicDouble = + create(initialValue, padding) + /** $createDesc * * This builder guarantees to construct a safe atomic reference that @@ -207,7 +209,7 @@ object AtomicDouble { doubleToLongBits(initialValue), boxStrategyToPaddingStrategy(padding), false, // allowUnsafe - false // allowJava8Intrinsics - )) + ) + ) } } diff --git a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicFloat.scala b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicFloat.scala index 83379e222..fc9d7e9de 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicFloat.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicFloat.scala @@ -18,9 +18,10 @@ package monix.execution.atomic import monix.execution.atomic.PaddingStrategy.NoPadding +import monix.execution.internal.atomic.{ BoxedInt, Factory } + +import java.lang.Float.{ floatToIntBits, intBitsToFloat } import scala.annotation.tailrec -import java.lang.Float.{floatToIntBits, intBitsToFloat} -import monix.execution.internal.atomic.{BoxedInt, Factory} /** Atomic references wrapping `Float` values. * @@ -162,7 +163,7 @@ object AtomicFloat { * @param padding is the [[PaddingStrategy]] to apply */ def withPadding(initialValue: Float, padding: PaddingStrategy): AtomicFloat = - create(initialValue, padding, allowPlatformIntrinsics = true) + create(initialValue, padding) /** $createDesc * @@ -172,20 +173,21 @@ object AtomicFloat { * * @param initialValue is the initial value with which to initialize the atomic * @param padding is the [[PaddingStrategy]] to apply - * @param allowPlatformIntrinsics is a boolean parameter that specifies whether - * the instance is allowed to use the Java 8 optimized operations - * for `getAndSet` and for `getAndAdd` */ - def create(initialValue: Float, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean): AtomicFloat = { + def create(initialValue: Float, padding: PaddingStrategy): AtomicFloat = { new AtomicFloat( Factory.newBoxedInt( floatToIntBits(initialValue), boxStrategyToPaddingStrategy(padding), true, // allowUnsafe - allowPlatformIntrinsics - )) + ) + ) } + @deprecated("Use create(initialValue, padding) instead", "3.4.0-avs6") + def create(initialValue: Float, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean): AtomicFloat = + create(initialValue, padding) + /** $createDesc * * This builder guarantees to construct a safe atomic reference that @@ -207,7 +209,7 @@ object AtomicFloat { floatToIntBits(initialValue), boxStrategyToPaddingStrategy(padding), false, // allowUnsafe - false // allowJava8Intrinsics - )) + ) + ) } } diff --git a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicInt.scala b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicInt.scala index 1c648241f..f2a732954 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicInt.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicInt.scala @@ -18,7 +18,7 @@ package monix.execution.atomic import monix.execution.atomic.PaddingStrategy.NoPadding -import monix.execution.internal.atomic.{BoxedInt, Factory} +import monix.execution.internal.atomic.{ BoxedInt, Factory } /** Atomic references wrapping `Int` values. * @@ -103,7 +103,7 @@ object AtomicInt { * @param padding is the [[PaddingStrategy]] to apply */ def withPadding(initialValue: Int, padding: PaddingStrategy): AtomicInt = - create(initialValue, padding, allowPlatformIntrinsics = true) + create(initialValue, padding) /** $createDesc * @@ -113,20 +113,21 @@ object AtomicInt { * * @param initialValue is the initial value with which to initialize the atomic * @param padding is the [[PaddingStrategy]] to apply - * @param allowPlatformIntrinsics is a boolean parameter that specifies whether - * the instance is allowed to use the Java 8 optimized operations - * for `getAndSet` and for `getAndAdd` */ - def create(initialValue: Int, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean): AtomicInt = { + def create(initialValue: Int, padding: PaddingStrategy): AtomicInt = { new AtomicInt( Factory.newBoxedInt( initialValue, boxStrategyToPaddingStrategy(padding), true, // allowUnsafe - allowPlatformIntrinsics - )) + ) + ) } + @deprecated("Use create(initialValue, padding) instead", "3.4.0-avs6") + def create(initialValue: Int, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean): AtomicInt = + create(initialValue, padding) + /** $createDesc * * This builder guarantees to construct a safe atomic reference that @@ -148,7 +149,7 @@ object AtomicInt { initialValue, boxStrategyToPaddingStrategy(padding), false, // allowUnsafe - false // allowJava8Intrinsics - )) + ) + ) } } diff --git a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicLong.scala b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicLong.scala index e637dd6d9..9845132f7 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicLong.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicLong.scala @@ -70,16 +70,16 @@ final class AtomicLong private (private[this] val ref: BoxedLong) extends Atomic def subtractAndGet(v: Long): Long = addAndGet(-v) - def decrement(v: Int = 1): Unit = + def decrement(v: Int = 1): Unit = increment(-v) - def decrementAndGet(v: Int = 1): Long = + def decrementAndGet(v: Int = 1): Long = incrementAndGet(-v) - def getAndDecrement(v: Int = 1): Long = + def getAndDecrement(v: Int = 1): Long = getAndIncrement(-v) - override def toString: String = + override def toString: String = s"AtomicLong(${ref.volatileGet()})" } @@ -109,7 +109,7 @@ object AtomicLong { * @param padding is the [[PaddingStrategy]] to apply */ def withPadding(initialValue: Long, padding: PaddingStrategy): AtomicLong = - create(initialValue, padding, allowPlatformIntrinsics = true) + create(initialValue, padding) /** $createDesc * @@ -119,20 +119,21 @@ object AtomicLong { * * @param initialValue is the initial value with which to initialize the atomic * @param padding is the [[PaddingStrategy]] to apply - * @param allowPlatformIntrinsics is a boolean parameter that specifies whether - * the instance is allowed to use the Java 8 optimized operations - * for `getAndSet` and for `getAndAdd` */ - def create(initialValue: Long, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean): AtomicLong = { + def create(initialValue: Long, padding: PaddingStrategy): AtomicLong = { new AtomicLong( Factory.newBoxedLong( initialValue, boxStrategyToPaddingStrategy(padding), true, // allowUnsafe - allowPlatformIntrinsics - )) + ) + ) } + @deprecated("Use create(initialValue, padding) instead", "3.4.0-avs6") + def create(initialValue: Long, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean): AtomicLong = + create(initialValue, padding) + /** $createDesc * * This builder guarantees to construct a safe atomic reference that @@ -154,7 +155,7 @@ object AtomicLong { initialValue, boxStrategyToPaddingStrategy(padding), false, // allowUnsafe - false // allowPlatformIntrinsics - )) + ) + ) } } diff --git a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicNumberAny.scala b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicNumberAny.scala index d95c5df22..b95030356 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicNumberAny.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicNumberAny.scala @@ -19,6 +19,7 @@ package monix.execution.atomic import monix.execution.atomic.PaddingStrategy.NoPadding import monix.execution.internal.atomic.{BoxedObject, Factory} + import scala.annotation.tailrec /** Atomic references wrapping any values implementing @@ -163,7 +164,7 @@ object AtomicNumberAny { * @param padding is the [[PaddingStrategy]] to apply */ def withPadding[A <: AnyRef: Numeric](initialValue: A, padding: PaddingStrategy): AtomicNumberAny[A] = - create(initialValue, padding, allowPlatformIntrinsics = true) + create(initialValue, padding) /** $createDesc * @@ -173,23 +174,27 @@ object AtomicNumberAny { * * @param initialValue is the initial value with which to initialize the atomic * @param padding is the [[PaddingStrategy]] to apply - * @param allowPlatformIntrinsics is a boolean parameter that specifies whether - * the instance is allowed to use the Java 8 optimized operations - * for `getAndSet` and for `getAndAdd` */ def create[A <: AnyRef: Numeric]( initialValue: A, padding: PaddingStrategy, - allowPlatformIntrinsics: Boolean): AtomicNumberAny[A] = { + ): AtomicNumberAny[A] = { new AtomicNumberAny[A]( Factory.newBoxedObject( initialValue, boxStrategyToPaddingStrategy(padding), true, // allowUnsafe - allowPlatformIntrinsics - )) + ) + ) } + @deprecated("Use create(initialValue, padding) instead", "3.4.0-avs6") + def create[A <: AnyRef: Numeric]( + initialValue: A, + padding: PaddingStrategy, + allowPlatformIntrinsics: Boolean + ): AtomicNumberAny[A] = create(initialValue, padding) + /** $createDesc * * This builder guarantees to construct a safe atomic reference that @@ -211,6 +216,6 @@ object AtomicNumberAny { initialValue, boxStrategyToPaddingStrategy(padding), false, // allowUnsafe - false // allowPlatformIntrinsics - )) + ) + ) } diff --git a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicShort.scala b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicShort.scala index 86e0f46c5..31f523483 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicShort.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicShort.scala @@ -18,7 +18,7 @@ package monix.execution.atomic import monix.execution.atomic.PaddingStrategy.NoPadding -import monix.execution.internal.atomic.{BoxedInt, Factory} +import monix.execution.internal.atomic.{ BoxedInt, Factory } /** Atomic references wrapping `Short` values. * @@ -28,10 +28,10 @@ import monix.execution.internal.atomic.{BoxedInt, Factory} final class AtomicShort private (private[this] val ref: BoxedInt) extends AtomicNumber[Short] { private[this] val mask = 255 + 255 * 256 - def get(): Short = + def get(): Short = (ref.volatileGet() & mask).asInstanceOf[Short] - def set(update: Short): Unit = + def set(update: Short): Unit = ref.volatileSet(update.asInstanceOf[Int]) def lazySet(update: Short): Unit = @@ -107,7 +107,7 @@ object AtomicShort { * @param padding is the [[PaddingStrategy]] to apply */ def withPadding(initialValue: Short, padding: PaddingStrategy): AtomicShort = - create(initialValue, padding, allowPlatformIntrinsics = true) + create(initialValue, padding) /** $createDesc * @@ -117,20 +117,21 @@ object AtomicShort { * * @param initialValue is the initial value with which to initialize the atomic * @param padding is the [[PaddingStrategy]] to apply - * @param allowPlatformIntrinsics is a boolean parameter that specifies whether - * the instance is allowed to use the Java 8 optimized operations - * for `getAndSet` and for `getAndAdd` */ - def create(initialValue: Short, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean): AtomicShort = { + def create(initialValue: Short, padding: PaddingStrategy): AtomicShort = { new AtomicShort( Factory.newBoxedInt( initialValue.toInt, boxStrategyToPaddingStrategy(padding), true, // allowUnsafe - allowPlatformIntrinsics - )) + ) + ) } + @deprecated("Use create(initialValue, padding) instead", "3.4.0-avs6") + def create(initialValue: Short, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean): AtomicShort = + create(initialValue, padding) + /** $createDesc * * This builder guarantees to construct a safe atomic reference that @@ -152,7 +153,7 @@ object AtomicShort { initialValue.toInt, boxStrategyToPaddingStrategy(padding), false, // allowUnsafe - false // allowJava8Intrinsics - )) + ) + ) } } diff --git a/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/FromCircularQueue.scala b/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/FromCircularQueue.scala index 6a51f952e..2149f4b44 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/FromCircularQueue.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/FromCircularQueue.scala @@ -23,6 +23,7 @@ import monix.execution.internal.atomic.UnsafeAccess import monix.execution.internal.collection.LowLevelConcurrentQueue import monix.execution.internal.jctools.queues.MessagePassingQueue import sun.misc.Unsafe + import scala.collection.mutable private[internal] abstract class FromCircularQueue[A](queue: MessagePassingQueue[A]) @@ -59,14 +60,11 @@ private[internal] object FromCircularQueue { case ChannelType.MPMC => new MPMC[A](queue) case ChannelType.MPSC => - if (UnsafeAccess.HAS_JAVA8_INTRINSICS) new Java8MPSC[A](queue) - else new Java7[A](queue, ct) + new Java8MPSC[A](queue) case ChannelType.SPMC => - if (UnsafeAccess.HAS_JAVA8_INTRINSICS) new Java8SPMC[A](queue) - else new Java7[A](queue, ct) + new Java8SPMC[A](queue) case ChannelType.SPSC => - if (UnsafeAccess.HAS_JAVA8_INTRINSICS) new Java8SPSC[A](queue) - else new Java7[A](queue, ct) + new Java8SPSC[A](queue) } private final class MPMC[A](queue: MessagePassingQueue[A]) extends FromCircularQueue[A](queue) { @@ -101,22 +99,4 @@ private[internal] object FromCircularQueue { def fenceOffer(): Unit = UNSAFE.fullFence() def fencePoll(): Unit = UNSAFE.fullFence() } - - private final class Java7[A](queue: MessagePassingQueue[A], ct: ChannelType) - extends FromCircularQueue[A](queue) { - - def fenceOffer(): Unit = - if (ct.producerType == SingleProducer) { - raise() - } - - def fencePoll(): Unit = - if (ct.consumerType == SingleConsumer) { - raise() - } - - private def raise(): Unit = { - throw new IllegalAccessException("Unsafe.fullFence not supported on this platform! (please report bug)") - } - } } diff --git a/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/FromMessagePassingQueue.scala b/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/FromMessagePassingQueue.scala index c0fd9a1ff..3186fd82e 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/FromMessagePassingQueue.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/FromMessagePassingQueue.scala @@ -56,14 +56,11 @@ private[internal] object FromMessagePassingQueue { case ChannelType.MPMC => new MPMC[A](queue) case ChannelType.MPSC => - if (UnsafeAccess.HAS_JAVA8_INTRINSICS) new Java8MPSC[A](queue) - else new Java7[A](queue, ct) + new Java8MPSC[A](queue) case ChannelType.SPMC => - if (UnsafeAccess.HAS_JAVA8_INTRINSICS) new Java8SPMC[A](queue) - else new Java7[A](queue, ct) + new Java8SPMC[A](queue) case ChannelType.SPSC => - if (UnsafeAccess.HAS_JAVA8_INTRINSICS) new Java8SPSC[A](queue) - else new Java7[A](queue, ct) + new Java8SPSC[A](queue) } private final class MPMC[A](queue: MessagePassingQueue[A]) extends FromMessagePassingQueue[A](queue) { @@ -98,22 +95,4 @@ private[internal] object FromMessagePassingQueue { def fenceOffer(): Unit = UNSAFE.fullFence() def fencePoll(): Unit = UNSAFE.fullFence() } - - private final class Java7[A](queue: MessagePassingQueue[A], ct: ChannelType) - extends FromMessagePassingQueue[A](queue) { - - def fenceOffer(): Unit = - if (ct.producerType == SingleProducer) { - raise() - } - - def fencePoll(): Unit = - if (ct.consumerType == SingleConsumer) { - raise() - } - - private def raise(): Unit = { - throw new IllegalAccessException("Unsafe.fullFence not supported on this platform! (please report bug)") - } - } } diff --git a/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/LowLevelConcurrentQueueBuilders.scala b/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/LowLevelConcurrentQueueBuilders.scala index a3de27783..94218bb2b 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/LowLevelConcurrentQueueBuilders.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/internal/collection/queues/LowLevelConcurrentQueueBuilders.scala @@ -18,8 +18,8 @@ package monix.execution.internal.collection.queues import java.util.concurrent.ConcurrentLinkedQueue -import monix.execution.{BufferCapacity, ChannelType} -import monix.execution.ChannelType.{MPMC, MPSC, SPMC, SPSC} +import monix.execution.{ BufferCapacity, ChannelType } +import monix.execution.ChannelType.{ MPMC, MPSC, SPMC, SPSC } import monix.execution.internal.Platform import monix.execution.internal.atomic.UnsafeAccess import monix.execution.internal.collection.LowLevelConcurrentQueue @@ -41,8 +41,7 @@ private[internal] trait LowLevelConcurrentQueueBuilders { */ private def bounded[A](capacity: Int, ct: ChannelType, fenced: Boolean): LowLevelConcurrentQueue[A] = if (UnsafeAccess.IS_OPENJDK_COMPATIBLE) { - // Support for memory fences in Unsafe is only available in Java 8+ - if (UnsafeAccess.HAS_JAVA8_INTRINSICS || !fenced) + if (!fenced) ct match { case MPMC => FromCircularQueue[A](new MpmcArrayQueue[A](capacity), ct) case MPSC => FromCircularQueue[A](new MpscArrayQueue[A](capacity), ct) @@ -53,7 +52,7 @@ private[internal] trait LowLevelConcurrentQueueBuilders { // Without support for Unsafe.fullFence, falling back to a MPMC queue FromCircularQueue[A](new MpmcArrayQueue[A](capacity), ct) } - } else if (UnsafeAccess.HAS_JAVA8_INTRINSICS || !fenced) { + } else if (!fenced) { ct match { case MPMC => FromMessagePassingQueue[A](new MpmcAtomicArrayQueue[A](capacity), ct) case MPSC => FromMessagePassingQueue[A](new MpscAtomicArrayQueue[A](capacity), ct) @@ -72,8 +71,7 @@ private[internal] trait LowLevelConcurrentQueueBuilders { val chunk = chunkSize.getOrElse(Platform.recommendedBufferChunkSize) if (UnsafeAccess.IS_OPENJDK_COMPATIBLE) { - // Support for memory fences in Unsafe is only available in Java 8+ - if (UnsafeAccess.HAS_JAVA8_INTRINSICS || !fenced) { + if (!fenced) { ct match { case MPSC => FromMessagePassingQueue[A](new MpscUnboundedArrayQueue(chunk), ct) case SPSC => FromMessagePassingQueue[A](new SpscUnboundedArrayQueue(chunk), ct) @@ -83,7 +81,7 @@ private[internal] trait LowLevelConcurrentQueueBuilders { // Without support for Unsafe.fullFence, falling back to a MPMC queue new FromJavaQueue[A](new ConcurrentLinkedQueue[A]()) } - } else if (UnsafeAccess.HAS_JAVA8_INTRINSICS || !fenced) { + } else if (!fenced) { ct match { case MPSC => FromMessagePassingQueue[A](new MpscUnboundedAtomicArrayQueue(chunk), ct) case SPSC => FromMessagePassingQueue[A](new SpscUnboundedAtomicArrayQueue(chunk), ct) From e729d2b87a3301e88fc7de2507ad4d8144a66e7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Kozak?= Date: Fri, 27 Feb 2026 14:11:26 +0100 Subject: [PATCH 2/5] chore: add Mima filters for `avs` changes --- build.sbt | 3 ++- project/MimaFilters.scala | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index ab1241bd5..4b40b98db 100644 --- a/build.sbt +++ b/build.sbt @@ -376,7 +376,8 @@ def mimaSettings(projectName: String) = Seq( mimaBinaryIssueFilters ++= MimaFilters.changesFor_3_0_1, mimaBinaryIssueFilters ++= MimaFilters.changesFor_3_2_0, mimaBinaryIssueFilters ++= MimaFilters.changesFor_3_3_0, - mimaBinaryIssueFilters ++= MimaFilters.changesFor_3_4_0 + mimaBinaryIssueFilters ++= MimaFilters.changesFor_3_4_0, + mimaBinaryIssueFilters ++= MimaFilters.changesFor_avs ) lazy val doctestTestSettings = Seq( diff --git a/project/MimaFilters.scala b/project/MimaFilters.scala index 491aa12a2..9ca0d9985 100644 --- a/project/MimaFilters.scala +++ b/project/MimaFilters.scala @@ -100,4 +100,14 @@ object MimaFilters { // Scala 3 / Dotty support exclude[MissingClassProblem]("monix.execution.schedulers.AdaptedThreadPoolExecutorMixin") ) + + lazy val changesFor_avs = Seq( + // TrampolineExecutionContext signature tweaks (internal API) + exclude[IncompatibleMethTypeProblem]( + "monix.execution.schedulers.TrampolineExecutionContext#JVMNormalTrampoline.startLoop" + ), + exclude[IncompatibleMethTypeProblem]( + "monix.execution.schedulers.TrampolineExecutionContext#JVMOptimalTrampoline.startLoop" + ) + ) } From ac6619dfd6fdd092a1ba88b545ba7b202e07f070 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Kozak?= Date: Fri, 27 Feb 2026 15:32:54 +0100 Subject: [PATCH 3/5] chore: add Mima filters for Java 7 atomic utilities removal --- project/MimaFilters.scala | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/project/MimaFilters.scala b/project/MimaFilters.scala index 9ca0d9985..5791c4eae 100644 --- a/project/MimaFilters.scala +++ b/project/MimaFilters.scala @@ -108,6 +108,16 @@ object MimaFilters { ), exclude[IncompatibleMethTypeProblem]( "monix.execution.schedulers.TrampolineExecutionContext#JVMOptimalTrampoline.startLoop" + ), + // drop JDK 7 support (internal API) + exclude[DirectMissingMethodProblem]( + "monix.execution.internal.atomic.Factory.newBoxedObject" + ), + exclude[DirectMissingMethodProblem]( + "monix.execution.internal.atomic.Factory.newBoxedInt" + ), + exclude[DirectMissingMethodProblem]( + "monix.execution.internal.atomic.Factory.newBoxedLong" ) ) } From 6b0149b826d2483d0d92d57afe00c1d7331cc80d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Kozak?= Date: Fri, 27 Feb 2026 15:35:43 +0100 Subject: [PATCH 4/5] chore: update Mima filters for `avs` changes --- project/MimaFilters.scala | 1 + 1 file changed, 1 insertion(+) diff --git a/project/MimaFilters.scala b/project/MimaFilters.scala index 5791c4eae..adb09c862 100644 --- a/project/MimaFilters.scala +++ b/project/MimaFilters.scala @@ -109,6 +109,7 @@ object MimaFilters { exclude[IncompatibleMethTypeProblem]( "monix.execution.schedulers.TrampolineExecutionContext#JVMOptimalTrampoline.startLoop" ), + exclude[IncompatibleMethTypeProblem]("monix.execution.schedulers.TrampolineExecutionContext.this"), // drop JDK 7 support (internal API) exclude[DirectMissingMethodProblem]( "monix.execution.internal.atomic.Factory.newBoxedObject" From 251b6395428123335ce21a6c03caf8895e49c137 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Kozak?= Date: Fri, 27 Feb 2026 16:09:24 +0100 Subject: [PATCH 5/5] Remove `allowPlatformIntrinsics` flag from atomic utilities --- .../execution/atomic/AtomicBuilder.scala | 91 +- .../monix/execution/atomic/Atomic.scala | 4 +- .../monix/execution/atomic/Atomic.scala | 2 +- .../execution/atomic/AtomicBuilder.scala | 53 +- .../monix/execution/atomic/Atomic.scala | 4 +- .../monix/execution/atomic/Atomic.scala | 4 +- .../atomic/ConcurrentAtomicNumberSuite.scala | 275 +++--- .../atomic/ConcurrentAtomicSuite.scala | 309 +++---- .../execution/atomic/AtomicNumberSuite.scala | 606 ++++++------- .../execution/atomic/GenericAtomicSuite.scala | 847 +++++++++--------- project/MimaFilters.scala | 9 + 11 files changed, 1159 insertions(+), 1045 deletions(-) diff --git a/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicBuilder.scala b/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicBuilder.scala index efdbc90c3..4234531f2 100644 --- a/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicBuilder.scala +++ b/monix-execution/js/src/main/scala/monix/execution/atomic/AtomicBuilder.scala @@ -24,7 +24,10 @@ package monix.execution.atomic * driven by implicits. */ trait AtomicBuilder[A, R <: Atomic[A]] extends Serializable { - def buildInstance(initialValue: A, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean): R + @deprecated("Use buildInstance(initialValue, padding) instead", "3.4.0-avs6") + def buildInstance(initialValue: A, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean): R = + buildInstance(initialValue, padding) + def buildInstance(initialValue: A, strategy: PaddingStrategy): R def buildSafeInstance(initialValue: A, padding: PaddingStrategy): R } @@ -34,7 +37,11 @@ private[atomic] object Implicits { /** Provides an [[AtomicBuilder]] instance for [[AtomicAny]]. */ implicit def AtomicRefBuilder[A <: AnyRef]: AtomicBuilder[A, AtomicAny[A]] = new AtomicBuilder[A, AtomicAny[A]] { - def buildInstance(initialValue: A, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean) = + @deprecated("Use buildInstance(initialValue, strategy) instead", "3.4.0-avs6") + override def buildInstance(initialValue: A, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean) = + buildInstance(initialValue, padding) + + def buildInstance(initialValue: A, padding: PaddingStrategy) = AtomicAny(initialValue) def buildSafeInstance(initialValue: A, padding: PaddingStrategy) = @@ -46,7 +53,11 @@ private[atomic] object Implicits { /** Provides an [[AtomicBuilder]] instance for [[AtomicNumberAny]]. */ implicit def AtomicNumberBuilder[A <: AnyRef: Numeric]: AtomicBuilder[A, AtomicNumberAny[A]] = new AtomicBuilder[A, AtomicNumberAny[A]] { - def buildInstance(initialValue: A, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean) = + @deprecated("Use buildInstance(initialValue, padding) instead", "3.4.0-avs6") + override def buildInstance(initialValue: A, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean) = + buildInstance(initialValue, padding) + + def buildInstance(initialValue: A, padding: PaddingStrategy) = AtomicNumberAny(initialValue) def buildSafeInstance(initialValue: A, padding: PaddingStrategy) = @@ -59,7 +70,15 @@ object AtomicBuilder extends Implicits.Level2 { /** Provides an [[AtomicBuilder]] instance for [[AtomicInt]]. */ implicit val AtomicIntBuilder: AtomicBuilder[Int, AtomicInt] = new AtomicBuilder[Int, AtomicInt] { - def buildInstance(initialValue: Int, strategy: PaddingStrategy, allowPlatformIntrinsics: Boolean) = + @deprecated("Use buildInstance(initialValue, strategy) instead", "3.4.0-avs6") + override def buildInstance( + initialValue: Int, + strategy: PaddingStrategy, + allowPlatformIntrinsics: Boolean + ): AtomicInt = + buildInstance(initialValue, strategy) + + def buildInstance(initialValue: Int, strategy: PaddingStrategy) = AtomicInt(initialValue) def buildSafeInstance(initialValue: Int, strategy: PaddingStrategy) = AtomicInt(initialValue) @@ -68,7 +87,15 @@ object AtomicBuilder extends Implicits.Level2 { /** Provides an [[AtomicBuilder]] instance for [[AtomicLong]]. */ implicit val AtomicLongBuilder: AtomicBuilder[Long, AtomicLong] = new AtomicBuilder[Long, AtomicLong] { - def buildInstance(initialValue: Long, strategy: PaddingStrategy, allowPlatformIntrinsics: Boolean) = + @deprecated("Use buildInstance(initialValue, strategy) instead", "3.4.0-avs6") + override def buildInstance( + initialValue: Long, + strategy: PaddingStrategy, + allowPlatformIntrinsics: Boolean + ): AtomicLong = + buildInstance(initialValue, strategy) + + def buildInstance(initialValue: Long, strategy: PaddingStrategy) = AtomicLong(initialValue) def buildSafeInstance(initialValue: Long, strategy: PaddingStrategy) = AtomicLong(initialValue) @@ -77,7 +104,10 @@ object AtomicBuilder extends Implicits.Level2 { /** Provides an [[AtomicBuilder]] instance for [[AtomicBoolean]]. */ implicit val AtomicBooleanBuilder: AtomicBuilder[Boolean, AtomicBoolean] = new AtomicBuilder[Boolean, AtomicBoolean] { - def buildInstance(initialValue: Boolean, strategy: PaddingStrategy, allowPlatformIntrinsics: Boolean) = + @deprecated("Use buildInstance(initialValue, strategy) instead", "3.4.0-avs6") + override def buildInstance(initialValue: Boolean, strategy: PaddingStrategy, allowPlatformIntrinsics: Boolean) = + buildInstance(initialValue, strategy) + def buildInstance(initialValue: Boolean, strategy: PaddingStrategy) = AtomicBoolean(initialValue) def buildSafeInstance(initialValue: Boolean, strategy: PaddingStrategy) = AtomicBoolean(initialValue) @@ -86,7 +116,15 @@ object AtomicBuilder extends Implicits.Level2 { /** Provides an [[AtomicBuilder]] instance for [[AtomicByte]]. */ implicit val AtomicByteBuilder: AtomicBuilder[Byte, AtomicByte] = new AtomicBuilder[Byte, AtomicByte] { - def buildInstance(initialValue: Byte, strategy: PaddingStrategy, allowPlatformIntrinsics: Boolean): AtomicByte = + @deprecated("Use buildInstance(initialValue, strategy) instead", "3.4.0-avs6") + override def buildInstance( + initialValue: Byte, + strategy: PaddingStrategy, + allowPlatformIntrinsics: Boolean + ): AtomicByte = + buildInstance(initialValue, strategy) + + def buildInstance(initialValue: Byte, strategy: PaddingStrategy): AtomicByte = AtomicByte(initialValue) def buildSafeInstance(initialValue: Byte, strategy: PaddingStrategy): AtomicByte = AtomicByte(initialValue) @@ -95,7 +133,15 @@ object AtomicBuilder extends Implicits.Level2 { /** Provides an [[AtomicBuilder]] instance for [[AtomicChar]]. */ implicit val AtomicCharBuilder: AtomicBuilder[Char, AtomicChar] = new AtomicBuilder[Char, AtomicChar] { - def buildInstance(initialValue: Char, strategy: PaddingStrategy, allowPlatformIntrinsics: Boolean): AtomicChar = + @deprecated("Use buildInstance(initialValue, strategy) instead", "3.4.0-avs6") + override def buildInstance( + initialValue: Char, + strategy: PaddingStrategy, + allowPlatformIntrinsics: Boolean + ): AtomicChar = + buildInstance(initialValue, strategy) + + def buildInstance(initialValue: Char, strategy: PaddingStrategy): AtomicChar = AtomicChar(initialValue) def buildSafeInstance(initialValue: Char, strategy: PaddingStrategy): AtomicChar = AtomicChar(initialValue) @@ -104,7 +150,15 @@ object AtomicBuilder extends Implicits.Level2 { /** Provides an [[AtomicBuilder]] instance for [[AtomicShort]]. */ implicit val AtomicShortBuilder: AtomicBuilder[Short, AtomicShort] = new AtomicBuilder[Short, AtomicShort] { - def buildInstance(initialValue: Short, strategy: PaddingStrategy, allowPlatformIntrinsics: Boolean): AtomicShort = + @deprecated("Use buildInstance(initialValue, strategy) instead", "3.4.0-avs6") + override def buildInstance( + initialValue: Short, + strategy: PaddingStrategy, + allowPlatformIntrinsics: Boolean + ): AtomicShort = + buildInstance(initialValue, strategy) + + def buildInstance(initialValue: Short, strategy: PaddingStrategy): AtomicShort = AtomicShort(initialValue) def buildSafeInstance(initialValue: Short, strategy: PaddingStrategy): AtomicShort = AtomicShort(initialValue) @@ -113,7 +167,15 @@ object AtomicBuilder extends Implicits.Level2 { /** Provides an [[AtomicBuilder]] instance for [[AtomicFloat]]. */ implicit val AtomicFloatBuilder: AtomicBuilder[Float, AtomicFloat] = new AtomicBuilder[Float, AtomicFloat] { - def buildInstance(initialValue: Float, strategy: PaddingStrategy, allowPlatformIntrinsics: Boolean): AtomicFloat = + @deprecated("Use buildInstance(initialValue, strategy) instead", "3.4.0-avs6") + override def buildInstance( + initialValue: Float, + strategy: PaddingStrategy, + allowPlatformIntrinsics: Boolean + ): AtomicFloat = + buildInstance(initialValue, strategy) + + def buildInstance(initialValue: Float, strategy: PaddingStrategy): AtomicFloat = AtomicFloat(initialValue) def buildSafeInstance(initialValue: Float, strategy: PaddingStrategy): AtomicFloat = AtomicFloat(initialValue) @@ -122,10 +184,15 @@ object AtomicBuilder extends Implicits.Level2 { /** Provides an [[AtomicBuilder]] instance for [[AtomicDouble]]. */ implicit val AtomicDoubleBuilder: AtomicBuilder[Double, AtomicDouble] = new AtomicBuilder[Double, AtomicDouble] { - def buildInstance( + @deprecated("Use buildInstance(initialValue, strategy) instead", "3.4.0-avs6") + override def buildInstance( initialValue: Double, strategy: PaddingStrategy, - allowPlatformIntrinsics: Boolean): AtomicDouble = + allowPlatformIntrinsics: Boolean + ): AtomicDouble = + buildInstance(initialValue, strategy) + + def buildInstance(initialValue: Double, strategy: PaddingStrategy): AtomicDouble = AtomicDouble(initialValue) def buildSafeInstance(initialValue: Double, strategy: PaddingStrategy): AtomicDouble = AtomicDouble(initialValue) diff --git a/monix-execution/js/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala b/monix-execution/js/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala index c34947934..b65b43ad4 100644 --- a/monix-execution/js/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala +++ b/monix-execution/js/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala @@ -312,7 +312,7 @@ object Atomic { builder: c.Expr[AtomicBuilder[A, R]]): c.Expr[R] = { val expr = reify { - builder.splice.buildInstance(initialValue.splice, NoPadding, allowPlatformIntrinsics = true) + builder.splice.buildInstance(initialValue.splice, NoPadding) } inlineAndReset[R](expr.tree) @@ -323,7 +323,7 @@ object Atomic { padding: c.Expr[PaddingStrategy])(builder: c.Expr[AtomicBuilder[A, R]]): c.Expr[R] = { val expr = reify { - builder.splice.buildInstance(initialValue.splice, padding.splice, allowPlatformIntrinsics = true) + builder.splice.buildInstance(initialValue.splice, padding.splice) } inlineAndReset[R](expr.tree) diff --git a/monix-execution/js/src/main/scala_3.0/monix/execution/atomic/Atomic.scala b/monix-execution/js/src/main/scala_3.0/monix/execution/atomic/Atomic.scala index cb52952f8..951f53730 100644 --- a/monix-execution/js/src/main/scala_3.0/monix/execution/atomic/Atomic.scala +++ b/monix-execution/js/src/main/scala_3.0/monix/execution/atomic/Atomic.scala @@ -152,7 +152,7 @@ object Atomic { * best reference possible, based on our `initialValue` */ inline def apply[A, R <: Atomic[A]](initialValue: A)(implicit builder: AtomicBuilder[A, R]): R = - builder.buildInstance(initialValue, PaddingStrategy.NoPadding, allowPlatformIntrinsics = true) + builder.buildInstance(initialValue, PaddingStrategy.NoPadding) /** Constructs an `Atomic[A]` reference, applying the provided * [[PaddingStrategy]] in order to counter the "false sharing" diff --git a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicBuilder.scala b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicBuilder.scala index 9d126db29..6ba1b0f29 100644 --- a/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicBuilder.scala +++ b/monix-execution/jvm/src/main/scala/monix/execution/atomic/AtomicBuilder.scala @@ -24,7 +24,10 @@ package monix.execution.atomic * driven by implicits. */ trait AtomicBuilder[A, R <: Atomic[A]] extends Serializable { - def buildInstance(initialValue: A, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean): R + @deprecated("Use buildInstance(initialValue, padding) instead", "3.4.0-avs6") + def buildInstance(initialValue: A, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean): R = + buildInstance(initialValue, padding) + def buildInstance(initialValue: A, padding: PaddingStrategy): R def buildSafeInstance(initialValue: A, padding: PaddingStrategy): R } @@ -35,7 +38,7 @@ private[atomic] object Implicits { implicit def AtomicRefBuilder[A <: AnyRef]: AtomicBuilder[A, AtomicAny[A]] = new AtomicBuilder[A, AtomicAny[A]] { @deprecated("Use buildInstance(initialValue, padding) instead", "3.4.0-avs6") - def buildInstance(initialValue: A, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean) = + override def buildInstance(initialValue: A, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean) = buildInstance(initialValue, padding) def buildInstance(initialValue: A, padding: PaddingStrategy) = @@ -51,7 +54,7 @@ private[atomic] object Implicits { implicit def AtomicNumberBuilder[A <: AnyRef: Numeric]: AtomicBuilder[A, AtomicNumberAny[A]] = new AtomicBuilder[A, AtomicNumberAny[A]] { @deprecated("Use buildInstance(initialValue, padding) instead", "3.4.0-avs6") - def buildInstance(initialValue: A, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean) = + override def buildInstance(initialValue: A, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean) = buildInstance(initialValue, padding) def buildInstance(initialValue: A, padding: PaddingStrategy) = @@ -67,7 +70,11 @@ object AtomicBuilder extends Implicits.Level2 { /** Provides an [[AtomicBuilder]] instance for [[AtomicInt]]. */ implicit object AtomicIntBuilder extends AtomicBuilder[Int, AtomicInt] { @deprecated("Use buildInstance(initialValue, padding) instead", "3.4.0-avs6") - def buildInstance(initialValue: Int, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean): AtomicInt = + override def buildInstance( + initialValue: Int, + padding: PaddingStrategy, + allowPlatformIntrinsics: Boolean + ): AtomicInt = buildInstance(initialValue, padding) def buildInstance(initialValue: Int, padding: PaddingStrategy): AtomicInt = AtomicInt.create(initialValue, padding) @@ -79,7 +86,11 @@ object AtomicBuilder extends Implicits.Level2 { /** Provides an [[AtomicBuilder]] instance for [[AtomicLong]]. */ implicit object AtomicLongBuilder extends AtomicBuilder[Long, AtomicLong] { @deprecated("Use buildInstance(initialValue, padding) instead", "3.4.0-avs6") - def buildInstance(initialValue: Long, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean): AtomicLong = + override def buildInstance( + initialValue: Long, + padding: PaddingStrategy, + allowPlatformIntrinsics: Boolean + ): AtomicLong = buildInstance(initialValue, padding) def buildInstance(initialValue: Long, padding: PaddingStrategy): AtomicLong = @@ -91,7 +102,7 @@ object AtomicBuilder extends Implicits.Level2 { /** Provides an [[AtomicBuilder]] instance for [[AtomicBoolean]]. */ implicit object AtomicBooleanBuilder extends AtomicBuilder[Boolean, AtomicBoolean] { @deprecated("Use buildInstance(initialValue, padding) instead", "3.4.0-avs6") - def buildInstance(initialValue: Boolean, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean) = + override def buildInstance(initialValue: Boolean, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean) = buildInstance(initialValue, padding) def buildInstance(initialValue: Boolean, padding: PaddingStrategy) = AtomicBoolean.create(initialValue, padding) @@ -103,7 +114,11 @@ object AtomicBuilder extends Implicits.Level2 { /** Provides an [[AtomicBuilder]] instance for [[AtomicByte]]. */ implicit object AtomicByteBuilder extends AtomicBuilder[Byte, AtomicByte] { @deprecated("Use buildInstance(initialValue, padding) instead", "3.4.0-avs6") - def buildInstance(initialValue: Byte, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean): AtomicByte = + override def buildInstance( + initialValue: Byte, + padding: PaddingStrategy, + allowPlatformIntrinsics: Boolean + ): AtomicByte = buildInstance(initialValue, padding) def buildInstance(initialValue: Byte, padding: PaddingStrategy): AtomicByte = @@ -116,7 +131,11 @@ object AtomicBuilder extends Implicits.Level2 { /** Provides an [[AtomicBuilder]] instance for [[AtomicChar]]. */ implicit object AtomicCharBuilder extends AtomicBuilder[Char, AtomicChar] { @deprecated("Use buildInstance(initialValue, padding) instead", "3.4.0-avs6") - def buildInstance(initialValue: Char, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean): AtomicChar = + override def buildInstance( + initialValue: Char, + padding: PaddingStrategy, + allowPlatformIntrinsics: Boolean + ): AtomicChar = buildInstance(initialValue, padding) def buildInstance(initialValue: Char, padding: PaddingStrategy): AtomicChar = @@ -129,7 +148,11 @@ object AtomicBuilder extends Implicits.Level2 { /** Provides an [[AtomicBuilder]] instance for [[AtomicShort]]. */ implicit object AtomicShortBuilder extends AtomicBuilder[Short, AtomicShort] { @deprecated("Use buildInstance(initialValue, padding) instead", "3.4.0-avs6") - def buildInstance(initialValue: Short, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean): AtomicShort = + override def buildInstance( + initialValue: Short, + padding: PaddingStrategy, + allowPlatformIntrinsics: Boolean + ): AtomicShort = buildInstance(initialValue, padding) def buildInstance(initialValue: Short, padding: PaddingStrategy): AtomicShort = @@ -142,7 +165,11 @@ object AtomicBuilder extends Implicits.Level2 { /** Provides an [[AtomicBuilder]] instance for [[AtomicFloat]]. */ implicit object AtomicFloatBuilder extends AtomicBuilder[Float, AtomicFloat] { @deprecated("Use buildInstance(initialValue, padding) instead", "3.4.0-avs6") - def buildInstance(initialValue: Float, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean): AtomicFloat = + override def buildInstance( + initialValue: Float, + padding: PaddingStrategy, + allowPlatformIntrinsics: Boolean + ): AtomicFloat = buildInstance(initialValue, padding) def buildInstance(initialValue: Float, padding: PaddingStrategy): AtomicFloat = @@ -155,7 +182,11 @@ object AtomicBuilder extends Implicits.Level2 { /** Provides an [[AtomicBuilder]] instance for [[AtomicDouble]]. */ implicit object AtomicDoubleBuilder extends AtomicBuilder[Double, AtomicDouble] { @deprecated("Use buildInstance(initialValue, padding) instead", "3.4.0-avs6") - def buildInstance(initialValue: Double, padding: PaddingStrategy, allowPlatformIntrinsics: Boolean): AtomicDouble = + override def buildInstance( + initialValue: Double, + padding: PaddingStrategy, + allowPlatformIntrinsics: Boolean + ): AtomicDouble = buildInstance(initialValue, padding) def buildInstance(initialValue: Double, padding: PaddingStrategy): AtomicDouble = diff --git a/monix-execution/jvm/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala b/monix-execution/jvm/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala index 62a3a07d7..c44535e62 100644 --- a/monix-execution/jvm/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala +++ b/monix-execution/jvm/src/main/scala_3.0-/monix/execution/atomic/Atomic.scala @@ -359,7 +359,7 @@ object Atomic { builder: c.Expr[AtomicBuilder[A, R]]): c.Expr[R] = { val expr = reify { - builder.splice.buildInstance(initialValue.splice, NoPadding, allowPlatformIntrinsics = true) + builder.splice.buildInstance(initialValue.splice, NoPadding) } inlineAndReset[R](expr.tree) @@ -370,7 +370,7 @@ object Atomic { padding: c.Expr[PaddingStrategy])(builder: c.Expr[AtomicBuilder[A, R]]): c.Expr[R] = { val expr = reify { - builder.splice.buildInstance(initialValue.splice, padding.splice, allowPlatformIntrinsics = true) + builder.splice.buildInstance(initialValue.splice, padding.splice) } inlineAndReset[R](expr.tree) diff --git a/monix-execution/jvm/src/main/scala_3.0/monix/execution/atomic/Atomic.scala b/monix-execution/jvm/src/main/scala_3.0/monix/execution/atomic/Atomic.scala index 203f78ca4..5a624c563 100644 --- a/monix-execution/jvm/src/main/scala_3.0/monix/execution/atomic/Atomic.scala +++ b/monix-execution/jvm/src/main/scala_3.0/monix/execution/atomic/Atomic.scala @@ -182,7 +182,7 @@ object Atomic { * best reference possible, based on our `initialValue` */ inline def apply[A, R <: Atomic[A]](initialValue: A)(implicit builder: AtomicBuilder[A, R]): R = - builder.buildInstance(initialValue, PaddingStrategy.NoPadding, allowPlatformIntrinsics = true) + builder.buildInstance(initialValue, PaddingStrategy.NoPadding) /** Constructs an `Atomic[A]` reference, applying the provided * [[PaddingStrategy]] in order to counter the "false sharing" @@ -210,7 +210,7 @@ object Atomic { */ inline def withPadding[A, R <: Atomic[A]](initialValue: A, padding: PaddingStrategy)( implicit builder: AtomicBuilder[A, R]): R = - builder.buildInstance(initialValue, padding, allowPlatformIntrinsics = true) + builder.buildInstance(initialValue, padding) /** Returns the builder that would be chosen to construct Atomic * references for the given `initialValue`. diff --git a/monix-execution/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicNumberSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicNumberSuite.scala index 0129a6822..1cbb611e4 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicNumberSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicNumberSuite.scala @@ -19,7 +19,7 @@ package monix.execution.atomic import minitest.SimpleTestSuite import monix.execution.atomic.PaddingStrategy._ -import scala.concurrent.{Await, Future} +import scala.concurrent.{ Await, Future } import scala.concurrent.duration._ import scala.concurrent.ExecutionContext.Implicits.global @@ -30,19 +30,20 @@ abstract class ConcurrentAtomicNumberSuite[A, R <: AtomicNumber[A]]( nan1: Option[A], maxValue: A, minValue: A, - allowPlatformIntrinsics: Boolean)(implicit ev: Numeric[A]) +)(implicit ev: Numeric[A]) extends SimpleTestSuite { - def Atomic(initial: A): R = builder.buildInstance(initial, strategy, allowPlatformIntrinsics) + def Atomic(initial: A): R = builder.buildInstance(initial, strategy) val two = ev.plus(ev.one, ev.one) test("should perform concurrent compareAndSet") { val r = Atomic(ev.zero) - val futures = for (i <- 0 until 5) yield Future { - for (j <- 0 until 100) - r.increment() - } + val futures = + for (i <- 0 until 5) yield Future { + for (j <- 0 until 100) + r.increment() + } val f = Future.sequence(futures) Await.result(f, 30.seconds) @@ -51,10 +52,11 @@ abstract class ConcurrentAtomicNumberSuite[A, R <: AtomicNumber[A]]( test("should perform concurrent getAndSet") { val r = Atomic(ev.zero) - val futures = for (i <- 0 until 5) yield Future { - for (j <- 0 until 100) - r.getAndSet(ev.fromInt(j + 1)) - } + val futures = + for (i <- 0 until 5) yield Future { + for (j <- 0 until 100) + r.getAndSet(ev.fromInt(j + 1)) + } val f = Future.sequence(futures) Await.result(f, 30.seconds) @@ -63,10 +65,11 @@ abstract class ConcurrentAtomicNumberSuite[A, R <: AtomicNumber[A]]( test("should perform concurrent increment") { val r = Atomic(ev.zero) - val futures = for (i <- 0 until 5) yield Future { - for (j <- 0 until 100) - r.increment() - } + val futures = + for (i <- 0 until 5) yield Future { + for (j <- 0 until 100) + r.increment() + } val f = Future.sequence(futures) Await.result(f, 30.seconds) @@ -75,10 +78,11 @@ abstract class ConcurrentAtomicNumberSuite[A, R <: AtomicNumber[A]]( test("should perform concurrent incrementAndGet") { val r = Atomic(ev.zero) - val futures = for (i <- 0 until 5) yield Future { - for (j <- 0 until 100) - r.incrementAndGet() - } + val futures = + for (i <- 0 until 5) yield Future { + for (j <- 0 until 100) + r.incrementAndGet() + } val f = Future.sequence(futures) Await.result(f, 30.seconds) @@ -87,10 +91,11 @@ abstract class ConcurrentAtomicNumberSuite[A, R <: AtomicNumber[A]]( test("should perform concurrent getAndIncrement") { val r = Atomic(ev.zero) - val futures = for (i <- 0 until 5) yield Future { - for (j <- 0 until 100) - r.getAndIncrement() - } + val futures = + for (i <- 0 until 5) yield Future { + for (j <- 0 until 100) + r.getAndIncrement() + } val f = Future.sequence(futures) Await.result(f, 30.seconds) @@ -108,7 +113,7 @@ object ConcurrentAtomicNumberDoubleNoPaddingSuite Some(Double.NaN), Double.MaxValue, Double.MinValue, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicNumberFloatNoPaddingSuite extends ConcurrentAtomicNumberSuite[Float, AtomicFloat]( @@ -118,7 +123,7 @@ object ConcurrentAtomicNumberFloatNoPaddingSuite Some(Float.NaN), Float.MaxValue, Float.MinValue, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicNumberLongNoPaddingSuite extends ConcurrentAtomicNumberSuite[Long, AtomicLong]( @@ -128,7 +133,7 @@ object ConcurrentAtomicNumberLongNoPaddingSuite None, Long.MaxValue, Long.MinValue, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicNumberIntNoPaddingSuite extends ConcurrentAtomicNumberSuite[Int, AtomicInt]( @@ -138,7 +143,7 @@ object ConcurrentAtomicNumberIntNoPaddingSuite None, Int.MaxValue, Int.MinValue, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicNumberShortNoPaddingSuite extends ConcurrentAtomicNumberSuite[Short, AtomicShort]( @@ -148,7 +153,7 @@ object ConcurrentAtomicNumberShortNoPaddingSuite None, Short.MaxValue, Short.MinValue, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicNumberByteNoPaddingSuite extends ConcurrentAtomicNumberSuite[Byte, AtomicByte]( @@ -158,7 +163,7 @@ object ConcurrentAtomicNumberByteNoPaddingSuite None, Byte.MaxValue, Byte.MinValue, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicNumberCharNoPaddingSuite extends ConcurrentAtomicNumberSuite[Char, AtomicChar]( @@ -168,7 +173,7 @@ object ConcurrentAtomicNumberCharNoPaddingSuite None, Char.MaxValue, Char.MinValue, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicNumberNumberAnyNoPaddingSuite extends ConcurrentAtomicNumberSuite[BigInt, AtomicNumberAny[BigInt]]( @@ -178,7 +183,7 @@ object ConcurrentAtomicNumberNumberAnyNoPaddingSuite None, BigInt(Long.MaxValue), BigInt(Long.MinValue), - allowPlatformIntrinsics = true) + ) //--Left64 (Java 8) @@ -190,7 +195,7 @@ object ConcurrentAtomicNumberDoubleLeft64Suite Some(Double.NaN), Double.MaxValue, Double.MinValue, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicNumberFloatLeft64Suite extends ConcurrentAtomicNumberSuite[Float, AtomicFloat]( @@ -200,7 +205,7 @@ object ConcurrentAtomicNumberFloatLeft64Suite Some(Float.NaN), Float.MaxValue, Float.MinValue, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicNumberLongLeft64Suite extends ConcurrentAtomicNumberSuite[Long, AtomicLong]( @@ -210,7 +215,7 @@ object ConcurrentAtomicNumberLongLeft64Suite None, Long.MaxValue, Long.MinValue, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicNumberIntLeft64Suite extends ConcurrentAtomicNumberSuite[Int, AtomicInt]( @@ -220,7 +225,7 @@ object ConcurrentAtomicNumberIntLeft64Suite None, Int.MaxValue, Int.MinValue, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicNumberShortLeft64Suite extends ConcurrentAtomicNumberSuite[Short, AtomicShort]( @@ -230,7 +235,7 @@ object ConcurrentAtomicNumberShortLeft64Suite None, Short.MaxValue, Short.MinValue, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicNumberByteLeft64Suite extends ConcurrentAtomicNumberSuite[Byte, AtomicByte]( @@ -240,7 +245,7 @@ object ConcurrentAtomicNumberByteLeft64Suite None, Byte.MaxValue, Byte.MinValue, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicNumberCharLeft64Suite extends ConcurrentAtomicNumberSuite[Char, AtomicChar]( @@ -250,7 +255,7 @@ object ConcurrentAtomicNumberCharLeft64Suite None, Char.MaxValue, Char.MinValue, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicNumberNumberAnyLeft64Suite extends ConcurrentAtomicNumberSuite[BigInt, AtomicNumberAny[BigInt]]( @@ -260,7 +265,7 @@ object ConcurrentAtomicNumberNumberAnyLeft64Suite None, BigInt(Long.MaxValue), BigInt(Long.MinValue), - allowPlatformIntrinsics = true) + ) //-- Right64 (Java 8) @@ -272,7 +277,7 @@ object ConcurrentAtomicNumberDoubleRight64Suite Some(Double.NaN), Double.MaxValue, Double.MinValue, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicNumberFloatRight64Suite extends ConcurrentAtomicNumberSuite[Float, AtomicFloat]( @@ -282,7 +287,7 @@ object ConcurrentAtomicNumberFloatRight64Suite Some(Float.NaN), Float.MaxValue, Float.MinValue, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicNumberLongRight64Suite extends ConcurrentAtomicNumberSuite[Long, AtomicLong]( @@ -292,7 +297,7 @@ object ConcurrentAtomicNumberLongRight64Suite None, Long.MaxValue, Long.MinValue, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicNumberIntRight64Suite extends ConcurrentAtomicNumberSuite[Int, AtomicInt]( @@ -302,7 +307,7 @@ object ConcurrentAtomicNumberIntRight64Suite None, Int.MaxValue, Int.MinValue, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicNumberShortRight64Suite extends ConcurrentAtomicNumberSuite[Short, AtomicShort]( @@ -312,7 +317,7 @@ object ConcurrentAtomicNumberShortRight64Suite None, Short.MaxValue, Short.MinValue, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicNumberByteRight64Suite extends ConcurrentAtomicNumberSuite[Byte, AtomicByte]( @@ -322,7 +327,7 @@ object ConcurrentAtomicNumberByteRight64Suite None, Byte.MaxValue, Byte.MinValue, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicNumberCharRight64Suite extends ConcurrentAtomicNumberSuite[Char, AtomicChar]( @@ -332,7 +337,7 @@ object ConcurrentAtomicNumberCharRight64Suite None, Char.MaxValue, Char.MinValue, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicNumberNumberAnyRight64Suite extends ConcurrentAtomicNumberSuite[BigInt, AtomicNumberAny[BigInt]]( @@ -342,7 +347,7 @@ object ConcurrentAtomicNumberNumberAnyRight64Suite None, BigInt(Long.MaxValue), BigInt(Long.MinValue), - allowPlatformIntrinsics = true) + ) //-- LeftRight128 (Java 8) @@ -354,7 +359,7 @@ object ConcurrentAtomicNumberDoubleLeftRight128Suite Some(Double.NaN), Double.MaxValue, Double.MinValue, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicNumberFloatLeftRight128Suite extends ConcurrentAtomicNumberSuite[Float, AtomicFloat]( @@ -364,7 +369,7 @@ object ConcurrentAtomicNumberFloatLeftRight128Suite Some(Float.NaN), Float.MaxValue, Float.MinValue, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicNumberLongLeftRight128Suite extends ConcurrentAtomicNumberSuite[Long, AtomicLong]( @@ -374,7 +379,7 @@ object ConcurrentAtomicNumberLongLeftRight128Suite None, Long.MaxValue, Long.MinValue, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicNumberIntLeftRight128Suite extends ConcurrentAtomicNumberSuite[Int, AtomicInt]( @@ -384,7 +389,7 @@ object ConcurrentAtomicNumberIntLeftRight128Suite None, Int.MaxValue, Int.MinValue, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicNumberShortLeftRight128Suite extends ConcurrentAtomicNumberSuite[Short, AtomicShort]( @@ -394,7 +399,7 @@ object ConcurrentAtomicNumberShortLeftRight128Suite None, Short.MaxValue, Short.MinValue, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicNumberByteLeftRight128Suite extends ConcurrentAtomicNumberSuite[Byte, AtomicByte]( @@ -404,7 +409,7 @@ object ConcurrentAtomicNumberByteLeftRight128Suite None, Byte.MaxValue, Byte.MinValue, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicNumberCharLeftRight128Suite extends ConcurrentAtomicNumberSuite[Char, AtomicChar]( @@ -414,7 +419,7 @@ object ConcurrentAtomicNumberCharLeftRight128Suite None, Char.MaxValue, Char.MinValue, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicNumberNumberAnyLeftRight128Suite extends ConcurrentAtomicNumberSuite[BigInt, AtomicNumberAny[BigInt]]( @@ -424,7 +429,7 @@ object ConcurrentAtomicNumberNumberAnyLeftRight128Suite None, BigInt(Long.MaxValue), BigInt(Long.MinValue), - allowPlatformIntrinsics = true) + ) //--Left128 (Java 8) @@ -436,7 +441,7 @@ object ConcurrentAtomicNumberDoubleLeft128Suite Some(Double.NaN), Double.MaxValue, Double.MinValue, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicNumberFloatLeft128Suite extends ConcurrentAtomicNumberSuite[Float, AtomicFloat]( @@ -446,7 +451,7 @@ object ConcurrentAtomicNumberFloatLeft128Suite Some(Float.NaN), Float.MaxValue, Float.MinValue, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicNumberLongLeft128Suite extends ConcurrentAtomicNumberSuite[Long, AtomicLong]( @@ -456,7 +461,7 @@ object ConcurrentAtomicNumberLongLeft128Suite None, Long.MaxValue, Long.MinValue, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicNumberIntLeft128Suite extends ConcurrentAtomicNumberSuite[Int, AtomicInt]( @@ -466,7 +471,7 @@ object ConcurrentAtomicNumberIntLeft128Suite None, Int.MaxValue, Int.MinValue, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicNumberShortLeft128Suite extends ConcurrentAtomicNumberSuite[Short, AtomicShort]( @@ -476,7 +481,7 @@ object ConcurrentAtomicNumberShortLeft128Suite None, Short.MaxValue, Short.MinValue, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicNumberByteLeft128Suite extends ConcurrentAtomicNumberSuite[Byte, AtomicByte]( @@ -486,7 +491,7 @@ object ConcurrentAtomicNumberByteLeft128Suite None, Byte.MaxValue, Byte.MinValue, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicNumberCharLeft128Suite extends ConcurrentAtomicNumberSuite[Char, AtomicChar]( @@ -496,7 +501,7 @@ object ConcurrentAtomicNumberCharLeft128Suite None, Char.MaxValue, Char.MinValue, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicNumberNumberAnyLeft128Suite extends ConcurrentAtomicNumberSuite[BigInt, AtomicNumberAny[BigInt]]( @@ -506,7 +511,7 @@ object ConcurrentAtomicNumberNumberAnyLeft128Suite None, BigInt(Long.MaxValue), BigInt(Long.MinValue), - allowPlatformIntrinsics = true) + ) //-- Right128 (Java 8) @@ -518,7 +523,7 @@ object ConcurrentAtomicNumberDoubleRight128Suite Some(Double.NaN), Double.MaxValue, Double.MinValue, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicNumberFloatRight128Suite extends ConcurrentAtomicNumberSuite[Float, AtomicFloat]( @@ -528,7 +533,7 @@ object ConcurrentAtomicNumberFloatRight128Suite Some(Float.NaN), Float.MaxValue, Float.MinValue, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicNumberLongRight128Suite extends ConcurrentAtomicNumberSuite[Long, AtomicLong]( @@ -538,7 +543,7 @@ object ConcurrentAtomicNumberLongRight128Suite None, Long.MaxValue, Long.MinValue, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicNumberIntRight128Suite extends ConcurrentAtomicNumberSuite[Int, AtomicInt]( @@ -548,7 +553,7 @@ object ConcurrentAtomicNumberIntRight128Suite None, Int.MaxValue, Int.MinValue, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicNumberShortRight128Suite extends ConcurrentAtomicNumberSuite[Short, AtomicShort]( @@ -558,7 +563,7 @@ object ConcurrentAtomicNumberShortRight128Suite None, Short.MaxValue, Short.MinValue, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicNumberByteRight128Suite extends ConcurrentAtomicNumberSuite[Byte, AtomicByte]( @@ -568,7 +573,7 @@ object ConcurrentAtomicNumberByteRight128Suite None, Byte.MaxValue, Byte.MinValue, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicNumberCharRight128Suite extends ConcurrentAtomicNumberSuite[Char, AtomicChar]( @@ -578,7 +583,7 @@ object ConcurrentAtomicNumberCharRight128Suite None, Char.MaxValue, Char.MinValue, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicNumberNumberAnyRight128Suite extends ConcurrentAtomicNumberSuite[BigInt, AtomicNumberAny[BigInt]]( @@ -588,7 +593,7 @@ object ConcurrentAtomicNumberNumberAnyRight128Suite None, BigInt(Long.MaxValue), BigInt(Long.MinValue), - allowPlatformIntrinsics = true) + ) //-- LeftRight256 (Java 8) @@ -600,7 +605,7 @@ object ConcurrentAtomicNumberDoubleLeftRight256Suite Some(Double.NaN), Double.MaxValue, Double.MinValue, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicNumberFloatLeftRight256Suite extends ConcurrentAtomicNumberSuite[Float, AtomicFloat]( @@ -610,7 +615,7 @@ object ConcurrentAtomicNumberFloatLeftRight256Suite Some(Float.NaN), Float.MaxValue, Float.MinValue, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicNumberLongLeftRight256Suite extends ConcurrentAtomicNumberSuite[Long, AtomicLong]( @@ -620,7 +625,7 @@ object ConcurrentAtomicNumberLongLeftRight256Suite None, Long.MaxValue, Long.MinValue, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicNumberIntLeftRight256Suite extends ConcurrentAtomicNumberSuite[Int, AtomicInt]( @@ -630,7 +635,7 @@ object ConcurrentAtomicNumberIntLeftRight256Suite None, Int.MaxValue, Int.MinValue, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicNumberShortLeftRight256Suite extends ConcurrentAtomicNumberSuite[Short, AtomicShort]( @@ -640,7 +645,7 @@ object ConcurrentAtomicNumberShortLeftRight256Suite None, Short.MaxValue, Short.MinValue, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicNumberByteLeftRight256Suite extends ConcurrentAtomicNumberSuite[Byte, AtomicByte]( @@ -650,7 +655,7 @@ object ConcurrentAtomicNumberByteLeftRight256Suite None, Byte.MaxValue, Byte.MinValue, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicNumberCharLeftRight256Suite extends ConcurrentAtomicNumberSuite[Char, AtomicChar]( @@ -660,7 +665,7 @@ object ConcurrentAtomicNumberCharLeftRight256Suite None, Char.MaxValue, Char.MinValue, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicNumberNumberAnyLeftRight256Suite extends ConcurrentAtomicNumberSuite[BigInt, AtomicNumberAny[BigInt]]( @@ -670,7 +675,7 @@ object ConcurrentAtomicNumberNumberAnyLeftRight256Suite None, BigInt(Long.MaxValue), BigInt(Long.MinValue), - allowPlatformIntrinsics = true) + ) // ------------ Java 7 @@ -684,7 +689,7 @@ object ConcurrentAtomicNumberDoubleNoPaddingJava7Suite Some(Double.NaN), Double.MaxValue, Double.MinValue, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicNumberFloatNoPaddingJava7Suite extends ConcurrentAtomicNumberSuite[Float, AtomicFloat]( @@ -694,7 +699,7 @@ object ConcurrentAtomicNumberFloatNoPaddingJava7Suite Some(Float.NaN), Float.MaxValue, Float.MinValue, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicNumberLongNoPaddingJava7Suite extends ConcurrentAtomicNumberSuite[Long, AtomicLong]( @@ -704,7 +709,7 @@ object ConcurrentAtomicNumberLongNoPaddingJava7Suite None, Long.MaxValue, Long.MinValue, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicNumberIntNoPaddingJava7Suite extends ConcurrentAtomicNumberSuite[Int, AtomicInt]( @@ -714,7 +719,7 @@ object ConcurrentAtomicNumberIntNoPaddingJava7Suite None, Int.MaxValue, Int.MinValue, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicNumberShortNoPaddingJava7Suite extends ConcurrentAtomicNumberSuite[Short, AtomicShort]( @@ -724,7 +729,7 @@ object ConcurrentAtomicNumberShortNoPaddingJava7Suite None, Short.MaxValue, Short.MinValue, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicNumberByteNoPaddingJava7Suite extends ConcurrentAtomicNumberSuite[Byte, AtomicByte]( @@ -734,7 +739,7 @@ object ConcurrentAtomicNumberByteNoPaddingJava7Suite None, Byte.MaxValue, Byte.MinValue, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicNumberCharNoPaddingJava7Suite extends ConcurrentAtomicNumberSuite[Char, AtomicChar]( @@ -744,7 +749,7 @@ object ConcurrentAtomicNumberCharNoPaddingJava7Suite None, Char.MaxValue, Char.MinValue, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicNumberNumberAnyNoPaddingJava7Suite extends ConcurrentAtomicNumberSuite[BigInt, AtomicNumberAny[BigInt]]( @@ -754,7 +759,7 @@ object ConcurrentAtomicNumberNumberAnyNoPaddingJava7Suite None, BigInt(Long.MaxValue), BigInt(Long.MinValue), - allowPlatformIntrinsics = false) + ) //--Left64 (Java 7) @@ -766,7 +771,7 @@ object ConcurrentAtomicNumberDoubleLeft64Java7Suite Some(Double.NaN), Double.MaxValue, Double.MinValue, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicNumberFloatLeft64Java7Suite extends ConcurrentAtomicNumberSuite[Float, AtomicFloat]( @@ -776,7 +781,7 @@ object ConcurrentAtomicNumberFloatLeft64Java7Suite Some(Float.NaN), Float.MaxValue, Float.MinValue, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicNumberLongLeft64Java7Suite extends ConcurrentAtomicNumberSuite[Long, AtomicLong]( @@ -786,7 +791,7 @@ object ConcurrentAtomicNumberLongLeft64Java7Suite None, Long.MaxValue, Long.MinValue, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicNumberIntLeft64Java7Suite extends ConcurrentAtomicNumberSuite[Int, AtomicInt]( @@ -796,7 +801,7 @@ object ConcurrentAtomicNumberIntLeft64Java7Suite None, Int.MaxValue, Int.MinValue, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicNumberShortLeft64Java7Suite extends ConcurrentAtomicNumberSuite[Short, AtomicShort]( @@ -806,7 +811,7 @@ object ConcurrentAtomicNumberShortLeft64Java7Suite None, Short.MaxValue, Short.MinValue, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicNumberByteLeft64Java7Suite extends ConcurrentAtomicNumberSuite[Byte, AtomicByte]( @@ -816,7 +821,7 @@ object ConcurrentAtomicNumberByteLeft64Java7Suite None, Byte.MaxValue, Byte.MinValue, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicNumberCharLeft64Java7Suite extends ConcurrentAtomicNumberSuite[Char, AtomicChar]( @@ -826,7 +831,7 @@ object ConcurrentAtomicNumberCharLeft64Java7Suite None, Char.MaxValue, Char.MinValue, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicNumberNumberAnyLeft64Java7Suite extends ConcurrentAtomicNumberSuite[BigInt, AtomicNumberAny[BigInt]]( @@ -836,7 +841,7 @@ object ConcurrentAtomicNumberNumberAnyLeft64Java7Suite None, BigInt(Long.MaxValue), BigInt(Long.MinValue), - allowPlatformIntrinsics = false) + ) //-- Right64 (Java 7) @@ -848,7 +853,7 @@ object ConcurrentAtomicNumberDoubleRight64Java7Suite Some(Double.NaN), Double.MaxValue, Double.MinValue, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicNumberFloatRight64Java7Suite extends ConcurrentAtomicNumberSuite[Float, AtomicFloat]( @@ -858,7 +863,7 @@ object ConcurrentAtomicNumberFloatRight64Java7Suite Some(Float.NaN), Float.MaxValue, Float.MinValue, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicNumberLongRight64Java7Suite extends ConcurrentAtomicNumberSuite[Long, AtomicLong]( @@ -868,7 +873,7 @@ object ConcurrentAtomicNumberLongRight64Java7Suite None, Long.MaxValue, Long.MinValue, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicNumberIntRight64Java7Suite extends ConcurrentAtomicNumberSuite[Int, AtomicInt]( @@ -878,7 +883,7 @@ object ConcurrentAtomicNumberIntRight64Java7Suite None, Int.MaxValue, Int.MinValue, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicNumberShortRight64Java7Suite extends ConcurrentAtomicNumberSuite[Short, AtomicShort]( @@ -888,7 +893,7 @@ object ConcurrentAtomicNumberShortRight64Java7Suite None, Short.MaxValue, Short.MinValue, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicNumberByteRight64Java7Suite extends ConcurrentAtomicNumberSuite[Byte, AtomicByte]( @@ -898,7 +903,7 @@ object ConcurrentAtomicNumberByteRight64Java7Suite None, Byte.MaxValue, Byte.MinValue, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicNumberCharRight64Java7Suite extends ConcurrentAtomicNumberSuite[Char, AtomicChar]( @@ -908,7 +913,7 @@ object ConcurrentAtomicNumberCharRight64Java7Suite None, Char.MaxValue, Char.MinValue, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicNumberNumberAnyRight64Java7Suite extends ConcurrentAtomicNumberSuite[BigInt, AtomicNumberAny[BigInt]]( @@ -918,7 +923,7 @@ object ConcurrentAtomicNumberNumberAnyRight64Java7Suite None, BigInt(Long.MaxValue), BigInt(Long.MinValue), - allowPlatformIntrinsics = false) + ) //-- LeftRight128 (Java 7) @@ -930,7 +935,7 @@ object ConcurrentAtomicNumberDoubleLeftRight128Java7Suite Some(Double.NaN), Double.MaxValue, Double.MinValue, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicNumberFloatLeftRight128Java7Suite extends ConcurrentAtomicNumberSuite[Float, AtomicFloat]( @@ -940,7 +945,7 @@ object ConcurrentAtomicNumberFloatLeftRight128Java7Suite Some(Float.NaN), Float.MaxValue, Float.MinValue, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicNumberLongLeftRight128Java7Suite extends ConcurrentAtomicNumberSuite[Long, AtomicLong]( @@ -950,7 +955,7 @@ object ConcurrentAtomicNumberLongLeftRight128Java7Suite None, Long.MaxValue, Long.MinValue, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicNumberIntLeftRight128Java7Suite extends ConcurrentAtomicNumberSuite[Int, AtomicInt]( @@ -960,7 +965,7 @@ object ConcurrentAtomicNumberIntLeftRight128Java7Suite None, Int.MaxValue, Int.MinValue, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicNumberShortLeftRight128Java7Suite extends ConcurrentAtomicNumberSuite[Short, AtomicShort]( @@ -970,7 +975,7 @@ object ConcurrentAtomicNumberShortLeftRight128Java7Suite None, Short.MaxValue, Short.MinValue, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicNumberByteLeftRight128Java7Suite extends ConcurrentAtomicNumberSuite[Byte, AtomicByte]( @@ -980,7 +985,7 @@ object ConcurrentAtomicNumberByteLeftRight128Java7Suite None, Byte.MaxValue, Byte.MinValue, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicNumberCharLeftRight128Java7Suite extends ConcurrentAtomicNumberSuite[Char, AtomicChar]( @@ -990,7 +995,7 @@ object ConcurrentAtomicNumberCharLeftRight128Java7Suite None, Char.MaxValue, Char.MinValue, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicNumberNumberAnyLeftRight128Java7Suite extends ConcurrentAtomicNumberSuite[BigInt, AtomicNumberAny[BigInt]]( @@ -1000,7 +1005,7 @@ object ConcurrentAtomicNumberNumberAnyLeftRight128Java7Suite None, BigInt(Long.MaxValue), BigInt(Long.MinValue), - allowPlatformIntrinsics = false) + ) //--Left128 (Java 7) @@ -1012,7 +1017,7 @@ object ConcurrentAtomicNumberDoubleLeft128Java7Suite Some(Double.NaN), Double.MaxValue, Double.MinValue, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicNumberFloatLeft128Java7Suite extends ConcurrentAtomicNumberSuite[Float, AtomicFloat]( @@ -1022,7 +1027,7 @@ object ConcurrentAtomicNumberFloatLeft128Java7Suite Some(Float.NaN), Float.MaxValue, Float.MinValue, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicNumberLongLeft128Java7Suite extends ConcurrentAtomicNumberSuite[Long, AtomicLong]( @@ -1032,7 +1037,7 @@ object ConcurrentAtomicNumberLongLeft128Java7Suite None, Long.MaxValue, Long.MinValue, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicNumberIntLeft128Java7Suite extends ConcurrentAtomicNumberSuite[Int, AtomicInt]( @@ -1042,7 +1047,7 @@ object ConcurrentAtomicNumberIntLeft128Java7Suite None, Int.MaxValue, Int.MinValue, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicNumberShortLeft128Java7Suite extends ConcurrentAtomicNumberSuite[Short, AtomicShort]( @@ -1052,7 +1057,7 @@ object ConcurrentAtomicNumberShortLeft128Java7Suite None, Short.MaxValue, Short.MinValue, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicNumberByteLeft128Java7Suite extends ConcurrentAtomicNumberSuite[Byte, AtomicByte]( @@ -1062,7 +1067,7 @@ object ConcurrentAtomicNumberByteLeft128Java7Suite None, Byte.MaxValue, Byte.MinValue, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicNumberCharLeft128Java7Suite extends ConcurrentAtomicNumberSuite[Char, AtomicChar]( @@ -1072,7 +1077,7 @@ object ConcurrentAtomicNumberCharLeft128Java7Suite None, Char.MaxValue, Char.MinValue, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicNumberNumberAnyLeft128Java7Suite extends ConcurrentAtomicNumberSuite[BigInt, AtomicNumberAny[BigInt]]( @@ -1082,7 +1087,7 @@ object ConcurrentAtomicNumberNumberAnyLeft128Java7Suite None, BigInt(Long.MaxValue), BigInt(Long.MinValue), - allowPlatformIntrinsics = false) + ) //-- Right128 (Java 7) @@ -1094,7 +1099,7 @@ object ConcurrentAtomicNumberDoubleRight128Java7Suite Some(Double.NaN), Double.MaxValue, Double.MinValue, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicNumberFloatRight128Java7Suite extends ConcurrentAtomicNumberSuite[Float, AtomicFloat]( @@ -1104,7 +1109,7 @@ object ConcurrentAtomicNumberFloatRight128Java7Suite Some(Float.NaN), Float.MaxValue, Float.MinValue, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicNumberLongRight128Java7Suite extends ConcurrentAtomicNumberSuite[Long, AtomicLong]( @@ -1114,7 +1119,7 @@ object ConcurrentAtomicNumberLongRight128Java7Suite None, Long.MaxValue, Long.MinValue, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicNumberIntRight128Java7Suite extends ConcurrentAtomicNumberSuite[Int, AtomicInt]( @@ -1124,7 +1129,7 @@ object ConcurrentAtomicNumberIntRight128Java7Suite None, Int.MaxValue, Int.MinValue, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicNumberShortRight128Java7Suite extends ConcurrentAtomicNumberSuite[Short, AtomicShort]( @@ -1134,7 +1139,7 @@ object ConcurrentAtomicNumberShortRight128Java7Suite None, Short.MaxValue, Short.MinValue, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicNumberByteRight128Java7Suite extends ConcurrentAtomicNumberSuite[Byte, AtomicByte]( @@ -1144,7 +1149,7 @@ object ConcurrentAtomicNumberByteRight128Java7Suite None, Byte.MaxValue, Byte.MinValue, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicNumberCharRight128Java7Suite extends ConcurrentAtomicNumberSuite[Char, AtomicChar]( @@ -1154,7 +1159,7 @@ object ConcurrentAtomicNumberCharRight128Java7Suite None, Char.MaxValue, Char.MinValue, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicNumberNumberAnyRight128Java7Suite extends ConcurrentAtomicNumberSuite[BigInt, AtomicNumberAny[BigInt]]( @@ -1164,7 +1169,7 @@ object ConcurrentAtomicNumberNumberAnyRight128Java7Suite None, BigInt(Long.MaxValue), BigInt(Long.MinValue), - allowPlatformIntrinsics = false) + ) //-- LeftRight256 (Java 7) @@ -1176,7 +1181,7 @@ object ConcurrentAtomicNumberDoubleLeftRight256Java7Suite Some(Double.NaN), Double.MaxValue, Double.MinValue, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicNumberFloatLeftRight256Java7Suite extends ConcurrentAtomicNumberSuite[Float, AtomicFloat]( @@ -1186,7 +1191,7 @@ object ConcurrentAtomicNumberFloatLeftRight256Java7Suite Some(Float.NaN), Float.MaxValue, Float.MinValue, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicNumberLongLeftRight256Java7Suite extends ConcurrentAtomicNumberSuite[Long, AtomicLong]( @@ -1196,7 +1201,7 @@ object ConcurrentAtomicNumberLongLeftRight256Java7Suite None, Long.MaxValue, Long.MinValue, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicNumberIntLeftRight256Java7Suite extends ConcurrentAtomicNumberSuite[Int, AtomicInt]( @@ -1206,7 +1211,7 @@ object ConcurrentAtomicNumberIntLeftRight256Java7Suite None, Int.MaxValue, Int.MinValue, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicNumberShortLeftRight256Java7Suite extends ConcurrentAtomicNumberSuite[Short, AtomicShort]( @@ -1216,7 +1221,7 @@ object ConcurrentAtomicNumberShortLeftRight256Java7Suite None, Short.MaxValue, Short.MinValue, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicNumberByteLeftRight256Java7Suite extends ConcurrentAtomicNumberSuite[Byte, AtomicByte]( @@ -1226,7 +1231,7 @@ object ConcurrentAtomicNumberByteLeftRight256Java7Suite None, Byte.MaxValue, Byte.MinValue, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicNumberCharLeftRight256Java7Suite extends ConcurrentAtomicNumberSuite[Char, AtomicChar]( @@ -1236,7 +1241,7 @@ object ConcurrentAtomicNumberCharLeftRight256Java7Suite None, Char.MaxValue, Char.MinValue, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicNumberNumberAnyLeftRight256Java7Suite extends ConcurrentAtomicNumberSuite[BigInt, AtomicNumberAny[BigInt]]( @@ -1246,4 +1251,4 @@ object ConcurrentAtomicNumberNumberAnyLeftRight256Java7Suite None, BigInt(Long.MaxValue), BigInt(Long.MinValue), - allowPlatformIntrinsics = false) + ) diff --git a/monix-execution/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicSuite.scala b/monix-execution/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicSuite.scala index 2df5b8ef7..363853107 100644 --- a/monix-execution/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicSuite.scala +++ b/monix-execution/jvm/src/test/scala/monix/execution/atomic/ConcurrentAtomicSuite.scala @@ -21,27 +21,27 @@ import minitest.SimpleTestSuite import monix.execution.atomic.PaddingStrategy._ import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.duration._ -import scala.concurrent.{Await, Future} +import scala.concurrent.{ Await, Future } abstract class ConcurrentAtomicSuite[A, R <: Atomic[A]]( builder: AtomicBuilder[A, R], strategy: PaddingStrategy, valueFromInt: Int => A, valueToInt: A => Int, - allowPlatformIntrinsics: Boolean) - extends SimpleTestSuite { +) extends SimpleTestSuite { - def Atomic(initial: A): R = builder.buildInstance(initial, strategy, allowPlatformIntrinsics) + def Atomic(initial: A): R = builder.buildInstance(initial, strategy) def zero = valueFromInt(0) def one = valueFromInt(1) def two = valueFromInt(2) test("should perform concurrent compareAndSet") { val r = Atomic(zero) - val futures = for (i <- 0 until 5) yield Future { - for (j <- 0 until 100) - r.transform(x => valueFromInt(valueToInt(x) + 1)) - } + val futures = + for (i <- 0 until 5) yield Future { + for (j <- 0 until 100) + r.transform(x => valueFromInt(valueToInt(x) + 1)) + } val f = Future.sequence(futures) Await.result(f, 30.seconds) @@ -50,10 +50,11 @@ abstract class ConcurrentAtomicSuite[A, R <: Atomic[A]]( test("should perform concurrent getAndSet") { val r = Atomic(zero) - val futures = for (i <- 0 until 5) yield Future { - for (j <- 0 until 100) - r.getAndSet(valueFromInt(j)) - } + val futures = + for (i <- 0 until 5) yield Future { + for (j <- 0 until 100) + r.getAndSet(valueFromInt(j)) + } val f = Future.sequence(futures) Await.result(f, 30.seconds) @@ -61,19 +62,20 @@ abstract class ConcurrentAtomicSuite[A, R <: Atomic[A]]( } } -abstract class ConcurrentAtomicBooleanSuite(strategy: PaddingStrategy, allowPlatformIntrinsics: Boolean = true) +abstract class ConcurrentAtomicBooleanSuite(strategy: PaddingStrategy) extends ConcurrentAtomicSuite[Boolean, AtomicBoolean]( Atomic.builderFor(true), strategy, x => if (x == 1) true else false, x => if (x) 1 else 0, - allowPlatformIntrinsics) { + ) { test("should flip to true when false") { val r = Atomic(false) - val futures = for (_ <- 0 until 5) yield Future { - r.flip(true) - } + val futures = + for (_ <- 0 until 5) yield Future { + r.flip(true) + } val result = Await.result(Future.sequence(futures), 30.seconds) assert(result.count(_ == true) == 1) assert(r.get()) @@ -81,9 +83,10 @@ abstract class ConcurrentAtomicBooleanSuite(strategy: PaddingStrategy, allowPlat test("should not flip to true when already true") { val r = Atomic(true) - val futures = for (_ <- 0 until 5) yield Future { - r.flip(true) - } + val futures = + for (_ <- 0 until 5) yield Future { + r.flip(true) + } val result = Await.result(Future.sequence(futures), 30.seconds) assert(result.forall(_ == false)) } @@ -97,7 +100,7 @@ object ConcurrentAtomicAnyNoPaddingSuite NoPadding, x => x.toString, x => x.toInt, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicBooleanNoPaddingSuite extends ConcurrentAtomicBooleanSuite(NoPadding) @@ -107,7 +110,7 @@ object ConcurrentAtomicNumberAnyNoPaddingSuite NoPadding, x => BigInt(x), x => x.toInt, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicFloatNoPaddingSuite extends ConcurrentAtomicSuite[Float, AtomicFloat]( @@ -115,7 +118,7 @@ object ConcurrentAtomicFloatNoPaddingSuite NoPadding, x => x.toFloat, x => x.toInt, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicDoubleNoPaddingSuite extends ConcurrentAtomicSuite[Double, AtomicDouble]( @@ -123,7 +126,7 @@ object ConcurrentAtomicDoubleNoPaddingSuite NoPadding, x => x.toDouble, x => x.toInt, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicShortNoPaddingSuite extends ConcurrentAtomicSuite[Short, AtomicShort]( @@ -131,7 +134,7 @@ object ConcurrentAtomicShortNoPaddingSuite NoPadding, x => x.toShort, x => x.toInt, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicByteNoPaddingSuite extends ConcurrentAtomicSuite[Byte, AtomicByte]( @@ -139,7 +142,7 @@ object ConcurrentAtomicByteNoPaddingSuite NoPadding, x => x.toByte, x => x.toInt, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicCharNoPaddingSuite extends ConcurrentAtomicSuite[Char, AtomicChar]( @@ -147,7 +150,7 @@ object ConcurrentAtomicCharNoPaddingSuite NoPadding, x => x.toChar, x => x.toInt, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicIntNoPaddingSuite extends ConcurrentAtomicSuite[Int, AtomicInt]( @@ -155,7 +158,7 @@ object ConcurrentAtomicIntNoPaddingSuite NoPadding, x => x, x => x, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicLongNoPaddingSuite extends ConcurrentAtomicSuite[Long, AtomicLong]( @@ -163,7 +166,7 @@ object ConcurrentAtomicLongNoPaddingSuite NoPadding, x => x.toLong, x => x.toInt, - allowPlatformIntrinsics = true) + ) // -- Left64 (Java 8) @@ -173,7 +176,7 @@ object ConcurrentAtomicAnyLeft64Suite Left64, x => x.toString, x => x.toInt, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicBooleanLeft64Suite extends ConcurrentAtomicBooleanSuite(Left64) @@ -183,7 +186,7 @@ object ConcurrentAtomicNumberAnyLeft64Suite Left64, x => BigInt(x), x => x.toInt, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicFloatLeft64Suite extends ConcurrentAtomicSuite[Float, AtomicFloat]( @@ -191,7 +194,7 @@ object ConcurrentAtomicFloatLeft64Suite Left64, x => x.toFloat, x => x.toInt, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicDoubleLeft64Suite extends ConcurrentAtomicSuite[Double, AtomicDouble]( @@ -199,7 +202,7 @@ object ConcurrentAtomicDoubleLeft64Suite Left64, x => x.toDouble, x => x.toInt, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicShortLeft64Suite extends ConcurrentAtomicSuite[Short, AtomicShort]( @@ -207,7 +210,7 @@ object ConcurrentAtomicShortLeft64Suite Left64, x => x.toShort, x => x.toInt, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicByteLeft64Suite extends ConcurrentAtomicSuite[Byte, AtomicByte]( @@ -215,7 +218,7 @@ object ConcurrentAtomicByteLeft64Suite Left64, x => x.toByte, x => x.toInt, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicCharLeft64Suite extends ConcurrentAtomicSuite[Char, AtomicChar]( @@ -223,7 +226,7 @@ object ConcurrentAtomicCharLeft64Suite Left64, x => x.toChar, x => x.toInt, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicIntLeft64Suite extends ConcurrentAtomicSuite[Int, AtomicInt]( @@ -231,7 +234,7 @@ object ConcurrentAtomicIntLeft64Suite Left64, x => x, x => x, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicLongLeft64Suite extends ConcurrentAtomicSuite[Long, AtomicLong]( @@ -239,7 +242,7 @@ object ConcurrentAtomicLongLeft64Suite Left64, x => x.toLong, x => x.toInt, - allowPlatformIntrinsics = true) + ) // -- Right64 (Java 8) @@ -249,7 +252,7 @@ object ConcurrentAtomicAnyRight64Suite Right64, x => x.toString, x => x.toInt, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicBooleanRight64Suite extends ConcurrentAtomicBooleanSuite(Right64) @@ -259,7 +262,7 @@ object ConcurrentAtomicNumberAnyRight64Suite Right64, x => BigInt(x), x => x.toInt, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicFloatRight64Suite extends ConcurrentAtomicSuite[Float, AtomicFloat]( @@ -267,7 +270,7 @@ object ConcurrentAtomicFloatRight64Suite Right64, x => x.toFloat, x => x.toInt, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicDoubleRight64Suite extends ConcurrentAtomicSuite[Double, AtomicDouble]( @@ -275,7 +278,7 @@ object ConcurrentAtomicDoubleRight64Suite Right64, x => x.toDouble, x => x.toInt, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicShortRight64Suite extends ConcurrentAtomicSuite[Short, AtomicShort]( @@ -283,7 +286,7 @@ object ConcurrentAtomicShortRight64Suite Right64, x => x.toShort, x => x.toInt, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicByteRight64Suite extends ConcurrentAtomicSuite[Byte, AtomicByte]( @@ -291,7 +294,7 @@ object ConcurrentAtomicByteRight64Suite Right64, x => x.toByte, x => x.toInt, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicCharRight64Suite extends ConcurrentAtomicSuite[Char, AtomicChar]( @@ -299,7 +302,7 @@ object ConcurrentAtomicCharRight64Suite Right64, x => x.toChar, x => x.toInt, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicIntRight64Suite extends ConcurrentAtomicSuite[Int, AtomicInt]( @@ -307,7 +310,7 @@ object ConcurrentAtomicIntRight64Suite Right64, x => x, x => x, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicLongRight64Suite extends ConcurrentAtomicSuite[Long, AtomicLong]( @@ -315,7 +318,7 @@ object ConcurrentAtomicLongRight64Suite Right64, x => x.toLong, x => x.toInt, - allowPlatformIntrinsics = true) + ) // -- LeftRight128 (Java 8) @@ -325,7 +328,7 @@ object ConcurrentAtomicAnyLeftRight128Suite LeftRight128, x => x.toString, x => x.toInt, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicBooleanLeftRight128Suite extends ConcurrentAtomicBooleanSuite(LeftRight128) @@ -335,7 +338,7 @@ object ConcurrentAtomicNumberAnyLeftRight128Suite LeftRight128, x => BigInt(x), x => x.toInt, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicFloatLeftRight128Suite extends ConcurrentAtomicSuite[Float, AtomicFloat]( @@ -343,7 +346,7 @@ object ConcurrentAtomicFloatLeftRight128Suite LeftRight128, x => x.toFloat, x => x.toInt, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicDoubleLeftRight128Suite extends ConcurrentAtomicSuite[Double, AtomicDouble]( @@ -351,7 +354,7 @@ object ConcurrentAtomicDoubleLeftRight128Suite LeftRight128, x => x.toDouble, x => x.toInt, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicShortLeftRight128Suite extends ConcurrentAtomicSuite[Short, AtomicShort]( @@ -359,7 +362,7 @@ object ConcurrentAtomicShortLeftRight128Suite LeftRight128, x => x.toShort, x => x.toInt, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicByteLeftRight128Suite extends ConcurrentAtomicSuite[Byte, AtomicByte]( @@ -367,7 +370,7 @@ object ConcurrentAtomicByteLeftRight128Suite LeftRight128, x => x.toByte, x => x.toInt, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicCharLeftRight128Suite extends ConcurrentAtomicSuite[Char, AtomicChar]( @@ -375,7 +378,7 @@ object ConcurrentAtomicCharLeftRight128Suite LeftRight128, x => x.toChar, x => x.toInt, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicIntLeftRight128Suite extends ConcurrentAtomicSuite[Int, AtomicInt]( @@ -383,7 +386,7 @@ object ConcurrentAtomicIntLeftRight128Suite LeftRight128, x => x, x => x, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicLongLeftRight128Suite extends ConcurrentAtomicSuite[Long, AtomicLong]( @@ -391,7 +394,7 @@ object ConcurrentAtomicLongLeftRight128Suite LeftRight128, x => x.toLong, x => x.toInt, - allowPlatformIntrinsics = true) + ) // -- Left128 (Java 8) @@ -401,7 +404,7 @@ object ConcurrentAtomicAnyLeft128Suite Left128, x => x.toString, x => x.toInt, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicBooleanLeft128Suite extends ConcurrentAtomicBooleanSuite(Left128) @@ -411,7 +414,7 @@ object ConcurrentAtomicNumberAnyLeft128Suite Left128, x => BigInt(x), x => x.toInt, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicFloatLeft128Suite extends ConcurrentAtomicSuite[Float, AtomicFloat]( @@ -419,7 +422,7 @@ object ConcurrentAtomicFloatLeft128Suite Left128, x => x.toFloat, x => x.toInt, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicDoubleLeft128Suite extends ConcurrentAtomicSuite[Double, AtomicDouble]( @@ -427,7 +430,7 @@ object ConcurrentAtomicDoubleLeft128Suite Left128, x => x.toDouble, x => x.toInt, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicShortLeft128Suite extends ConcurrentAtomicSuite[Short, AtomicShort]( @@ -435,7 +438,7 @@ object ConcurrentAtomicShortLeft128Suite Left128, x => x.toShort, x => x.toInt, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicByteLeft128Suite extends ConcurrentAtomicSuite[Byte, AtomicByte]( @@ -443,7 +446,7 @@ object ConcurrentAtomicByteLeft128Suite Left128, x => x.toByte, x => x.toInt, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicCharLeft128Suite extends ConcurrentAtomicSuite[Char, AtomicChar]( @@ -451,7 +454,7 @@ object ConcurrentAtomicCharLeft128Suite Left128, x => x.toChar, x => x.toInt, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicIntLeft128Suite extends ConcurrentAtomicSuite[Int, AtomicInt]( @@ -459,7 +462,7 @@ object ConcurrentAtomicIntLeft128Suite Left128, x => x, x => x, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicLongLeft128Suite extends ConcurrentAtomicSuite[Long, AtomicLong]( @@ -467,7 +470,7 @@ object ConcurrentAtomicLongLeft128Suite Left128, x => x.toLong, x => x.toInt, - allowPlatformIntrinsics = true) + ) // -- Right128 (Java 8) @@ -477,7 +480,7 @@ object ConcurrentAtomicAnyRight128Suite Right128, x => x.toString, x => x.toInt, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicBooleanRight128Suite extends ConcurrentAtomicBooleanSuite(Right128) @@ -487,7 +490,7 @@ object ConcurrentAtomicNumberAnyRight128Suite Right128, x => BigInt(x), x => x.toInt, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicFloatRight128Suite extends ConcurrentAtomicSuite[Float, AtomicFloat]( @@ -495,7 +498,7 @@ object ConcurrentAtomicFloatRight128Suite Right128, x => x.toFloat, x => x.toInt, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicDoubleRight128Suite extends ConcurrentAtomicSuite[Double, AtomicDouble]( @@ -503,7 +506,7 @@ object ConcurrentAtomicDoubleRight128Suite Right128, x => x.toDouble, x => x.toInt, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicShortRight128Suite extends ConcurrentAtomicSuite[Short, AtomicShort]( @@ -511,7 +514,7 @@ object ConcurrentAtomicShortRight128Suite Right128, x => x.toShort, x => x.toInt, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicByteRight128Suite extends ConcurrentAtomicSuite[Byte, AtomicByte]( @@ -519,7 +522,7 @@ object ConcurrentAtomicByteRight128Suite Right128, x => x.toByte, x => x.toInt, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicCharRight128Suite extends ConcurrentAtomicSuite[Char, AtomicChar]( @@ -527,7 +530,7 @@ object ConcurrentAtomicCharRight128Suite Right128, x => x.toChar, x => x.toInt, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicIntRight128Suite extends ConcurrentAtomicSuite[Int, AtomicInt]( @@ -535,7 +538,7 @@ object ConcurrentAtomicIntRight128Suite Right128, x => x, x => x, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicLongRight128Suite extends ConcurrentAtomicSuite[Long, AtomicLong]( @@ -543,7 +546,7 @@ object ConcurrentAtomicLongRight128Suite Right128, x => x.toLong, x => x.toInt, - allowPlatformIntrinsics = true) + ) // -- LeftRight256 (Java 8) @@ -553,7 +556,7 @@ object ConcurrentAtomicAnyLeftRight256Suite LeftRight256, x => x.toString, x => x.toInt, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicBooleanLeftRight256Suite extends ConcurrentAtomicBooleanSuite(LeftRight256) @@ -563,7 +566,7 @@ object ConcurrentAtomicNumberAnyLeftRight256Suite LeftRight256, x => BigInt(x), x => x.toInt, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicFloatLeftRight256Suite extends ConcurrentAtomicSuite[Float, AtomicFloat]( @@ -571,7 +574,7 @@ object ConcurrentAtomicFloatLeftRight256Suite LeftRight256, x => x.toFloat, x => x.toInt, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicDoubleLeftRight256Suite extends ConcurrentAtomicSuite[Double, AtomicDouble]( @@ -579,7 +582,7 @@ object ConcurrentAtomicDoubleLeftRight256Suite LeftRight256, x => x.toDouble, x => x.toInt, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicShortLeftRight256Suite extends ConcurrentAtomicSuite[Short, AtomicShort]( @@ -587,7 +590,7 @@ object ConcurrentAtomicShortLeftRight256Suite LeftRight256, x => x.toShort, x => x.toInt, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicByteLeftRight256Suite extends ConcurrentAtomicSuite[Byte, AtomicByte]( @@ -595,7 +598,7 @@ object ConcurrentAtomicByteLeftRight256Suite LeftRight256, x => x.toByte, x => x.toInt, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicCharLeftRight256Suite extends ConcurrentAtomicSuite[Char, AtomicChar]( @@ -603,7 +606,7 @@ object ConcurrentAtomicCharLeftRight256Suite LeftRight256, x => x.toChar, x => x.toInt, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicIntLeftRight256Suite extends ConcurrentAtomicSuite[Int, AtomicInt]( @@ -611,7 +614,7 @@ object ConcurrentAtomicIntLeftRight256Suite LeftRight256, x => x, x => x, - allowPlatformIntrinsics = true) + ) object ConcurrentAtomicLongLeftRight256Suite extends ConcurrentAtomicSuite[Long, AtomicLong]( @@ -619,7 +622,7 @@ object ConcurrentAtomicLongLeftRight256Suite LeftRight256, x => x.toLong, x => x.toInt, - allowPlatformIntrinsics = true) + ) // -------------- Java 7 @@ -631,10 +634,10 @@ object ConcurrentAtomicAnyNoPaddingJava7Suite NoPadding, x => x.toString, x => x.toInt, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicBooleanNoPaddingJava7Suite - extends ConcurrentAtomicBooleanSuite(NoPadding, allowPlatformIntrinsics = false) + extends ConcurrentAtomicBooleanSuite(NoPadding) object ConcurrentAtomicNumberAnyNoPaddingJava7Suite extends ConcurrentAtomicSuite[BigInt, AtomicNumberAny[BigInt]]( @@ -642,7 +645,7 @@ object ConcurrentAtomicNumberAnyNoPaddingJava7Suite NoPadding, x => BigInt(x), x => x.toInt, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicFloatNoPaddingJava7Suite extends ConcurrentAtomicSuite[Float, AtomicFloat]( @@ -650,7 +653,7 @@ object ConcurrentAtomicFloatNoPaddingJava7Suite NoPadding, x => x.toFloat, x => x.toInt, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicDoubleNoPaddingJava7Suite extends ConcurrentAtomicSuite[Double, AtomicDouble]( @@ -658,7 +661,7 @@ object ConcurrentAtomicDoubleNoPaddingJava7Suite NoPadding, x => x.toDouble, x => x.toInt, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicShortNoPaddingJava7Suite extends ConcurrentAtomicSuite[Short, AtomicShort]( @@ -666,7 +669,7 @@ object ConcurrentAtomicShortNoPaddingJava7Suite NoPadding, x => x.toShort, x => x.toInt, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicByteNoPaddingJava7Suite extends ConcurrentAtomicSuite[Byte, AtomicByte]( @@ -674,7 +677,7 @@ object ConcurrentAtomicByteNoPaddingJava7Suite NoPadding, x => x.toByte, x => x.toInt, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicCharNoPaddingJava7Suite extends ConcurrentAtomicSuite[Char, AtomicChar]( @@ -682,7 +685,7 @@ object ConcurrentAtomicCharNoPaddingJava7Suite NoPadding, x => x.toChar, x => x.toInt, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicIntNoPaddingJava7Suite extends ConcurrentAtomicSuite[Int, AtomicInt]( @@ -690,7 +693,7 @@ object ConcurrentAtomicIntNoPaddingJava7Suite NoPadding, x => x, x => x, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicLongNoPaddingJava7Suite extends ConcurrentAtomicSuite[Long, AtomicLong]( @@ -698,7 +701,7 @@ object ConcurrentAtomicLongNoPaddingJava7Suite NoPadding, x => x.toLong, x => x.toInt, - allowPlatformIntrinsics = false) + ) // -- Left64 (Java 7) @@ -708,10 +711,10 @@ object ConcurrentAtomicAnyLeft64Java7Suite Left64, x => x.toString, x => x.toInt, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicBooleanLeft64Java7Suite - extends ConcurrentAtomicBooleanSuite(Left64, allowPlatformIntrinsics = false) + extends ConcurrentAtomicBooleanSuite(Left64) object ConcurrentAtomicNumberAnyLeft64Java7Suite extends ConcurrentAtomicSuite[BigInt, AtomicNumberAny[BigInt]]( @@ -719,7 +722,7 @@ object ConcurrentAtomicNumberAnyLeft64Java7Suite Left64, x => BigInt(x), x => x.toInt, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicFloatLeft64Java7Suite extends ConcurrentAtomicSuite[Float, AtomicFloat]( @@ -727,7 +730,7 @@ object ConcurrentAtomicFloatLeft64Java7Suite Left64, x => x.toFloat, x => x.toInt, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicDoubleLeft64Java7Suite extends ConcurrentAtomicSuite[Double, AtomicDouble]( @@ -735,7 +738,7 @@ object ConcurrentAtomicDoubleLeft64Java7Suite Left64, x => x.toDouble, x => x.toInt, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicShortLeft64Java7Suite extends ConcurrentAtomicSuite[Short, AtomicShort]( @@ -743,7 +746,7 @@ object ConcurrentAtomicShortLeft64Java7Suite Left64, x => x.toShort, x => x.toInt, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicByteLeft64Java7Suite extends ConcurrentAtomicSuite[Byte, AtomicByte]( @@ -751,7 +754,7 @@ object ConcurrentAtomicByteLeft64Java7Suite Left64, x => x.toByte, x => x.toInt, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicCharLeft64Java7Suite extends ConcurrentAtomicSuite[Char, AtomicChar]( @@ -759,7 +762,7 @@ object ConcurrentAtomicCharLeft64Java7Suite Left64, x => x.toChar, x => x.toInt, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicIntLeft64Java7Suite extends ConcurrentAtomicSuite[Int, AtomicInt]( @@ -767,7 +770,7 @@ object ConcurrentAtomicIntLeft64Java7Suite Left64, x => x, x => x, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicLongLeft64Java7Suite extends ConcurrentAtomicSuite[Long, AtomicLong]( @@ -775,7 +778,7 @@ object ConcurrentAtomicLongLeft64Java7Suite Left64, x => x.toLong, x => x.toInt, - allowPlatformIntrinsics = false) + ) // -- Right64 (Java 7) @@ -785,10 +788,10 @@ object ConcurrentAtomicAnyRight64Java7Suite Right64, x => x.toString, x => x.toInt, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicBooleanRight64Java7Suite - extends ConcurrentAtomicBooleanSuite(Right64, allowPlatformIntrinsics = false) + extends ConcurrentAtomicBooleanSuite(Right64) object ConcurrentAtomicNumberAnyRight64Java7Suite extends ConcurrentAtomicSuite[BigInt, AtomicNumberAny[BigInt]]( @@ -796,7 +799,7 @@ object ConcurrentAtomicNumberAnyRight64Java7Suite Right64, x => BigInt(x), x => x.toInt, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicFloatRight64Java7Suite extends ConcurrentAtomicSuite[Float, AtomicFloat]( @@ -804,7 +807,7 @@ object ConcurrentAtomicFloatRight64Java7Suite Right64, x => x.toFloat, x => x.toInt, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicDoubleRight64Java7Suite extends ConcurrentAtomicSuite[Double, AtomicDouble]( @@ -812,7 +815,7 @@ object ConcurrentAtomicDoubleRight64Java7Suite Right64, x => x.toDouble, x => x.toInt, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicShortRight64Java7Suite extends ConcurrentAtomicSuite[Short, AtomicShort]( @@ -820,7 +823,7 @@ object ConcurrentAtomicShortRight64Java7Suite Right64, x => x.toShort, x => x.toInt, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicByteRight64Java7Suite extends ConcurrentAtomicSuite[Byte, AtomicByte]( @@ -828,7 +831,7 @@ object ConcurrentAtomicByteRight64Java7Suite Right64, x => x.toByte, x => x.toInt, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicCharRight64Java7Suite extends ConcurrentAtomicSuite[Char, AtomicChar]( @@ -836,7 +839,7 @@ object ConcurrentAtomicCharRight64Java7Suite Right64, x => x.toChar, x => x.toInt, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicIntRight64Java7Suite extends ConcurrentAtomicSuite[Int, AtomicInt]( @@ -844,7 +847,7 @@ object ConcurrentAtomicIntRight64Java7Suite Right64, x => x, x => x, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicLongRight64Java7Suite extends ConcurrentAtomicSuite[Long, AtomicLong]( @@ -852,7 +855,7 @@ object ConcurrentAtomicLongRight64Java7Suite Right64, x => x.toLong, x => x.toInt, - allowPlatformIntrinsics = false) + ) // -- LeftRight128 (Java 7) @@ -862,10 +865,10 @@ object ConcurrentAtomicAnyLeftRight128Java7Suite LeftRight128, x => x.toString, x => x.toInt, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicBooleanLeftRight128Java7Suite - extends ConcurrentAtomicBooleanSuite(LeftRight128, allowPlatformIntrinsics = false) + extends ConcurrentAtomicBooleanSuite(LeftRight128) object ConcurrentAtomicNumberAnyLeftRight128Java7Suite extends ConcurrentAtomicSuite[BigInt, AtomicNumberAny[BigInt]]( @@ -873,7 +876,7 @@ object ConcurrentAtomicNumberAnyLeftRight128Java7Suite LeftRight128, x => BigInt(x), x => x.toInt, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicFloatLeftRight128Java7Suite extends ConcurrentAtomicSuite[Float, AtomicFloat]( @@ -881,7 +884,7 @@ object ConcurrentAtomicFloatLeftRight128Java7Suite LeftRight128, x => x.toFloat, x => x.toInt, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicDoubleLeftRight128Java7Suite extends ConcurrentAtomicSuite[Double, AtomicDouble]( @@ -889,7 +892,7 @@ object ConcurrentAtomicDoubleLeftRight128Java7Suite LeftRight128, x => x.toDouble, x => x.toInt, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicShortLeftRight128Java7Suite extends ConcurrentAtomicSuite[Short, AtomicShort]( @@ -897,7 +900,7 @@ object ConcurrentAtomicShortLeftRight128Java7Suite LeftRight128, x => x.toShort, x => x.toInt, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicByteLeftRight128Java7Suite extends ConcurrentAtomicSuite[Byte, AtomicByte]( @@ -905,7 +908,7 @@ object ConcurrentAtomicByteLeftRight128Java7Suite LeftRight128, x => x.toByte, x => x.toInt, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicCharLeftRight128Java7Suite extends ConcurrentAtomicSuite[Char, AtomicChar]( @@ -913,7 +916,7 @@ object ConcurrentAtomicCharLeftRight128Java7Suite LeftRight128, x => x.toChar, x => x.toInt, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicIntLeftRight128Java7Suite extends ConcurrentAtomicSuite[Int, AtomicInt]( @@ -921,7 +924,7 @@ object ConcurrentAtomicIntLeftRight128Java7Suite LeftRight128, x => x, x => x, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicLongLeftRight128Java7Suite extends ConcurrentAtomicSuite[Long, AtomicLong]( @@ -929,7 +932,7 @@ object ConcurrentAtomicLongLeftRight128Java7Suite LeftRight128, x => x.toLong, x => x.toInt, - allowPlatformIntrinsics = false) + ) // -- Left128 (Java 7) @@ -939,10 +942,10 @@ object ConcurrentAtomicAnyLeft128Java7Suite Left128, x => x.toString, x => x.toInt, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicBooleanLeft128Java7Suite - extends ConcurrentAtomicBooleanSuite(Left128, allowPlatformIntrinsics = false) + extends ConcurrentAtomicBooleanSuite(Left128) object ConcurrentAtomicNumberAnyLeft128Java7Suite extends ConcurrentAtomicSuite[BigInt, AtomicNumberAny[BigInt]]( @@ -950,7 +953,7 @@ object ConcurrentAtomicNumberAnyLeft128Java7Suite Left128, x => BigInt(x), x => x.toInt, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicFloatLeft128Java7Suite extends ConcurrentAtomicSuite[Float, AtomicFloat]( @@ -958,7 +961,7 @@ object ConcurrentAtomicFloatLeft128Java7Suite Left128, x => x.toFloat, x => x.toInt, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicDoubleLeft128Java7Suite extends ConcurrentAtomicSuite[Double, AtomicDouble]( @@ -966,7 +969,7 @@ object ConcurrentAtomicDoubleLeft128Java7Suite Left128, x => x.toDouble, x => x.toInt, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicShortLeft128Java7Suite extends ConcurrentAtomicSuite[Short, AtomicShort]( @@ -974,7 +977,7 @@ object ConcurrentAtomicShortLeft128Java7Suite Left128, x => x.toShort, x => x.toInt, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicByteLeft128Java7Suite extends ConcurrentAtomicSuite[Byte, AtomicByte]( @@ -982,7 +985,7 @@ object ConcurrentAtomicByteLeft128Java7Suite Left128, x => x.toByte, x => x.toInt, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicCharLeft128Java7Suite extends ConcurrentAtomicSuite[Char, AtomicChar]( @@ -990,7 +993,7 @@ object ConcurrentAtomicCharLeft128Java7Suite Left128, x => x.toChar, x => x.toInt, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicIntLeft128Java7Suite extends ConcurrentAtomicSuite[Int, AtomicInt]( @@ -998,7 +1001,7 @@ object ConcurrentAtomicIntLeft128Java7Suite Left128, x => x, x => x, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicLongLeft128Java7Suite extends ConcurrentAtomicSuite[Long, AtomicLong]( @@ -1006,7 +1009,7 @@ object ConcurrentAtomicLongLeft128Java7Suite Left128, x => x.toLong, x => x.toInt, - allowPlatformIntrinsics = false) + ) // -- Right128 (Java 7) @@ -1016,10 +1019,10 @@ object ConcurrentAtomicAnyRight128Java7Suite Right128, x => x.toString, x => x.toInt, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicBooleanRight128Java7Suite - extends ConcurrentAtomicBooleanSuite(Right128, allowPlatformIntrinsics = false) + extends ConcurrentAtomicBooleanSuite(Right128) object ConcurrentAtomicNumberAnyRight128Java7Suite extends ConcurrentAtomicSuite[BigInt, AtomicNumberAny[BigInt]]( @@ -1027,7 +1030,7 @@ object ConcurrentAtomicNumberAnyRight128Java7Suite Right128, x => BigInt(x), x => x.toInt, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicFloatRight128Java7Suite extends ConcurrentAtomicSuite[Float, AtomicFloat]( @@ -1035,7 +1038,7 @@ object ConcurrentAtomicFloatRight128Java7Suite Right128, x => x.toFloat, x => x.toInt, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicDoubleRight128Java7Suite extends ConcurrentAtomicSuite[Double, AtomicDouble]( @@ -1043,7 +1046,7 @@ object ConcurrentAtomicDoubleRight128Java7Suite Right128, x => x.toDouble, x => x.toInt, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicShortRight128Java7Suite extends ConcurrentAtomicSuite[Short, AtomicShort]( @@ -1051,7 +1054,7 @@ object ConcurrentAtomicShortRight128Java7Suite Right128, x => x.toShort, x => x.toInt, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicByteRight128Java7Suite extends ConcurrentAtomicSuite[Byte, AtomicByte]( @@ -1059,7 +1062,7 @@ object ConcurrentAtomicByteRight128Java7Suite Right128, x => x.toByte, x => x.toInt, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicCharRight128Java7Suite extends ConcurrentAtomicSuite[Char, AtomicChar]( @@ -1067,7 +1070,7 @@ object ConcurrentAtomicCharRight128Java7Suite Right128, x => x.toChar, x => x.toInt, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicIntRight128Java7Suite extends ConcurrentAtomicSuite[Int, AtomicInt]( @@ -1075,7 +1078,7 @@ object ConcurrentAtomicIntRight128Java7Suite Right128, x => x, x => x, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicLongRight128Java7Suite extends ConcurrentAtomicSuite[Long, AtomicLong]( @@ -1083,7 +1086,7 @@ object ConcurrentAtomicLongRight128Java7Suite Right128, x => x.toLong, x => x.toInt, - allowPlatformIntrinsics = false) + ) // -- LeftRight256 (Java 7) @@ -1093,10 +1096,10 @@ object ConcurrentAtomicAnyLeftRight256Java7Suite LeftRight256, x => x.toString, x => x.toInt, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicBooleanLeftRight256Java7Suite - extends ConcurrentAtomicBooleanSuite(LeftRight256, allowPlatformIntrinsics = false) + extends ConcurrentAtomicBooleanSuite(LeftRight256) object ConcurrentAtomicNumberAnyLeftRight256Java7Suite extends ConcurrentAtomicSuite[BigInt, AtomicNumberAny[BigInt]]( @@ -1104,7 +1107,7 @@ object ConcurrentAtomicNumberAnyLeftRight256Java7Suite LeftRight256, x => BigInt(x), x => x.toInt, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicFloatLeftRight256Java7Suite extends ConcurrentAtomicSuite[Float, AtomicFloat]( @@ -1112,7 +1115,7 @@ object ConcurrentAtomicFloatLeftRight256Java7Suite LeftRight256, x => x.toFloat, x => x.toInt, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicDoubleLeftRight256Java7Suite extends ConcurrentAtomicSuite[Double, AtomicDouble]( @@ -1120,7 +1123,7 @@ object ConcurrentAtomicDoubleLeftRight256Java7Suite LeftRight256, x => x.toDouble, x => x.toInt, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicShortLeftRight256Java7Suite extends ConcurrentAtomicSuite[Short, AtomicShort]( @@ -1128,7 +1131,7 @@ object ConcurrentAtomicShortLeftRight256Java7Suite LeftRight256, x => x.toShort, x => x.toInt, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicByteLeftRight256Java7Suite extends ConcurrentAtomicSuite[Byte, AtomicByte]( @@ -1136,7 +1139,7 @@ object ConcurrentAtomicByteLeftRight256Java7Suite LeftRight256, x => x.toByte, x => x.toInt, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicCharLeftRight256Java7Suite extends ConcurrentAtomicSuite[Char, AtomicChar]( @@ -1144,7 +1147,7 @@ object ConcurrentAtomicCharLeftRight256Java7Suite LeftRight256, x => x.toChar, x => x.toInt, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicIntLeftRight256Java7Suite extends ConcurrentAtomicSuite[Int, AtomicInt]( @@ -1152,7 +1155,7 @@ object ConcurrentAtomicIntLeftRight256Java7Suite LeftRight256, x => x, x => x, - allowPlatformIntrinsics = false) + ) object ConcurrentAtomicLongLeftRight256Java7Suite extends ConcurrentAtomicSuite[Long, AtomicLong]( @@ -1160,4 +1163,4 @@ object ConcurrentAtomicLongLeftRight256Java7Suite LeftRight256, x => x.toLong, x => x.toInt, - allowPlatformIntrinsics = false) + ) diff --git a/monix-execution/shared/src/test/scala/monix/execution/atomic/AtomicNumberSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/atomic/AtomicNumberSuite.scala index 0b64b22f8..e6c434f26 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/atomic/AtomicNumberSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/atomic/AtomicNumberSuite.scala @@ -27,13 +27,13 @@ abstract class AtomicNumberSuite[A, R <: AtomicNumber[A]]( maxValue: A, minValue: A, hasOverflow: Boolean = true, - allowPlatformIntrinsics: Boolean, - allowUnsafe: Boolean)(implicit ev: Numeric[A]) + allowUnsafe: Boolean +)(implicit ev: Numeric[A]) extends SimpleTestSuite { def Atomic(initial: A): R = { if (allowUnsafe) - builder.buildInstance(initial, strategy, allowPlatformIntrinsics) + builder.buildInstance(initial, strategy) else builder.buildSafeInstance(initial, strategy) } @@ -339,7 +339,7 @@ abstract class AtomicNumberSuite[A, R <: AtomicNumber[A]]( } } -abstract class AtomicDoubleSuite(strategy: PaddingStrategy, allowPlatformIntrinsics: Boolean, allowUnsafe: Boolean) +abstract class AtomicDoubleSuite(strategy: PaddingStrategy, allowUnsafe: Boolean) extends AtomicNumberSuite[Double, AtomicDouble]( Atomic.builderFor(0.0), strategy, @@ -347,8 +347,8 @@ abstract class AtomicDoubleSuite(strategy: PaddingStrategy, allowPlatformIntrins Double.MaxValue, Double.MinValue, hasOverflow = false, - allowPlatformIntrinsics, - allowUnsafe) { + allowUnsafe + ) { test("should store MinPositiveValue, NaN, NegativeInfinity, PositiveInfinity") { assert(Atomic(Double.MinPositiveValue).get() == Double.MinPositiveValue) @@ -358,7 +358,7 @@ abstract class AtomicDoubleSuite(strategy: PaddingStrategy, allowPlatformIntrins } } -abstract class AtomicFloatSuite(strategy: PaddingStrategy, allowPlatformIntrinsics: Boolean, allowUnsafe: Boolean) +abstract class AtomicFloatSuite(strategy: PaddingStrategy, allowUnsafe: Boolean) extends AtomicNumberSuite[Float, AtomicFloat]( Atomic.builderFor(0.0f), strategy, @@ -366,8 +366,8 @@ abstract class AtomicFloatSuite(strategy: PaddingStrategy, allowPlatformIntrinsi Float.MaxValue, Float.MinValue, hasOverflow = false, - allowPlatformIntrinsics, - allowUnsafe) { + allowUnsafe + ) { test("should store MinPositiveValue, NaN, NegativeInfinity, PositiveInfinity") { assert(Atomic(Float.MinPositiveValue).get() == Float.MinPositiveValue) @@ -380,8 +380,8 @@ abstract class AtomicFloatSuite(strategy: PaddingStrategy, allowPlatformIntrinsi // -- NoPadding (Java 8) object AtomicDoubleNoPaddingSuite - extends AtomicDoubleSuite(NoPadding, allowPlatformIntrinsics = true, allowUnsafe = true) -object AtomicFloatNoPaddingSuite extends AtomicFloatSuite(NoPadding, allowPlatformIntrinsics = true, allowUnsafe = true) + extends AtomicDoubleSuite(NoPadding, allowUnsafe = true) +object AtomicFloatNoPaddingSuite extends AtomicFloatSuite(NoPadding, allowUnsafe = true) object AtomicLongNoPaddingSuite extends AtomicNumberSuite[Long, AtomicLong]( @@ -390,8 +390,8 @@ object AtomicLongNoPaddingSuite -782L, Long.MaxValue, Long.MinValue, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicIntNoPaddingSuite extends AtomicNumberSuite[Int, AtomicInt]( @@ -400,8 +400,8 @@ object AtomicIntNoPaddingSuite 782, Int.MaxValue, Int.MinValue, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicShortNoPaddingSuite extends AtomicNumberSuite[Short, AtomicShort]( @@ -410,8 +410,8 @@ object AtomicShortNoPaddingSuite 782.toShort, Short.MaxValue, Short.MinValue, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicByteNoPaddingSuite extends AtomicNumberSuite[Byte, AtomicByte]( @@ -420,8 +420,8 @@ object AtomicByteNoPaddingSuite 782.toByte, Byte.MaxValue, Byte.MinValue, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicCharNoPaddingSuite extends AtomicNumberSuite[Char, AtomicChar]( @@ -430,8 +430,8 @@ object AtomicCharNoPaddingSuite 782.toChar, Char.MaxValue, Char.MinValue, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicNumberAnyNoPaddingSuite extends AtomicNumberSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -440,13 +440,13 @@ object AtomicNumberAnyNoPaddingSuite BoxedLong(782), BoxedLong.MaxValue, BoxedLong.MinValue, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) // -- Left64 (Java 8) -object AtomicDoubleLeft64Suite extends AtomicDoubleSuite(Left64, allowPlatformIntrinsics = true, allowUnsafe = true) -object AtomicFloatLeft64Suite extends AtomicFloatSuite(Left64, allowPlatformIntrinsics = true, allowUnsafe = true) +object AtomicDoubleLeft64Suite extends AtomicDoubleSuite(Left64, allowUnsafe = true) +object AtomicFloatLeft64Suite extends AtomicFloatSuite(Left64, allowUnsafe = true) object AtomicLongLeft64Suite extends AtomicNumberSuite[Long, AtomicLong]( @@ -455,8 +455,8 @@ object AtomicLongLeft64Suite -782L, Long.MaxValue, Long.MinValue, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicIntLeft64Suite extends AtomicNumberSuite[Int, AtomicInt]( @@ -465,8 +465,8 @@ object AtomicIntLeft64Suite 782, Int.MaxValue, Int.MinValue, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicShortLeft64Suite extends AtomicNumberSuite[Short, AtomicShort]( @@ -475,8 +475,8 @@ object AtomicShortLeft64Suite 782.toShort, Short.MaxValue, Short.MinValue, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicByteLeft64Suite extends AtomicNumberSuite[Byte, AtomicByte]( @@ -485,8 +485,8 @@ object AtomicByteLeft64Suite 782.toByte, Byte.MaxValue, Byte.MinValue, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicCharLeft64Suite extends AtomicNumberSuite[Char, AtomicChar]( @@ -495,8 +495,8 @@ object AtomicCharLeft64Suite 782.toChar, Char.MaxValue, Char.MinValue, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicNumberAnyLeft64Suite extends AtomicNumberSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -505,13 +505,13 @@ object AtomicNumberAnyLeft64Suite BoxedLong(782), BoxedLong.MaxValue, BoxedLong.MinValue, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) // -- Right64 (Java 8) -object AtomicDoubleRight64Suite extends AtomicDoubleSuite(Right64, allowPlatformIntrinsics = true, allowUnsafe = true) -object AtomicFloatRight64Suite extends AtomicFloatSuite(Right64, allowPlatformIntrinsics = true, allowUnsafe = true) +object AtomicDoubleRight64Suite extends AtomicDoubleSuite(Right64, allowUnsafe = true) +object AtomicFloatRight64Suite extends AtomicFloatSuite(Right64, allowUnsafe = true) object AtomicLongRight64Suite extends AtomicNumberSuite[Long, AtomicLong]( @@ -520,8 +520,8 @@ object AtomicLongRight64Suite -782L, Long.MaxValue, Long.MinValue, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicIntRight64Suite extends AtomicNumberSuite[Int, AtomicInt]( @@ -530,8 +530,8 @@ object AtomicIntRight64Suite 782, Int.MaxValue, Int.MinValue, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicShortRight64Suite extends AtomicNumberSuite[Short, AtomicShort]( @@ -540,8 +540,8 @@ object AtomicShortRight64Suite 782.toShort, Short.MaxValue, Short.MinValue, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicByteRight64Suite extends AtomicNumberSuite[Byte, AtomicByte]( @@ -550,8 +550,8 @@ object AtomicByteRight64Suite 782.toByte, Byte.MaxValue, Byte.MinValue, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicCharRight64Suite extends AtomicNumberSuite[Char, AtomicChar]( @@ -560,8 +560,8 @@ object AtomicCharRight64Suite 782.toChar, Char.MaxValue, Char.MinValue, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicNumberAnyRight64Suite extends AtomicNumberSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -570,15 +570,15 @@ object AtomicNumberAnyRight64Suite BoxedLong(782), BoxedLong.MaxValue, BoxedLong.MinValue, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) // -- LeftRight128 (Java 8) object AtomicDoubleLeftRight128Suite - extends AtomicDoubleSuite(LeftRight128, allowPlatformIntrinsics = true, allowUnsafe = true) + extends AtomicDoubleSuite(LeftRight128, allowUnsafe = true) object AtomicFloatLeftRight128Suite - extends AtomicFloatSuite(LeftRight128, allowPlatformIntrinsics = true, allowUnsafe = true) + extends AtomicFloatSuite(LeftRight128, allowUnsafe = true) object AtomicLongLeftRight128Suite extends AtomicNumberSuite[Long, AtomicLong]( @@ -587,8 +587,8 @@ object AtomicLongLeftRight128Suite -782L, Long.MaxValue, Long.MinValue, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicIntLeftRight128Suite extends AtomicNumberSuite[Int, AtomicInt]( @@ -597,8 +597,8 @@ object AtomicIntLeftRight128Suite 782, Int.MaxValue, Int.MinValue, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicShortLeftRight128Suite extends AtomicNumberSuite[Short, AtomicShort]( @@ -607,8 +607,8 @@ object AtomicShortLeftRight128Suite 782.toShort, Short.MaxValue, Short.MinValue, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicByteLeftRight128Suite extends AtomicNumberSuite[Byte, AtomicByte]( @@ -617,8 +617,8 @@ object AtomicByteLeftRight128Suite 782.toByte, Byte.MaxValue, Byte.MinValue, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicCharLeftRight128Suite extends AtomicNumberSuite[Char, AtomicChar]( @@ -627,8 +627,8 @@ object AtomicCharLeftRight128Suite 782.toChar, Char.MaxValue, Char.MinValue, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicNumberAnyLeftRight128Suite extends AtomicNumberSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -637,13 +637,13 @@ object AtomicNumberAnyLeftRight128Suite BoxedLong(782), BoxedLong.MaxValue, BoxedLong.MinValue, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) // -- Left128 (Java 8) -object AtomicDoubleLeft128Suite extends AtomicDoubleSuite(Left128, allowPlatformIntrinsics = true, allowUnsafe = true) -object AtomicFloatLeft128Suite extends AtomicFloatSuite(Left128, allowPlatformIntrinsics = true, allowUnsafe = true) +object AtomicDoubleLeft128Suite extends AtomicDoubleSuite(Left128, allowUnsafe = true) +object AtomicFloatLeft128Suite extends AtomicFloatSuite(Left128, allowUnsafe = true) object AtomicLongLeft128Suite extends AtomicNumberSuite[Long, AtomicLong]( @@ -652,8 +652,8 @@ object AtomicLongLeft128Suite -782L, Long.MaxValue, Long.MinValue, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicIntLeft128Suite extends AtomicNumberSuite[Int, AtomicInt]( @@ -662,8 +662,8 @@ object AtomicIntLeft128Suite 782, Int.MaxValue, Int.MinValue, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicShortLeft128Suite extends AtomicNumberSuite[Short, AtomicShort]( @@ -672,8 +672,8 @@ object AtomicShortLeft128Suite 782.toShort, Short.MaxValue, Short.MinValue, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicByteLeft128Suite extends AtomicNumberSuite[Byte, AtomicByte]( @@ -682,8 +682,8 @@ object AtomicByteLeft128Suite 782.toByte, Byte.MaxValue, Byte.MinValue, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicCharLeft128Suite extends AtomicNumberSuite[Char, AtomicChar]( @@ -692,8 +692,8 @@ object AtomicCharLeft128Suite 782.toChar, Char.MaxValue, Char.MinValue, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicNumberAnyLeft128Suite extends AtomicNumberSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -702,13 +702,13 @@ object AtomicNumberAnyLeft128Suite BoxedLong(782), BoxedLong.MaxValue, BoxedLong.MinValue, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) // -- Right128 (Java 8) -object AtomicDoubleRight128Suite extends AtomicDoubleSuite(Right128, allowPlatformIntrinsics = true, allowUnsafe = true) -object AtomicFloatRight128Suite extends AtomicFloatSuite(Right128, allowPlatformIntrinsics = true, allowUnsafe = true) +object AtomicDoubleRight128Suite extends AtomicDoubleSuite(Right128, allowUnsafe = true) +object AtomicFloatRight128Suite extends AtomicFloatSuite(Right128, allowUnsafe = true) object AtomicLongRight128Suite extends AtomicNumberSuite[Long, AtomicLong]( @@ -717,8 +717,8 @@ object AtomicLongRight128Suite -782L, Long.MaxValue, Long.MinValue, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicIntRight128Suite extends AtomicNumberSuite[Int, AtomicInt]( @@ -727,8 +727,8 @@ object AtomicIntRight128Suite 782, Int.MaxValue, Int.MinValue, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicShortRight128Suite extends AtomicNumberSuite[Short, AtomicShort]( @@ -737,8 +737,8 @@ object AtomicShortRight128Suite 782.toShort, Short.MaxValue, Short.MinValue, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicByteRight128Suite extends AtomicNumberSuite[Byte, AtomicByte]( @@ -747,8 +747,8 @@ object AtomicByteRight128Suite 782.toByte, Byte.MaxValue, Byte.MinValue, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicCharRight128Suite extends AtomicNumberSuite[Char, AtomicChar]( @@ -757,8 +757,8 @@ object AtomicCharRight128Suite 782.toChar, Char.MaxValue, Char.MinValue, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicNumberAnyRight128Suite extends AtomicNumberSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -767,15 +767,15 @@ object AtomicNumberAnyRight128Suite BoxedLong(782), BoxedLong.MaxValue, BoxedLong.MinValue, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) // -- LeftRight256 (Java 8) object AtomicDoubleLeftRight256Suite - extends AtomicDoubleSuite(LeftRight256, allowPlatformIntrinsics = true, allowUnsafe = true) + extends AtomicDoubleSuite(LeftRight256, allowUnsafe = true) object AtomicFloatLeftRight256Suite - extends AtomicFloatSuite(LeftRight256, allowPlatformIntrinsics = true, allowUnsafe = true) + extends AtomicFloatSuite(LeftRight256, allowUnsafe = true) object AtomicLongLeftRight256Suite extends AtomicNumberSuite[Long, AtomicLong]( @@ -784,8 +784,8 @@ object AtomicLongLeftRight256Suite -782L, Long.MaxValue, Long.MinValue, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicIntLeftRight256Suite extends AtomicNumberSuite[Int, AtomicInt]( @@ -794,8 +794,8 @@ object AtomicIntLeftRight256Suite 782, Int.MaxValue, Int.MinValue, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicShortLeftRight256Suite extends AtomicNumberSuite[Short, AtomicShort]( @@ -804,8 +804,8 @@ object AtomicShortLeftRight256Suite 782.toShort, Short.MaxValue, Short.MinValue, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicByteLeftRight256Suite extends AtomicNumberSuite[Byte, AtomicByte]( @@ -814,8 +814,8 @@ object AtomicByteLeftRight256Suite 782.toByte, Byte.MaxValue, Byte.MinValue, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicCharLeftRight256Suite extends AtomicNumberSuite[Char, AtomicChar]( @@ -824,8 +824,8 @@ object AtomicCharLeftRight256Suite 782.toChar, Char.MaxValue, Char.MinValue, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicNumberAnyLeftRight256Suite extends AtomicNumberSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -834,17 +834,17 @@ object AtomicNumberAnyLeftRight256Suite BoxedLong(782), BoxedLong.MaxValue, BoxedLong.MinValue, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) // ------------------ Java 7 // -- NoPadding (Java 7) object AtomicDoubleNoPaddingJava7Suite - extends AtomicDoubleSuite(NoPadding, allowPlatformIntrinsics = false, allowUnsafe = true) + extends AtomicDoubleSuite(NoPadding, allowUnsafe = true) object AtomicFloatNoPaddingJava7Suite - extends AtomicFloatSuite(NoPadding, allowPlatformIntrinsics = false, allowUnsafe = true) + extends AtomicFloatSuite(NoPadding, allowUnsafe = true) object AtomicLongNoPaddingJava7Suite extends AtomicNumberSuite[Long, AtomicLong]( @@ -853,8 +853,8 @@ object AtomicLongNoPaddingJava7Suite -782L, Long.MaxValue, Long.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicIntNoPaddingJava7Suite extends AtomicNumberSuite[Int, AtomicInt]( @@ -863,8 +863,8 @@ object AtomicIntNoPaddingJava7Suite 782, Int.MaxValue, Int.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicShortNoPaddingJava7Suite extends AtomicNumberSuite[Short, AtomicShort]( @@ -873,8 +873,8 @@ object AtomicShortNoPaddingJava7Suite 782.toShort, Short.MaxValue, Short.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicByteNoPaddingJava7Suite extends AtomicNumberSuite[Byte, AtomicByte]( @@ -883,8 +883,8 @@ object AtomicByteNoPaddingJava7Suite 782.toByte, Byte.MaxValue, Byte.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicCharNoPaddingJava7Suite extends AtomicNumberSuite[Char, AtomicChar]( @@ -893,8 +893,8 @@ object AtomicCharNoPaddingJava7Suite 782.toChar, Char.MaxValue, Char.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicNumberAnyNoPaddingJava7Suite extends AtomicNumberSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -903,14 +903,14 @@ object AtomicNumberAnyNoPaddingJava7Suite BoxedLong(782), BoxedLong.MaxValue, BoxedLong.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) // -- Left64 (Java 7) object AtomicDoubleLeft64Java7Suite - extends AtomicDoubleSuite(Left64, allowPlatformIntrinsics = false, allowUnsafe = true) -object AtomicFloatLeft64Java7Suite extends AtomicFloatSuite(Left64, allowPlatformIntrinsics = false, allowUnsafe = true) + extends AtomicDoubleSuite(Left64, allowUnsafe = true) +object AtomicFloatLeft64Java7Suite extends AtomicFloatSuite(Left64, allowUnsafe = true) object AtomicLongLeft64Java7Suite extends AtomicNumberSuite[Long, AtomicLong]( @@ -919,8 +919,8 @@ object AtomicLongLeft64Java7Suite -782L, Long.MaxValue, Long.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicIntLeft64Java7Suite extends AtomicNumberSuite[Int, AtomicInt]( @@ -929,8 +929,8 @@ object AtomicIntLeft64Java7Suite 782, Int.MaxValue, Int.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicShortLeft64Java7Suite extends AtomicNumberSuite[Short, AtomicShort]( @@ -939,8 +939,8 @@ object AtomicShortLeft64Java7Suite 782.toShort, Short.MaxValue, Short.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicByteLeft64Java7Suite extends AtomicNumberSuite[Byte, AtomicByte]( @@ -949,8 +949,8 @@ object AtomicByteLeft64Java7Suite 782.toByte, Byte.MaxValue, Byte.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicCharLeft64Java7Suite extends AtomicNumberSuite[Char, AtomicChar]( @@ -959,8 +959,8 @@ object AtomicCharLeft64Java7Suite 782.toChar, Char.MaxValue, Char.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicNumberAnyLeft64Java7Suite extends AtomicNumberSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -969,15 +969,15 @@ object AtomicNumberAnyLeft64Java7Suite BoxedLong(782), BoxedLong.MaxValue, BoxedLong.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) // -- Right64 (Java 7) object AtomicDoubleRight64Java7Suite - extends AtomicDoubleSuite(Right64, allowPlatformIntrinsics = false, allowUnsafe = true) + extends AtomicDoubleSuite(Right64, allowUnsafe = true) object AtomicFloatRight64Java7Suite - extends AtomicFloatSuite(Right64, allowPlatformIntrinsics = false, allowUnsafe = true) + extends AtomicFloatSuite(Right64, allowUnsafe = true) object AtomicLongRight64Java7Suite extends AtomicNumberSuite[Long, AtomicLong]( @@ -986,8 +986,8 @@ object AtomicLongRight64Java7Suite -782L, Long.MaxValue, Long.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicIntRight64Java7Suite extends AtomicNumberSuite[Int, AtomicInt]( @@ -996,8 +996,8 @@ object AtomicIntRight64Java7Suite 782, Int.MaxValue, Int.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicShortRight64Java7Suite extends AtomicNumberSuite[Short, AtomicShort]( @@ -1006,8 +1006,8 @@ object AtomicShortRight64Java7Suite 782.toShort, Short.MaxValue, Short.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicByteRight64Java7Suite extends AtomicNumberSuite[Byte, AtomicByte]( @@ -1016,8 +1016,8 @@ object AtomicByteRight64Java7Suite 782.toByte, Byte.MaxValue, Byte.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicCharRight64Java7Suite extends AtomicNumberSuite[Char, AtomicChar]( @@ -1026,8 +1026,8 @@ object AtomicCharRight64Java7Suite 782.toChar, Char.MaxValue, Char.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicNumberAnyRight64Java7Suite extends AtomicNumberSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -1036,15 +1036,15 @@ object AtomicNumberAnyRight64Java7Suite BoxedLong(782), BoxedLong.MaxValue, BoxedLong.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) // -- LeftRight128 (Java 7) object AtomicDoubleLeftRight128Java7Suite - extends AtomicDoubleSuite(LeftRight128, allowPlatformIntrinsics = false, allowUnsafe = true) + extends AtomicDoubleSuite(LeftRight128, allowUnsafe = true) object AtomicFloatLeftRight128Java7Suite - extends AtomicFloatSuite(LeftRight128, allowPlatformIntrinsics = false, allowUnsafe = true) + extends AtomicFloatSuite(LeftRight128, allowUnsafe = true) object AtomicLongLeftRight128Java7Suite extends AtomicNumberSuite[Long, AtomicLong]( @@ -1053,8 +1053,8 @@ object AtomicLongLeftRight128Java7Suite -782L, Long.MaxValue, Long.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicIntLeftRight128Java7Suite extends AtomicNumberSuite[Int, AtomicInt]( @@ -1063,8 +1063,8 @@ object AtomicIntLeftRight128Java7Suite 782, Int.MaxValue, Int.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicShortLeftRight128Java7Suite extends AtomicNumberSuite[Short, AtomicShort]( @@ -1073,8 +1073,8 @@ object AtomicShortLeftRight128Java7Suite 782.toShort, Short.MaxValue, Short.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicByteLeftRight128Java7Suite extends AtomicNumberSuite[Byte, AtomicByte]( @@ -1083,8 +1083,8 @@ object AtomicByteLeftRight128Java7Suite 782.toByte, Byte.MaxValue, Byte.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicCharLeftRight128Java7Suite extends AtomicNumberSuite[Char, AtomicChar]( @@ -1093,8 +1093,8 @@ object AtomicCharLeftRight128Java7Suite 782.toChar, Char.MaxValue, Char.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicNumberAnyLeftRight128Java7Suite extends AtomicNumberSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -1103,15 +1103,15 @@ object AtomicNumberAnyLeftRight128Java7Suite BoxedLong(782), BoxedLong.MaxValue, BoxedLong.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) // -- Left128 (Java 7) object AtomicDoubleLeft128Java7Suite - extends AtomicDoubleSuite(Left128, allowPlatformIntrinsics = false, allowUnsafe = true) + extends AtomicDoubleSuite(Left128, allowUnsafe = true) object AtomicFloatLeft128Java7Suite - extends AtomicFloatSuite(Left128, allowPlatformIntrinsics = false, allowUnsafe = true) + extends AtomicFloatSuite(Left128, allowUnsafe = true) object AtomicLongLeft128Java7Suite extends AtomicNumberSuite[Long, AtomicLong]( @@ -1120,8 +1120,8 @@ object AtomicLongLeft128Java7Suite -782L, Long.MaxValue, Long.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicIntLeft128Java7Suite extends AtomicNumberSuite[Int, AtomicInt]( @@ -1130,8 +1130,8 @@ object AtomicIntLeft128Java7Suite 782, Int.MaxValue, Int.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicShortLeft128Java7Suite extends AtomicNumberSuite[Short, AtomicShort]( @@ -1140,8 +1140,8 @@ object AtomicShortLeft128Java7Suite 782.toShort, Short.MaxValue, Short.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicByteLeft128Java7Suite extends AtomicNumberSuite[Byte, AtomicByte]( @@ -1150,8 +1150,8 @@ object AtomicByteLeft128Java7Suite 782.toByte, Byte.MaxValue, Byte.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicCharLeft128Java7Suite extends AtomicNumberSuite[Char, AtomicChar]( @@ -1160,8 +1160,8 @@ object AtomicCharLeft128Java7Suite 782.toChar, Char.MaxValue, Char.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicNumberAnyLeft128Java7Suite extends AtomicNumberSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -1170,15 +1170,15 @@ object AtomicNumberAnyLeft128Java7Suite BoxedLong(782), BoxedLong.MaxValue, BoxedLong.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) // -- Right128 (Java 7) object AtomicDoubleRight128Java7Suite - extends AtomicDoubleSuite(Right128, allowPlatformIntrinsics = false, allowUnsafe = true) + extends AtomicDoubleSuite(Right128, allowUnsafe = true) object AtomicFloatRight128Java7Suite - extends AtomicFloatSuite(Right128, allowPlatformIntrinsics = false, allowUnsafe = true) + extends AtomicFloatSuite(Right128, allowUnsafe = true) object AtomicLongRight128Java7Suite extends AtomicNumberSuite[Long, AtomicLong]( @@ -1187,8 +1187,8 @@ object AtomicLongRight128Java7Suite -782L, Long.MaxValue, Long.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicIntRight128Java7Suite extends AtomicNumberSuite[Int, AtomicInt]( @@ -1197,8 +1197,8 @@ object AtomicIntRight128Java7Suite 782, Int.MaxValue, Int.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicShortRight128Java7Suite extends AtomicNumberSuite[Short, AtomicShort]( @@ -1207,8 +1207,8 @@ object AtomicShortRight128Java7Suite 782.toShort, Short.MaxValue, Short.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicByteRight128Java7Suite extends AtomicNumberSuite[Byte, AtomicByte]( @@ -1217,8 +1217,8 @@ object AtomicByteRight128Java7Suite 782.toByte, Byte.MaxValue, Byte.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicCharRight128Java7Suite extends AtomicNumberSuite[Char, AtomicChar]( @@ -1227,8 +1227,8 @@ object AtomicCharRight128Java7Suite 782.toChar, Char.MaxValue, Char.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicNumberAnyRight128Java7Suite extends AtomicNumberSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -1237,15 +1237,15 @@ object AtomicNumberAnyRight128Java7Suite BoxedLong(782), BoxedLong.MaxValue, BoxedLong.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) // -- LeftRight256 (Java 7) object AtomicDoubleLeftRight256Java7Suite - extends AtomicDoubleSuite(LeftRight256, allowPlatformIntrinsics = false, allowUnsafe = true) + extends AtomicDoubleSuite(LeftRight256, allowUnsafe = true) object AtomicFloatLeftRight256Java7Suite - extends AtomicFloatSuite(LeftRight256, allowPlatformIntrinsics = false, allowUnsafe = true) + extends AtomicFloatSuite(LeftRight256, allowUnsafe = true) object AtomicLongLeftRight256Java7Suite extends AtomicNumberSuite[Long, AtomicLong]( @@ -1254,8 +1254,8 @@ object AtomicLongLeftRight256Java7Suite -782L, Long.MaxValue, Long.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicIntLeftRight256Java7Suite extends AtomicNumberSuite[Int, AtomicInt]( @@ -1264,8 +1264,8 @@ object AtomicIntLeftRight256Java7Suite 782, Int.MaxValue, Int.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicShortLeftRight256Java7Suite extends AtomicNumberSuite[Short, AtomicShort]( @@ -1274,8 +1274,8 @@ object AtomicShortLeftRight256Java7Suite 782.toShort, Short.MaxValue, Short.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicByteLeftRight256Java7Suite extends AtomicNumberSuite[Byte, AtomicByte]( @@ -1284,8 +1284,8 @@ object AtomicByteLeftRight256Java7Suite 782.toByte, Byte.MaxValue, Byte.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicCharLeftRight256Java7Suite extends AtomicNumberSuite[Char, AtomicChar]( @@ -1294,8 +1294,8 @@ object AtomicCharLeftRight256Java7Suite 782.toChar, Char.MaxValue, Char.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object AtomicNumberAnyLeftRight256Java7Suite extends AtomicNumberSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -1304,17 +1304,17 @@ object AtomicNumberAnyLeftRight256Java7Suite BoxedLong(782), BoxedLong.MaxValue, BoxedLong.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) // ------------------ Java X // -- NoPadding (Java X) object AtomicDoubleNoPaddingJavaXSuite - extends AtomicDoubleSuite(NoPadding, allowPlatformIntrinsics = false, allowUnsafe = false) + extends AtomicDoubleSuite(NoPadding, allowUnsafe = false) object AtomicFloatNoPaddingJavaXSuite - extends AtomicFloatSuite(NoPadding, allowPlatformIntrinsics = false, allowUnsafe = false) + extends AtomicFloatSuite(NoPadding, allowUnsafe = false) object AtomicLongNoPaddingJavaXSuite extends AtomicNumberSuite[Long, AtomicLong]( @@ -1323,8 +1323,8 @@ object AtomicLongNoPaddingJavaXSuite -782L, Long.MaxValue, Long.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicIntNoPaddingJavaXSuite extends AtomicNumberSuite[Int, AtomicInt]( @@ -1333,8 +1333,8 @@ object AtomicIntNoPaddingJavaXSuite 782, Int.MaxValue, Int.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicShortNoPaddingJavaXSuite extends AtomicNumberSuite[Short, AtomicShort]( @@ -1343,8 +1343,8 @@ object AtomicShortNoPaddingJavaXSuite 782.toShort, Short.MaxValue, Short.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicByteNoPaddingJavaXSuite extends AtomicNumberSuite[Byte, AtomicByte]( @@ -1353,8 +1353,8 @@ object AtomicByteNoPaddingJavaXSuite 782.toByte, Byte.MaxValue, Byte.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicCharNoPaddingJavaXSuite extends AtomicNumberSuite[Char, AtomicChar]( @@ -1363,8 +1363,8 @@ object AtomicCharNoPaddingJavaXSuite 782.toChar, Char.MaxValue, Char.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicNumberAnyNoPaddingJavaXSuite extends AtomicNumberSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -1373,15 +1373,15 @@ object AtomicNumberAnyNoPaddingJavaXSuite BoxedLong(782), BoxedLong.MaxValue, BoxedLong.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) // -- Left64 (Java X) object AtomicDoubleLeft64JavaXSuite - extends AtomicDoubleSuite(Left64, allowPlatformIntrinsics = false, allowUnsafe = false) + extends AtomicDoubleSuite(Left64, allowUnsafe = false) object AtomicFloatLeft64JavaXSuite - extends AtomicFloatSuite(Left64, allowPlatformIntrinsics = false, allowUnsafe = false) + extends AtomicFloatSuite(Left64, allowUnsafe = false) object AtomicLongLeft64JavaXSuite extends AtomicNumberSuite[Long, AtomicLong]( @@ -1390,8 +1390,8 @@ object AtomicLongLeft64JavaXSuite -782L, Long.MaxValue, Long.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicIntLeft64JavaXSuite extends AtomicNumberSuite[Int, AtomicInt]( @@ -1400,8 +1400,8 @@ object AtomicIntLeft64JavaXSuite 782, Int.MaxValue, Int.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicShortLeft64JavaXSuite extends AtomicNumberSuite[Short, AtomicShort]( @@ -1410,8 +1410,8 @@ object AtomicShortLeft64JavaXSuite 782.toShort, Short.MaxValue, Short.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicByteLeft64JavaXSuite extends AtomicNumberSuite[Byte, AtomicByte]( @@ -1420,8 +1420,8 @@ object AtomicByteLeft64JavaXSuite 782.toByte, Byte.MaxValue, Byte.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicCharLeft64JavaXSuite extends AtomicNumberSuite[Char, AtomicChar]( @@ -1430,8 +1430,8 @@ object AtomicCharLeft64JavaXSuite 782.toChar, Char.MaxValue, Char.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicNumberAnyLeft64JavaXSuite extends AtomicNumberSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -1440,15 +1440,15 @@ object AtomicNumberAnyLeft64JavaXSuite BoxedLong(782), BoxedLong.MaxValue, BoxedLong.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) // -- Right64 (Java X) object AtomicDoubleRight64JavaXSuite - extends AtomicDoubleSuite(Right64, allowPlatformIntrinsics = false, allowUnsafe = false) + extends AtomicDoubleSuite(Right64, allowUnsafe = false) object AtomicFloatRight64JavaXSuite - extends AtomicFloatSuite(Right64, allowPlatformIntrinsics = false, allowUnsafe = false) + extends AtomicFloatSuite(Right64, allowUnsafe = false) object AtomicLongRight64JavaXSuite extends AtomicNumberSuite[Long, AtomicLong]( @@ -1457,8 +1457,8 @@ object AtomicLongRight64JavaXSuite -782L, Long.MaxValue, Long.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicIntRight64JavaXSuite extends AtomicNumberSuite[Int, AtomicInt]( @@ -1467,8 +1467,8 @@ object AtomicIntRight64JavaXSuite 782, Int.MaxValue, Int.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicShortRight64JavaXSuite extends AtomicNumberSuite[Short, AtomicShort]( @@ -1477,8 +1477,8 @@ object AtomicShortRight64JavaXSuite 782.toShort, Short.MaxValue, Short.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicByteRight64JavaXSuite extends AtomicNumberSuite[Byte, AtomicByte]( @@ -1487,8 +1487,8 @@ object AtomicByteRight64JavaXSuite 782.toByte, Byte.MaxValue, Byte.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicCharRight64JavaXSuite extends AtomicNumberSuite[Char, AtomicChar]( @@ -1497,8 +1497,8 @@ object AtomicCharRight64JavaXSuite 782.toChar, Char.MaxValue, Char.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicNumberAnyRight64JavaXSuite extends AtomicNumberSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -1507,15 +1507,15 @@ object AtomicNumberAnyRight64JavaXSuite BoxedLong(782), BoxedLong.MaxValue, BoxedLong.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) // -- LeftRight128 (Java X) object AtomicDoubleLeftRight128JavaXSuite - extends AtomicDoubleSuite(LeftRight128, allowPlatformIntrinsics = false, allowUnsafe = false) + extends AtomicDoubleSuite(LeftRight128, allowUnsafe = false) object AtomicFloatLeftRight128JavaXSuite - extends AtomicFloatSuite(LeftRight128, allowPlatformIntrinsics = false, allowUnsafe = false) + extends AtomicFloatSuite(LeftRight128, allowUnsafe = false) object AtomicLongLeftRight128JavaXSuite extends AtomicNumberSuite[Long, AtomicLong]( @@ -1524,8 +1524,8 @@ object AtomicLongLeftRight128JavaXSuite -782L, Long.MaxValue, Long.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicIntLeftRight128JavaXSuite extends AtomicNumberSuite[Int, AtomicInt]( @@ -1534,8 +1534,8 @@ object AtomicIntLeftRight128JavaXSuite 782, Int.MaxValue, Int.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicShortLeftRight128JavaXSuite extends AtomicNumberSuite[Short, AtomicShort]( @@ -1544,8 +1544,8 @@ object AtomicShortLeftRight128JavaXSuite 782.toShort, Short.MaxValue, Short.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicByteLeftRight128JavaXSuite extends AtomicNumberSuite[Byte, AtomicByte]( @@ -1554,8 +1554,8 @@ object AtomicByteLeftRight128JavaXSuite 782.toByte, Byte.MaxValue, Byte.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicCharLeftRight128JavaXSuite extends AtomicNumberSuite[Char, AtomicChar]( @@ -1564,8 +1564,8 @@ object AtomicCharLeftRight128JavaXSuite 782.toChar, Char.MaxValue, Char.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicNumberAnyLeftRight128JavaXSuite extends AtomicNumberSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -1574,15 +1574,15 @@ object AtomicNumberAnyLeftRight128JavaXSuite BoxedLong(782), BoxedLong.MaxValue, BoxedLong.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) // -- Left128 (Java X) object AtomicDoubleLeft128JavaXSuite - extends AtomicDoubleSuite(Left128, allowPlatformIntrinsics = false, allowUnsafe = false) + extends AtomicDoubleSuite(Left128, allowUnsafe = false) object AtomicFloatLeft128JavaXSuite - extends AtomicFloatSuite(Left128, allowPlatformIntrinsics = false, allowUnsafe = false) + extends AtomicFloatSuite(Left128, allowUnsafe = false) object AtomicLongLeft128JavaXSuite extends AtomicNumberSuite[Long, AtomicLong]( @@ -1591,8 +1591,8 @@ object AtomicLongLeft128JavaXSuite -782L, Long.MaxValue, Long.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicIntLeft128JavaXSuite extends AtomicNumberSuite[Int, AtomicInt]( @@ -1601,8 +1601,8 @@ object AtomicIntLeft128JavaXSuite 782, Int.MaxValue, Int.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicShortLeft128JavaXSuite extends AtomicNumberSuite[Short, AtomicShort]( @@ -1611,8 +1611,8 @@ object AtomicShortLeft128JavaXSuite 782.toShort, Short.MaxValue, Short.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicByteLeft128JavaXSuite extends AtomicNumberSuite[Byte, AtomicByte]( @@ -1621,8 +1621,8 @@ object AtomicByteLeft128JavaXSuite 782.toByte, Byte.MaxValue, Byte.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicCharLeft128JavaXSuite extends AtomicNumberSuite[Char, AtomicChar]( @@ -1631,8 +1631,8 @@ object AtomicCharLeft128JavaXSuite 782.toChar, Char.MaxValue, Char.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicNumberAnyLeft128JavaXSuite extends AtomicNumberSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -1641,15 +1641,15 @@ object AtomicNumberAnyLeft128JavaXSuite BoxedLong(782), BoxedLong.MaxValue, BoxedLong.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) // -- Right128 (Java X) object AtomicDoubleRight128JavaXSuite - extends AtomicDoubleSuite(Right128, allowPlatformIntrinsics = false, allowUnsafe = false) + extends AtomicDoubleSuite(Right128, allowUnsafe = false) object AtomicFloatRight128JavaXSuite - extends AtomicFloatSuite(Right128, allowPlatformIntrinsics = false, allowUnsafe = false) + extends AtomicFloatSuite(Right128, allowUnsafe = false) object AtomicLongRight128JavaXSuite extends AtomicNumberSuite[Long, AtomicLong]( @@ -1658,8 +1658,8 @@ object AtomicLongRight128JavaXSuite -782L, Long.MaxValue, Long.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicIntRight128JavaXSuite extends AtomicNumberSuite[Int, AtomicInt]( @@ -1668,8 +1668,8 @@ object AtomicIntRight128JavaXSuite 782, Int.MaxValue, Int.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicShortRight128JavaXSuite extends AtomicNumberSuite[Short, AtomicShort]( @@ -1678,8 +1678,8 @@ object AtomicShortRight128JavaXSuite 782.toShort, Short.MaxValue, Short.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicByteRight128JavaXSuite extends AtomicNumberSuite[Byte, AtomicByte]( @@ -1688,8 +1688,8 @@ object AtomicByteRight128JavaXSuite 782.toByte, Byte.MaxValue, Byte.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicCharRight128JavaXSuite extends AtomicNumberSuite[Char, AtomicChar]( @@ -1698,8 +1698,8 @@ object AtomicCharRight128JavaXSuite 782.toChar, Char.MaxValue, Char.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicNumberAnyRight128JavaXSuite extends AtomicNumberSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -1708,15 +1708,15 @@ object AtomicNumberAnyRight128JavaXSuite BoxedLong(782), BoxedLong.MaxValue, BoxedLong.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) // -- LeftRight256 (Java X) object AtomicDoubleLeftRight256JavaXSuite - extends AtomicDoubleSuite(LeftRight256, allowPlatformIntrinsics = false, allowUnsafe = false) + extends AtomicDoubleSuite(LeftRight256, allowUnsafe = false) object AtomicFloatLeftRight256JavaXSuite - extends AtomicFloatSuite(LeftRight256, allowPlatformIntrinsics = false, allowUnsafe = false) + extends AtomicFloatSuite(LeftRight256, allowUnsafe = false) object AtomicLongLeftRight256JavaXSuite extends AtomicNumberSuite[Long, AtomicLong]( @@ -1725,8 +1725,8 @@ object AtomicLongLeftRight256JavaXSuite -782L, Long.MaxValue, Long.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicIntLeftRight256JavaXSuite extends AtomicNumberSuite[Int, AtomicInt]( @@ -1735,8 +1735,8 @@ object AtomicIntLeftRight256JavaXSuite 782, Int.MaxValue, Int.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicShortLeftRight256JavaXSuite extends AtomicNumberSuite[Short, AtomicShort]( @@ -1745,8 +1745,8 @@ object AtomicShortLeftRight256JavaXSuite 782.toShort, Short.MaxValue, Short.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicByteLeftRight256JavaXSuite extends AtomicNumberSuite[Byte, AtomicByte]( @@ -1755,8 +1755,8 @@ object AtomicByteLeftRight256JavaXSuite 782.toByte, Byte.MaxValue, Byte.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicCharLeftRight256JavaXSuite extends AtomicNumberSuite[Char, AtomicChar]( @@ -1765,8 +1765,8 @@ object AtomicCharLeftRight256JavaXSuite 782.toChar, Char.MaxValue, Char.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object AtomicNumberAnyLeftRight256JavaXSuite extends AtomicNumberSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -1775,5 +1775,5 @@ object AtomicNumberAnyLeftRight256JavaXSuite BoxedLong(782), BoxedLong.MaxValue, BoxedLong.MinValue, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) diff --git a/monix-execution/shared/src/test/scala/monix/execution/atomic/GenericAtomicSuite.scala b/monix-execution/shared/src/test/scala/monix/execution/atomic/GenericAtomicSuite.scala index 2c23d76b1..7a2005a9e 100644 --- a/monix-execution/shared/src/test/scala/monix/execution/atomic/GenericAtomicSuite.scala +++ b/monix-execution/shared/src/test/scala/monix/execution/atomic/GenericAtomicSuite.scala @@ -27,13 +27,12 @@ abstract class GenericAtomicSuite[A, R <: Atomic[A]]( strategy: PaddingStrategy, valueFromInt: Int => A, valueToInt: A => Int, - allowPlatformIntrinsics: Boolean, - allowUnsafe: Boolean) - extends SimpleTestSuite { + allowUnsafe: Boolean +) extends SimpleTestSuite { def Atomic(initial: A): R = { if (allowUnsafe) - builder.buildInstance(initial, strategy, allowPlatformIntrinsics) + builder.buildInstance(initial, strategy) else builder.buildSafeInstance(initial, strategy) } @@ -291,8 +290,8 @@ object GenericAtomicAnyNoPadding NoPadding, x => x.toString, x => x.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicBooleanNoPadding extends GenericAtomicSuite[Boolean, AtomicBoolean]( @@ -300,8 +299,8 @@ object GenericAtomicBooleanNoPadding NoPadding, x => if (x == 1) true else false, x => if (x) 1 else 0, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicNumberAnyNoPadding extends GenericAtomicSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -309,8 +308,8 @@ object GenericAtomicNumberAnyNoPadding NoPadding, x => BoxedLong(x.toLong), x => x.value.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicFloatNoPadding extends GenericAtomicSuite[Float, AtomicFloat]( @@ -318,8 +317,8 @@ object GenericAtomicFloatNoPadding NoPadding, x => x.toFloat, x => x.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicDoubleNoPadding extends GenericAtomicSuite[Double, AtomicDouble]( @@ -327,8 +326,8 @@ object GenericAtomicDoubleNoPadding NoPadding, x => x.toDouble, x => x.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicShortNoPadding extends GenericAtomicSuite[Short, AtomicShort]( @@ -336,8 +335,8 @@ object GenericAtomicShortNoPadding NoPadding, x => x.toShort, x => x.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicByteNoPadding extends GenericAtomicSuite[Byte, AtomicByte]( @@ -345,8 +344,8 @@ object GenericAtomicByteNoPadding NoPadding, x => x.toByte, x => x.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicCharNoPadding extends GenericAtomicSuite[Char, AtomicChar]( @@ -354,8 +353,8 @@ object GenericAtomicCharNoPadding NoPadding, x => x.toChar, x => x.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicIntNoPadding extends GenericAtomicSuite[Int, AtomicInt]( @@ -363,8 +362,8 @@ object GenericAtomicIntNoPadding NoPadding, x => x, x => x, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicLongNoPadding extends GenericAtomicSuite[Long, AtomicLong]( @@ -372,8 +371,8 @@ object GenericAtomicLongNoPadding NoPadding, x => x.toLong, x => x.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) // -- Left64 (Java 8) @@ -383,8 +382,8 @@ object GenericAtomicAnyLeft64 Left64, x => x.toString, x => x.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicBooleanLeft64 extends GenericAtomicSuite[Boolean, AtomicBoolean]( @@ -392,8 +391,8 @@ object GenericAtomicBooleanLeft64 Left64, x => if (x == 1) true else false, x => if (x) 1 else 0, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicNumberAnyLeft64 extends GenericAtomicSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -401,8 +400,8 @@ object GenericAtomicNumberAnyLeft64 Left64, x => BoxedLong(x.toLong), x => x.value.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicFloatLeft64 extends GenericAtomicSuite[Float, AtomicFloat]( @@ -410,8 +409,8 @@ object GenericAtomicFloatLeft64 Left64, x => x.toFloat, x => x.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicDoubleLeft64 extends GenericAtomicSuite[Double, AtomicDouble]( @@ -419,8 +418,8 @@ object GenericAtomicDoubleLeft64 Left64, x => x.toDouble, x => x.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicShortLeft64 extends GenericAtomicSuite[Short, AtomicShort]( @@ -428,8 +427,8 @@ object GenericAtomicShortLeft64 Left64, x => x.toShort, x => x.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicByteLeft64 extends GenericAtomicSuite[Byte, AtomicByte]( @@ -437,8 +436,8 @@ object GenericAtomicByteLeft64 Left64, x => x.toByte, x => x.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicCharLeft64 extends GenericAtomicSuite[Char, AtomicChar]( @@ -446,8 +445,8 @@ object GenericAtomicCharLeft64 Left64, x => x.toChar, x => x.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicIntLeft64 extends GenericAtomicSuite[Int, AtomicInt]( @@ -455,8 +454,8 @@ object GenericAtomicIntLeft64 Left64, x => x, x => x, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicLongLeft64 extends GenericAtomicSuite[Long, AtomicLong]( @@ -464,8 +463,8 @@ object GenericAtomicLongLeft64 Left64, x => x.toLong, x => x.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) // -- Right64 (Java 8) @@ -475,8 +474,8 @@ object GenericAtomicAnyRight64 Right64, x => x.toString, x => x.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicBooleanRight64 extends GenericAtomicSuite[Boolean, AtomicBoolean]( @@ -484,8 +483,8 @@ object GenericAtomicBooleanRight64 Right64, x => if (x == 1) true else false, x => if (x) 1 else 0, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicNumberAnyRight64 extends GenericAtomicSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -493,8 +492,8 @@ object GenericAtomicNumberAnyRight64 Right64, x => BoxedLong(x.toLong), x => x.value.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicFloatRight64 extends GenericAtomicSuite[Float, AtomicFloat]( @@ -502,8 +501,8 @@ object GenericAtomicFloatRight64 Right64, x => x.toFloat, x => x.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicDoubleRight64 extends GenericAtomicSuite[Double, AtomicDouble]( @@ -511,8 +510,8 @@ object GenericAtomicDoubleRight64 Right64, x => x.toDouble, x => x.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicShortRight64 extends GenericAtomicSuite[Short, AtomicShort]( @@ -520,8 +519,8 @@ object GenericAtomicShortRight64 Right64, x => x.toShort, x => x.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicByteRight64 extends GenericAtomicSuite[Byte, AtomicByte]( @@ -529,8 +528,8 @@ object GenericAtomicByteRight64 Right64, x => x.toByte, x => x.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicCharRight64 extends GenericAtomicSuite[Char, AtomicChar]( @@ -538,8 +537,8 @@ object GenericAtomicCharRight64 Right64, x => x.toChar, x => x.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicIntRight64 extends GenericAtomicSuite[Int, AtomicInt]( @@ -547,8 +546,8 @@ object GenericAtomicIntRight64 Right64, x => x, x => x, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicLongRight64 extends GenericAtomicSuite[Long, AtomicLong]( @@ -556,8 +555,8 @@ object GenericAtomicLongRight64 Right64, x => x.toLong, x => x.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) // -- LeftRight128 (Java 8) @@ -567,8 +566,8 @@ object GenericAtomicAnyLeftRight128 LeftRight128, x => x.toString, x => x.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicBooleanLeftRight128 extends GenericAtomicSuite[Boolean, AtomicBoolean]( @@ -576,8 +575,8 @@ object GenericAtomicBooleanLeftRight128 LeftRight128, x => if (x == 1) true else false, x => if (x) 1 else 0, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicNumberAnyLeftRight128 extends GenericAtomicSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -585,8 +584,8 @@ object GenericAtomicNumberAnyLeftRight128 LeftRight128, x => BoxedLong(x.toLong), x => x.value.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicFloatLeftRight128 extends GenericAtomicSuite[Float, AtomicFloat]( @@ -594,8 +593,8 @@ object GenericAtomicFloatLeftRight128 LeftRight128, x => x.toFloat, x => x.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicDoubleLeftRight128 extends GenericAtomicSuite[Double, AtomicDouble]( @@ -603,8 +602,8 @@ object GenericAtomicDoubleLeftRight128 LeftRight128, x => x.toDouble, x => x.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicShortLeftRight128 extends GenericAtomicSuite[Short, AtomicShort]( @@ -612,8 +611,8 @@ object GenericAtomicShortLeftRight128 LeftRight128, x => x.toShort, x => x.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicByteLeftRight128 extends GenericAtomicSuite[Byte, AtomicByte]( @@ -621,8 +620,8 @@ object GenericAtomicByteLeftRight128 LeftRight128, x => x.toByte, x => x.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicCharLeftRight128 extends GenericAtomicSuite[Char, AtomicChar]( @@ -630,8 +629,8 @@ object GenericAtomicCharLeftRight128 LeftRight128, x => x.toChar, x => x.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicIntLeftRight128 extends GenericAtomicSuite[Int, AtomicInt]( @@ -639,8 +638,8 @@ object GenericAtomicIntLeftRight128 LeftRight128, x => x, x => x, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicLongLeftRight128 extends GenericAtomicSuite[Long, AtomicLong]( @@ -648,8 +647,8 @@ object GenericAtomicLongLeftRight128 LeftRight128, x => x.toLong, x => x.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) // -- Left128 (Java 8) @@ -659,8 +658,8 @@ object GenericAtomicAnyLeft128 Left128, x => x.toString, x => x.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicBooleanLeft128 extends GenericAtomicSuite[Boolean, AtomicBoolean]( @@ -668,8 +667,8 @@ object GenericAtomicBooleanLeft128 Left128, x => if (x == 1) true else false, x => if (x) 1 else 0, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicNumberAnyLeft128 extends GenericAtomicSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -677,8 +676,8 @@ object GenericAtomicNumberAnyLeft128 Left128, x => BoxedLong(x.toLong), x => x.value.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicFloatLeft128 extends GenericAtomicSuite[Float, AtomicFloat]( @@ -686,8 +685,8 @@ object GenericAtomicFloatLeft128 Left128, x => x.toFloat, x => x.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicDoubleLeft128 extends GenericAtomicSuite[Double, AtomicDouble]( @@ -695,8 +694,8 @@ object GenericAtomicDoubleLeft128 Left128, x => x.toDouble, x => x.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicShortLeft128 extends GenericAtomicSuite[Short, AtomicShort]( @@ -704,8 +703,8 @@ object GenericAtomicShortLeft128 Left128, x => x.toShort, x => x.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicByteLeft128 extends GenericAtomicSuite[Byte, AtomicByte]( @@ -713,8 +712,8 @@ object GenericAtomicByteLeft128 Left128, x => x.toByte, x => x.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicCharLeft128 extends GenericAtomicSuite[Char, AtomicChar]( @@ -722,8 +721,8 @@ object GenericAtomicCharLeft128 Left128, x => x.toChar, x => x.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicIntLeft128 extends GenericAtomicSuite[Int, AtomicInt]( @@ -731,8 +730,8 @@ object GenericAtomicIntLeft128 Left128, x => x, x => x, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicLongLeft128 extends GenericAtomicSuite[Long, AtomicLong]( @@ -740,8 +739,8 @@ object GenericAtomicLongLeft128 Left128, x => x.toLong, x => x.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) // -- Right128 (Java 8) @@ -751,8 +750,8 @@ object GenericAtomicAnyRight128 Right128, x => x.toString, x => x.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicBooleanRight128 extends GenericAtomicSuite[Boolean, AtomicBoolean]( @@ -760,8 +759,8 @@ object GenericAtomicBooleanRight128 Right128, x => if (x == 1) true else false, x => if (x) 1 else 0, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicNumberAnyRight128 extends GenericAtomicSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -769,8 +768,8 @@ object GenericAtomicNumberAnyRight128 Right128, x => BoxedLong(x.toLong), x => x.value.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicFloatRight128 extends GenericAtomicSuite[Float, AtomicFloat]( @@ -778,8 +777,8 @@ object GenericAtomicFloatRight128 Right128, x => x.toFloat, x => x.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicDoubleRight128 extends GenericAtomicSuite[Double, AtomicDouble]( @@ -787,8 +786,8 @@ object GenericAtomicDoubleRight128 Right128, x => x.toDouble, x => x.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicShortRight128 extends GenericAtomicSuite[Short, AtomicShort]( @@ -796,8 +795,8 @@ object GenericAtomicShortRight128 Right128, x => x.toShort, x => x.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicByteRight128 extends GenericAtomicSuite[Byte, AtomicByte]( @@ -805,8 +804,8 @@ object GenericAtomicByteRight128 Right128, x => x.toByte, x => x.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicCharRight128 extends GenericAtomicSuite[Char, AtomicChar]( @@ -814,8 +813,8 @@ object GenericAtomicCharRight128 Right128, x => x.toChar, x => x.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicIntRight128 extends GenericAtomicSuite[Int, AtomicInt]( @@ -823,8 +822,8 @@ object GenericAtomicIntRight128 Right128, x => x, x => x, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicLongRight128 extends GenericAtomicSuite[Long, AtomicLong]( @@ -832,8 +831,8 @@ object GenericAtomicLongRight128 Right128, x => x.toLong, x => x.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) // -- LeftRight256 (Java 8) @@ -843,8 +842,8 @@ object GenericAtomicAnyLeftRight256 LeftRight256, x => x.toString, x => x.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicBooleanLeftRight256 extends GenericAtomicSuite[Boolean, AtomicBoolean]( @@ -852,8 +851,8 @@ object GenericAtomicBooleanLeftRight256 LeftRight256, x => if (x == 1) true else false, x => if (x) 1 else 0, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicNumberAnyLeftRight256 extends GenericAtomicSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -861,8 +860,8 @@ object GenericAtomicNumberAnyLeftRight256 LeftRight256, x => BoxedLong(x.toLong), x => x.value.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicFloatLeftRight256 extends GenericAtomicSuite[Float, AtomicFloat]( @@ -870,8 +869,8 @@ object GenericAtomicFloatLeftRight256 LeftRight256, x => x.toFloat, x => x.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicDoubleLeftRight256 extends GenericAtomicSuite[Double, AtomicDouble]( @@ -879,8 +878,8 @@ object GenericAtomicDoubleLeftRight256 LeftRight256, x => x.toDouble, x => x.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicShortLeftRight256 extends GenericAtomicSuite[Short, AtomicShort]( @@ -888,8 +887,8 @@ object GenericAtomicShortLeftRight256 LeftRight256, x => x.toShort, x => x.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicByteLeftRight256 extends GenericAtomicSuite[Byte, AtomicByte]( @@ -897,8 +896,8 @@ object GenericAtomicByteLeftRight256 LeftRight256, x => x.toByte, x => x.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicCharLeftRight256 extends GenericAtomicSuite[Char, AtomicChar]( @@ -906,8 +905,8 @@ object GenericAtomicCharLeftRight256 LeftRight256, x => x.toChar, x => x.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicIntLeftRight256 extends GenericAtomicSuite[Int, AtomicInt]( @@ -915,8 +914,8 @@ object GenericAtomicIntLeftRight256 LeftRight256, x => x, x => x, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicLongLeftRight256 extends GenericAtomicSuite[Long, AtomicLong]( @@ -924,8 +923,8 @@ object GenericAtomicLongLeftRight256 LeftRight256, x => x.toLong, x => x.toInt, - allowPlatformIntrinsics = true, - allowUnsafe = true) + allowUnsafe = true + ) // ----------------- Java 7 @@ -937,8 +936,8 @@ object GenericAtomicAnyNoPaddingJava7Suite NoPadding, x => x.toString, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicBooleanNoPaddingJava7Suite extends GenericAtomicSuite[Boolean, AtomicBoolean]( @@ -946,8 +945,8 @@ object GenericAtomicBooleanNoPaddingJava7Suite NoPadding, x => if (x == 1) true else false, x => if (x) 1 else 0, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicNumberAnyNoPaddingJava7Suite extends GenericAtomicSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -955,8 +954,8 @@ object GenericAtomicNumberAnyNoPaddingJava7Suite NoPadding, x => BoxedLong(x.toLong), x => x.value.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicFloatNoPaddingJava7Suite extends GenericAtomicSuite[Float, AtomicFloat]( @@ -964,8 +963,8 @@ object GenericAtomicFloatNoPaddingJava7Suite NoPadding, x => x.toFloat, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicDoubleNoPaddingJava7Suite extends GenericAtomicSuite[Double, AtomicDouble]( @@ -973,8 +972,8 @@ object GenericAtomicDoubleNoPaddingJava7Suite NoPadding, x => x.toDouble, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicShortNoPaddingJava7Suite extends GenericAtomicSuite[Short, AtomicShort]( @@ -982,8 +981,8 @@ object GenericAtomicShortNoPaddingJava7Suite NoPadding, x => x.toShort, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicByteNoPaddingJava7Suite extends GenericAtomicSuite[Byte, AtomicByte]( @@ -991,8 +990,8 @@ object GenericAtomicByteNoPaddingJava7Suite NoPadding, x => x.toByte, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicCharNoPaddingJava7Suite extends GenericAtomicSuite[Char, AtomicChar]( @@ -1000,8 +999,8 @@ object GenericAtomicCharNoPaddingJava7Suite NoPadding, x => x.toChar, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicIntNoPaddingJava7Suite extends GenericAtomicSuite[Int, AtomicInt]( @@ -1009,8 +1008,8 @@ object GenericAtomicIntNoPaddingJava7Suite NoPadding, x => x, x => x, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicLongNoPaddingJava7Suite extends GenericAtomicSuite[Long, AtomicLong]( @@ -1018,8 +1017,8 @@ object GenericAtomicLongNoPaddingJava7Suite NoPadding, x => x.toLong, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) // -- Left64 (Java 7) @@ -1029,8 +1028,8 @@ object GenericAtomicAnyLeft64Java7Suite Left64, x => x.toString, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicBooleanLeft64Java7Suite extends GenericAtomicSuite[Boolean, AtomicBoolean]( @@ -1038,8 +1037,8 @@ object GenericAtomicBooleanLeft64Java7Suite Left64, x => if (x == 1) true else false, x => if (x) 1 else 0, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicNumberAnyLeft64Java7Suite extends GenericAtomicSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -1047,8 +1046,8 @@ object GenericAtomicNumberAnyLeft64Java7Suite Left64, x => BoxedLong(x.toLong), x => x.value.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicFloatLeft64Java7Suite extends GenericAtomicSuite[Float, AtomicFloat]( @@ -1056,8 +1055,8 @@ object GenericAtomicFloatLeft64Java7Suite Left64, x => x.toFloat, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicDoubleLeft64Java7Suite extends GenericAtomicSuite[Double, AtomicDouble]( @@ -1065,8 +1064,8 @@ object GenericAtomicDoubleLeft64Java7Suite Left64, x => x.toDouble, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicShortLeft64Java7Suite extends GenericAtomicSuite[Short, AtomicShort]( @@ -1074,8 +1073,8 @@ object GenericAtomicShortLeft64Java7Suite Left64, x => x.toShort, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicByteLeft64Java7Suite extends GenericAtomicSuite[Byte, AtomicByte]( @@ -1083,8 +1082,8 @@ object GenericAtomicByteLeft64Java7Suite Left64, x => x.toByte, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicCharLeft64Java7Suite extends GenericAtomicSuite[Char, AtomicChar]( @@ -1092,8 +1091,8 @@ object GenericAtomicCharLeft64Java7Suite Left64, x => x.toChar, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicIntLeft64Java7Suite extends GenericAtomicSuite[Int, AtomicInt]( @@ -1101,8 +1100,8 @@ object GenericAtomicIntLeft64Java7Suite Left64, x => x, x => x, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicLongLeft64Java7Suite extends GenericAtomicSuite[Long, AtomicLong]( @@ -1110,8 +1109,8 @@ object GenericAtomicLongLeft64Java7Suite Left64, x => x.toLong, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) // -- Right64 (Java 7) @@ -1121,8 +1120,8 @@ object GenericAtomicAnyRight64Java7Suite Right64, x => x.toString, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicBooleanRight64Java7Suite extends GenericAtomicSuite[Boolean, AtomicBoolean]( @@ -1130,8 +1129,8 @@ object GenericAtomicBooleanRight64Java7Suite Right64, x => if (x == 1) true else false, x => if (x) 1 else 0, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicNumberAnyRight64Java7Suite extends GenericAtomicSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -1139,8 +1138,8 @@ object GenericAtomicNumberAnyRight64Java7Suite Right64, x => BoxedLong(x.toLong), x => x.value.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicFloatRight64Java7Suite extends GenericAtomicSuite[Float, AtomicFloat]( @@ -1148,8 +1147,8 @@ object GenericAtomicFloatRight64Java7Suite Right64, x => x.toFloat, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicDoubleRight64Java7Suite extends GenericAtomicSuite[Double, AtomicDouble]( @@ -1157,8 +1156,8 @@ object GenericAtomicDoubleRight64Java7Suite Right64, x => x.toDouble, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicShortRight64Java7Suite extends GenericAtomicSuite[Short, AtomicShort]( @@ -1166,8 +1165,8 @@ object GenericAtomicShortRight64Java7Suite Right64, x => x.toShort, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicByteRight64Java7Suite extends GenericAtomicSuite[Byte, AtomicByte]( @@ -1175,8 +1174,8 @@ object GenericAtomicByteRight64Java7Suite Right64, x => x.toByte, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicCharRight64Java7Suite extends GenericAtomicSuite[Char, AtomicChar]( @@ -1184,8 +1183,8 @@ object GenericAtomicCharRight64Java7Suite Right64, x => x.toChar, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicIntRight64Java7Suite extends GenericAtomicSuite[Int, AtomicInt]( @@ -1193,8 +1192,8 @@ object GenericAtomicIntRight64Java7Suite Right64, x => x, x => x, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicLongRight64Java7Suite extends GenericAtomicSuite[Long, AtomicLong]( @@ -1202,8 +1201,8 @@ object GenericAtomicLongRight64Java7Suite Right64, x => x.toLong, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) // -- LeftRight128 (Java 7) @@ -1213,8 +1212,8 @@ object GenericAtomicAnyLeftRight128Java7Suite LeftRight128, x => x.toString, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicBooleanLeftRight128Java7Suite extends GenericAtomicSuite[Boolean, AtomicBoolean]( @@ -1222,8 +1221,8 @@ object GenericAtomicBooleanLeftRight128Java7Suite LeftRight128, x => if (x == 1) true else false, x => if (x) 1 else 0, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicNumberAnyLeftRight128Java7Suite extends GenericAtomicSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -1231,8 +1230,8 @@ object GenericAtomicNumberAnyLeftRight128Java7Suite LeftRight128, x => BoxedLong(x.toLong), x => x.value.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicFloatLeftRight128Java7Suite extends GenericAtomicSuite[Float, AtomicFloat]( @@ -1240,8 +1239,8 @@ object GenericAtomicFloatLeftRight128Java7Suite LeftRight128, x => x.toFloat, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicDoubleLeftRight128Java7Suite extends GenericAtomicSuite[Double, AtomicDouble]( @@ -1249,8 +1248,8 @@ object GenericAtomicDoubleLeftRight128Java7Suite LeftRight128, x => x.toDouble, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicShortLeftRight128Java7Suite extends GenericAtomicSuite[Short, AtomicShort]( @@ -1258,8 +1257,8 @@ object GenericAtomicShortLeftRight128Java7Suite LeftRight128, x => x.toShort, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicByteLeftRight128Java7Suite extends GenericAtomicSuite[Byte, AtomicByte]( @@ -1267,8 +1266,8 @@ object GenericAtomicByteLeftRight128Java7Suite LeftRight128, x => x.toByte, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicCharLeftRight128Java7Suite extends GenericAtomicSuite[Char, AtomicChar]( @@ -1276,8 +1275,8 @@ object GenericAtomicCharLeftRight128Java7Suite LeftRight128, x => x.toChar, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicIntLeftRight128Java7Suite extends GenericAtomicSuite[Int, AtomicInt]( @@ -1285,8 +1284,8 @@ object GenericAtomicIntLeftRight128Java7Suite LeftRight128, x => x, x => x, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicLongLeftRight128Java7Suite extends GenericAtomicSuite[Long, AtomicLong]( @@ -1294,8 +1293,8 @@ object GenericAtomicLongLeftRight128Java7Suite LeftRight128, x => x.toLong, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) // -- Left128 (Java 7) @@ -1305,8 +1304,8 @@ object GenericAtomicAnyLeft128Java7Suite Left128, x => x.toString, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicBooleanLeft128Java7Suite extends GenericAtomicSuite[Boolean, AtomicBoolean]( @@ -1314,8 +1313,8 @@ object GenericAtomicBooleanLeft128Java7Suite Left128, x => if (x == 1) true else false, x => if (x) 1 else 0, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicNumberAnyLeft128Java7Suite extends GenericAtomicSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -1323,8 +1322,8 @@ object GenericAtomicNumberAnyLeft128Java7Suite Left128, x => BoxedLong(x.toLong), x => x.value.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicFloatLeft128Java7Suite extends GenericAtomicSuite[Float, AtomicFloat]( @@ -1332,8 +1331,8 @@ object GenericAtomicFloatLeft128Java7Suite Left128, x => x.toFloat, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicDoubleLeft128Java7Suite extends GenericAtomicSuite[Double, AtomicDouble]( @@ -1341,8 +1340,8 @@ object GenericAtomicDoubleLeft128Java7Suite Left128, x => x.toDouble, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicShortLeft128Java7Suite extends GenericAtomicSuite[Short, AtomicShort]( @@ -1350,8 +1349,8 @@ object GenericAtomicShortLeft128Java7Suite Left128, x => x.toShort, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicByteLeft128Java7Suite extends GenericAtomicSuite[Byte, AtomicByte]( @@ -1359,8 +1358,8 @@ object GenericAtomicByteLeft128Java7Suite Left128, x => x.toByte, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicCharLeft128Java7Suite extends GenericAtomicSuite[Char, AtomicChar]( @@ -1368,8 +1367,8 @@ object GenericAtomicCharLeft128Java7Suite Left128, x => x.toChar, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicIntLeft128Java7Suite extends GenericAtomicSuite[Int, AtomicInt]( @@ -1377,8 +1376,8 @@ object GenericAtomicIntLeft128Java7Suite Left128, x => x, x => x, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicLongLeft128Java7Suite extends GenericAtomicSuite[Long, AtomicLong]( @@ -1386,8 +1385,8 @@ object GenericAtomicLongLeft128Java7Suite Left128, x => x.toLong, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) // -- Right128 (Java 7) @@ -1397,8 +1396,8 @@ object GenericAtomicAnyRight128Java7Suite Right128, x => x.toString, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicBooleanRight128Java7Suite extends GenericAtomicSuite[Boolean, AtomicBoolean]( @@ -1406,8 +1405,8 @@ object GenericAtomicBooleanRight128Java7Suite Right128, x => if (x == 1) true else false, x => if (x) 1 else 0, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicNumberAnyRight128Java7Suite extends GenericAtomicSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -1415,8 +1414,8 @@ object GenericAtomicNumberAnyRight128Java7Suite Right128, x => BoxedLong(x.toLong), x => x.value.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicFloatRight128Java7Suite extends GenericAtomicSuite[Float, AtomicFloat]( @@ -1424,8 +1423,8 @@ object GenericAtomicFloatRight128Java7Suite Right128, x => x.toFloat, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicDoubleRight128Java7Suite extends GenericAtomicSuite[Double, AtomicDouble]( @@ -1433,8 +1432,8 @@ object GenericAtomicDoubleRight128Java7Suite Right128, x => x.toDouble, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicShortRight128Java7Suite extends GenericAtomicSuite[Short, AtomicShort]( @@ -1442,8 +1441,8 @@ object GenericAtomicShortRight128Java7Suite Right128, x => x.toShort, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicByteRight128Java7Suite extends GenericAtomicSuite[Byte, AtomicByte]( @@ -1451,8 +1450,8 @@ object GenericAtomicByteRight128Java7Suite Right128, x => x.toByte, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicCharRight128Java7Suite extends GenericAtomicSuite[Char, AtomicChar]( @@ -1460,8 +1459,8 @@ object GenericAtomicCharRight128Java7Suite Right128, x => x.toChar, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicIntRight128Java7Suite extends GenericAtomicSuite[Int, AtomicInt]( @@ -1469,8 +1468,8 @@ object GenericAtomicIntRight128Java7Suite Right128, x => x, x => x, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicLongRight128Java7Suite extends GenericAtomicSuite[Long, AtomicLong]( @@ -1478,8 +1477,8 @@ object GenericAtomicLongRight128Java7Suite Right128, x => x.toLong, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) // -- LeftRight256 (Java 7) @@ -1489,8 +1488,8 @@ object GenericAtomicAnyLeftRight256Java7Suite LeftRight256, x => x.toString, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicBooleanLeftRight256Java7Suite extends GenericAtomicSuite[Boolean, AtomicBoolean]( @@ -1498,8 +1497,8 @@ object GenericAtomicBooleanLeftRight256Java7Suite LeftRight256, x => if (x == 1) true else false, x => if (x) 1 else 0, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicNumberAnyLeftRight256Java7Suite extends GenericAtomicSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -1507,8 +1506,8 @@ object GenericAtomicNumberAnyLeftRight256Java7Suite LeftRight256, x => BoxedLong(x.toLong), x => x.value.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicFloatLeftRight256Java7Suite extends GenericAtomicSuite[Float, AtomicFloat]( @@ -1516,8 +1515,8 @@ object GenericAtomicFloatLeftRight256Java7Suite LeftRight256, x => x.toFloat, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicDoubleLeftRight256Java7Suite extends GenericAtomicSuite[Double, AtomicDouble]( @@ -1525,8 +1524,8 @@ object GenericAtomicDoubleLeftRight256Java7Suite LeftRight256, x => x.toDouble, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicShortLeftRight256Java7Suite extends GenericAtomicSuite[Short, AtomicShort]( @@ -1534,8 +1533,8 @@ object GenericAtomicShortLeftRight256Java7Suite LeftRight256, x => x.toShort, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicByteLeftRight256Java7Suite extends GenericAtomicSuite[Byte, AtomicByte]( @@ -1543,8 +1542,8 @@ object GenericAtomicByteLeftRight256Java7Suite LeftRight256, x => x.toByte, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicCharLeftRight256Java7Suite extends GenericAtomicSuite[Char, AtomicChar]( @@ -1552,8 +1551,8 @@ object GenericAtomicCharLeftRight256Java7Suite LeftRight256, x => x.toChar, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicIntLeftRight256Java7Suite extends GenericAtomicSuite[Int, AtomicInt]( @@ -1561,8 +1560,8 @@ object GenericAtomicIntLeftRight256Java7Suite LeftRight256, x => x, x => x, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) object GenericAtomicLongLeftRight256Java7Suite extends GenericAtomicSuite[Long, AtomicLong]( @@ -1570,8 +1569,8 @@ object GenericAtomicLongLeftRight256Java7Suite LeftRight256, x => x.toLong, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = true) + allowUnsafe = true + ) // ----------------- Java X @@ -1583,8 +1582,8 @@ object GenericAtomicAnyNoPaddingJavaXSuite NoPadding, x => x.toString, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicBooleanNoPaddingJavaXSuite extends GenericAtomicSuite[Boolean, AtomicBoolean]( @@ -1592,8 +1591,8 @@ object GenericAtomicBooleanNoPaddingJavaXSuite NoPadding, x => if (x == 1) true else false, x => if (x) 1 else 0, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicNumberAnyNoPaddingJavaXSuite extends GenericAtomicSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -1601,8 +1600,8 @@ object GenericAtomicNumberAnyNoPaddingJavaXSuite NoPadding, x => BoxedLong(x.toLong), x => x.value.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicFloatNoPaddingJavaXSuite extends GenericAtomicSuite[Float, AtomicFloat]( @@ -1610,8 +1609,8 @@ object GenericAtomicFloatNoPaddingJavaXSuite NoPadding, x => x.toFloat, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicDoubleNoPaddingJavaXSuite extends GenericAtomicSuite[Double, AtomicDouble]( @@ -1619,8 +1618,8 @@ object GenericAtomicDoubleNoPaddingJavaXSuite NoPadding, x => x.toDouble, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicShortNoPaddingJavaXSuite extends GenericAtomicSuite[Short, AtomicShort]( @@ -1628,8 +1627,8 @@ object GenericAtomicShortNoPaddingJavaXSuite NoPadding, x => x.toShort, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicByteNoPaddingJavaXSuite extends GenericAtomicSuite[Byte, AtomicByte]( @@ -1637,8 +1636,8 @@ object GenericAtomicByteNoPaddingJavaXSuite NoPadding, x => x.toByte, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicCharNoPaddingJavaXSuite extends GenericAtomicSuite[Char, AtomicChar]( @@ -1646,8 +1645,8 @@ object GenericAtomicCharNoPaddingJavaXSuite NoPadding, x => x.toChar, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicIntNoPaddingJavaXSuite extends GenericAtomicSuite[Int, AtomicInt]( @@ -1655,8 +1654,8 @@ object GenericAtomicIntNoPaddingJavaXSuite NoPadding, x => x, x => x, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicLongNoPaddingJavaXSuite extends GenericAtomicSuite[Long, AtomicLong]( @@ -1664,8 +1663,8 @@ object GenericAtomicLongNoPaddingJavaXSuite NoPadding, x => x.toLong, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) // -- Left64 (Java X) @@ -1675,8 +1674,8 @@ object GenericAtomicAnyLeft64JavaXSuite Left64, x => x.toString, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicBooleanLeft64JavaXSuite extends GenericAtomicSuite[Boolean, AtomicBoolean]( @@ -1684,8 +1683,8 @@ object GenericAtomicBooleanLeft64JavaXSuite Left64, x => if (x == 1) true else false, x => if (x) 1 else 0, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicNumberAnyLeft64JavaXSuite extends GenericAtomicSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -1693,8 +1692,8 @@ object GenericAtomicNumberAnyLeft64JavaXSuite Left64, x => BoxedLong(x.toLong), x => x.value.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicFloatLeft64JavaXSuite extends GenericAtomicSuite[Float, AtomicFloat]( @@ -1702,8 +1701,8 @@ object GenericAtomicFloatLeft64JavaXSuite Left64, x => x.toFloat, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicDoubleLeft64JavaXSuite extends GenericAtomicSuite[Double, AtomicDouble]( @@ -1711,8 +1710,8 @@ object GenericAtomicDoubleLeft64JavaXSuite Left64, x => x.toDouble, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicShortLeft64JavaXSuite extends GenericAtomicSuite[Short, AtomicShort]( @@ -1720,8 +1719,8 @@ object GenericAtomicShortLeft64JavaXSuite Left64, x => x.toShort, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicByteLeft64JavaXSuite extends GenericAtomicSuite[Byte, AtomicByte]( @@ -1729,8 +1728,8 @@ object GenericAtomicByteLeft64JavaXSuite Left64, x => x.toByte, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicCharLeft64JavaXSuite extends GenericAtomicSuite[Char, AtomicChar]( @@ -1738,8 +1737,8 @@ object GenericAtomicCharLeft64JavaXSuite Left64, x => x.toChar, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicIntLeft64JavaXSuite extends GenericAtomicSuite[Int, AtomicInt]( @@ -1747,8 +1746,8 @@ object GenericAtomicIntLeft64JavaXSuite Left64, x => x, x => x, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicLongLeft64JavaXSuite extends GenericAtomicSuite[Long, AtomicLong]( @@ -1756,8 +1755,8 @@ object GenericAtomicLongLeft64JavaXSuite Left64, x => x.toLong, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) // -- Right64 (Java X) @@ -1767,8 +1766,8 @@ object GenericAtomicAnyRight64JavaXSuite Right64, x => x.toString, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicBooleanRight64JavaXSuite extends GenericAtomicSuite[Boolean, AtomicBoolean]( @@ -1776,8 +1775,8 @@ object GenericAtomicBooleanRight64JavaXSuite Right64, x => if (x == 1) true else false, x => if (x) 1 else 0, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicNumberAnyRight64JavaXSuite extends GenericAtomicSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -1785,8 +1784,8 @@ object GenericAtomicNumberAnyRight64JavaXSuite Right64, x => BoxedLong(x.toLong), x => x.value.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicFloatRight64JavaXSuite extends GenericAtomicSuite[Float, AtomicFloat]( @@ -1794,8 +1793,8 @@ object GenericAtomicFloatRight64JavaXSuite Right64, x => x.toFloat, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicDoubleRight64JavaXSuite extends GenericAtomicSuite[Double, AtomicDouble]( @@ -1803,8 +1802,8 @@ object GenericAtomicDoubleRight64JavaXSuite Right64, x => x.toDouble, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicShortRight64JavaXSuite extends GenericAtomicSuite[Short, AtomicShort]( @@ -1812,8 +1811,8 @@ object GenericAtomicShortRight64JavaXSuite Right64, x => x.toShort, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicByteRight64JavaXSuite extends GenericAtomicSuite[Byte, AtomicByte]( @@ -1821,8 +1820,8 @@ object GenericAtomicByteRight64JavaXSuite Right64, x => x.toByte, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicCharRight64JavaXSuite extends GenericAtomicSuite[Char, AtomicChar]( @@ -1830,8 +1829,8 @@ object GenericAtomicCharRight64JavaXSuite Right64, x => x.toChar, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicIntRight64JavaXSuite extends GenericAtomicSuite[Int, AtomicInt]( @@ -1839,8 +1838,8 @@ object GenericAtomicIntRight64JavaXSuite Right64, x => x, x => x, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicLongRight64JavaXSuite extends GenericAtomicSuite[Long, AtomicLong]( @@ -1848,8 +1847,8 @@ object GenericAtomicLongRight64JavaXSuite Right64, x => x.toLong, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) // -- LeftRight128 (Java X) @@ -1859,8 +1858,8 @@ object GenericAtomicAnyLeftRight128JavaXSuite LeftRight128, x => x.toString, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicBooleanLeftRight128JavaXSuite extends GenericAtomicSuite[Boolean, AtomicBoolean]( @@ -1868,8 +1867,8 @@ object GenericAtomicBooleanLeftRight128JavaXSuite LeftRight128, x => if (x == 1) true else false, x => if (x) 1 else 0, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicNumberAnyLeftRight128JavaXSuite extends GenericAtomicSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -1877,8 +1876,8 @@ object GenericAtomicNumberAnyLeftRight128JavaXSuite LeftRight128, x => BoxedLong(x.toLong), x => x.value.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicFloatLeftRight128JavaXSuite extends GenericAtomicSuite[Float, AtomicFloat]( @@ -1886,8 +1885,8 @@ object GenericAtomicFloatLeftRight128JavaXSuite LeftRight128, x => x.toFloat, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicDoubleLeftRight128JavaXSuite extends GenericAtomicSuite[Double, AtomicDouble]( @@ -1895,8 +1894,8 @@ object GenericAtomicDoubleLeftRight128JavaXSuite LeftRight128, x => x.toDouble, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicShortLeftRight128JavaXSuite extends GenericAtomicSuite[Short, AtomicShort]( @@ -1904,8 +1903,8 @@ object GenericAtomicShortLeftRight128JavaXSuite LeftRight128, x => x.toShort, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicByteLeftRight128JavaXSuite extends GenericAtomicSuite[Byte, AtomicByte]( @@ -1913,8 +1912,8 @@ object GenericAtomicByteLeftRight128JavaXSuite LeftRight128, x => x.toByte, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicCharLeftRight128JavaXSuite extends GenericAtomicSuite[Char, AtomicChar]( @@ -1922,8 +1921,8 @@ object GenericAtomicCharLeftRight128JavaXSuite LeftRight128, x => x.toChar, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicIntLeftRight128JavaXSuite extends GenericAtomicSuite[Int, AtomicInt]( @@ -1931,8 +1930,8 @@ object GenericAtomicIntLeftRight128JavaXSuite LeftRight128, x => x, x => x, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicLongLeftRight128JavaXSuite extends GenericAtomicSuite[Long, AtomicLong]( @@ -1940,8 +1939,8 @@ object GenericAtomicLongLeftRight128JavaXSuite LeftRight128, x => x.toLong, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) // -- Left128 (Java X) @@ -1951,8 +1950,8 @@ object GenericAtomicAnyLeft128JavaXSuite Left128, x => x.toString, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicBooleanLeft128JavaXSuite extends GenericAtomicSuite[Boolean, AtomicBoolean]( @@ -1960,8 +1959,8 @@ object GenericAtomicBooleanLeft128JavaXSuite Left128, x => if (x == 1) true else false, x => if (x) 1 else 0, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicNumberAnyLeft128JavaXSuite extends GenericAtomicSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -1969,8 +1968,8 @@ object GenericAtomicNumberAnyLeft128JavaXSuite Left128, x => BoxedLong(x.toLong), x => x.value.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicFloatLeft128JavaXSuite extends GenericAtomicSuite[Float, AtomicFloat]( @@ -1978,8 +1977,8 @@ object GenericAtomicFloatLeft128JavaXSuite Left128, x => x.toFloat, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicDoubleLeft128JavaXSuite extends GenericAtomicSuite[Double, AtomicDouble]( @@ -1987,8 +1986,8 @@ object GenericAtomicDoubleLeft128JavaXSuite Left128, x => x.toDouble, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicShortLeft128JavaXSuite extends GenericAtomicSuite[Short, AtomicShort]( @@ -1996,8 +1995,8 @@ object GenericAtomicShortLeft128JavaXSuite Left128, x => x.toShort, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicByteLeft128JavaXSuite extends GenericAtomicSuite[Byte, AtomicByte]( @@ -2005,8 +2004,8 @@ object GenericAtomicByteLeft128JavaXSuite Left128, x => x.toByte, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicCharLeft128JavaXSuite extends GenericAtomicSuite[Char, AtomicChar]( @@ -2014,8 +2013,8 @@ object GenericAtomicCharLeft128JavaXSuite Left128, x => x.toChar, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicIntLeft128JavaXSuite extends GenericAtomicSuite[Int, AtomicInt]( @@ -2023,8 +2022,8 @@ object GenericAtomicIntLeft128JavaXSuite Left128, x => x, x => x, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicLongLeft128JavaXSuite extends GenericAtomicSuite[Long, AtomicLong]( @@ -2032,8 +2031,8 @@ object GenericAtomicLongLeft128JavaXSuite Left128, x => x.toLong, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) // -- Right128 (Java X) @@ -2043,8 +2042,8 @@ object GenericAtomicAnyRight128JavaXSuite Right128, x => x.toString, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicBooleanRight128JavaXSuite extends GenericAtomicSuite[Boolean, AtomicBoolean]( @@ -2052,8 +2051,8 @@ object GenericAtomicBooleanRight128JavaXSuite Right128, x => if (x == 1) true else false, x => if (x) 1 else 0, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicNumberAnyRight128JavaXSuite extends GenericAtomicSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -2061,8 +2060,8 @@ object GenericAtomicNumberAnyRight128JavaXSuite Right128, x => BoxedLong(x.toLong), x => x.value.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicFloatRight128JavaXSuite extends GenericAtomicSuite[Float, AtomicFloat]( @@ -2070,8 +2069,8 @@ object GenericAtomicFloatRight128JavaXSuite Right128, x => x.toFloat, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicDoubleRight128JavaXSuite extends GenericAtomicSuite[Double, AtomicDouble]( @@ -2079,8 +2078,8 @@ object GenericAtomicDoubleRight128JavaXSuite Right128, x => x.toDouble, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicShortRight128JavaXSuite extends GenericAtomicSuite[Short, AtomicShort]( @@ -2088,8 +2087,8 @@ object GenericAtomicShortRight128JavaXSuite Right128, x => x.toShort, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicByteRight128JavaXSuite extends GenericAtomicSuite[Byte, AtomicByte]( @@ -2097,8 +2096,8 @@ object GenericAtomicByteRight128JavaXSuite Right128, x => x.toByte, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicCharRight128JavaXSuite extends GenericAtomicSuite[Char, AtomicChar]( @@ -2106,8 +2105,8 @@ object GenericAtomicCharRight128JavaXSuite Right128, x => x.toChar, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicIntRight128JavaXSuite extends GenericAtomicSuite[Int, AtomicInt]( @@ -2115,8 +2114,8 @@ object GenericAtomicIntRight128JavaXSuite Right128, x => x, x => x, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicLongRight128JavaXSuite extends GenericAtomicSuite[Long, AtomicLong]( @@ -2124,8 +2123,8 @@ object GenericAtomicLongRight128JavaXSuite Right128, x => x.toLong, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) // -- LeftRight256 (Java X) @@ -2135,8 +2134,8 @@ object GenericAtomicAnyLeftRight256JavaXSuite LeftRight256, x => x.toString, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicBooleanLeftRight256JavaXSuite extends GenericAtomicSuite[Boolean, AtomicBoolean]( @@ -2144,8 +2143,8 @@ object GenericAtomicBooleanLeftRight256JavaXSuite LeftRight256, x => if (x == 1) true else false, x => if (x) 1 else 0, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicNumberAnyLeftRight256JavaXSuite extends GenericAtomicSuite[BoxedLong, AtomicNumberAny[BoxedLong]]( @@ -2153,8 +2152,8 @@ object GenericAtomicNumberAnyLeftRight256JavaXSuite LeftRight256, x => BoxedLong(x.toLong), x => x.value.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicFloatLeftRight256JavaXSuite extends GenericAtomicSuite[Float, AtomicFloat]( @@ -2162,8 +2161,8 @@ object GenericAtomicFloatLeftRight256JavaXSuite LeftRight256, x => x.toFloat, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicDoubleLeftRight256JavaXSuite extends GenericAtomicSuite[Double, AtomicDouble]( @@ -2171,8 +2170,8 @@ object GenericAtomicDoubleLeftRight256JavaXSuite LeftRight256, x => x.toDouble, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicShortLeftRight256JavaXSuite extends GenericAtomicSuite[Short, AtomicShort]( @@ -2180,8 +2179,8 @@ object GenericAtomicShortLeftRight256JavaXSuite LeftRight256, x => x.toShort, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicByteLeftRight256JavaXSuite extends GenericAtomicSuite[Byte, AtomicByte]( @@ -2189,8 +2188,8 @@ object GenericAtomicByteLeftRight256JavaXSuite LeftRight256, x => x.toByte, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicCharLeftRight256JavaXSuite extends GenericAtomicSuite[Char, AtomicChar]( @@ -2198,8 +2197,8 @@ object GenericAtomicCharLeftRight256JavaXSuite LeftRight256, x => x.toChar, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicIntLeftRight256JavaXSuite extends GenericAtomicSuite[Int, AtomicInt]( @@ -2207,8 +2206,8 @@ object GenericAtomicIntLeftRight256JavaXSuite LeftRight256, x => x, x => x, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) object GenericAtomicLongLeftRight256JavaXSuite extends GenericAtomicSuite[Long, AtomicLong]( @@ -2216,5 +2215,5 @@ object GenericAtomicLongLeftRight256JavaXSuite LeftRight256, x => x.toLong, x => x.toInt, - allowPlatformIntrinsics = false, - allowUnsafe = false) + allowUnsafe = false + ) diff --git a/project/MimaFilters.scala b/project/MimaFilters.scala index adb09c862..8f3c5e70d 100644 --- a/project/MimaFilters.scala +++ b/project/MimaFilters.scala @@ -119,6 +119,15 @@ object MimaFilters { ), exclude[DirectMissingMethodProblem]( "monix.execution.internal.atomic.Factory.newBoxedLong" + ), + exclude[MissingClassProblem]( + "monix.execution.internal.collection.queues.FromCircularQueue$Java7" + ), + exclude[MissingClassProblem]( + "monix.execution.internal.collection.queues.FromMessagePassingQueue$Java7" + ), + exclude[ReversedMissingMethodProblem]( + "monix.execution.atomic.AtomicBuilder.buildInstance" ) ) }