Skip to content

Commit f0e344d

Browse files
committed
Remove unsafeCast without exact parameter.
1 parent 2c2c147 commit f0e344d

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

truffle/src/com.oracle.truffle.api.object/src/com/oracle/truffle/api/object/ExtLocations.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@
5151
import com.oracle.truffle.api.CompilerDirectives.CompilationFinal;
5252
import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
5353
import com.oracle.truffle.api.Truffle;
54-
5554
import com.oracle.truffle.api.impl.AbstractAssumption;
55+
5656
import sun.misc.Unsafe;
5757

5858
/**
@@ -446,7 +446,7 @@ protected final Object assumedTypeCast(Object value, boolean condition) {
446446
if (curr != null && curr != TypeAssumption.ANY && curr.getAssumption().isValid()) {
447447
Class<? extends Object> type = curr.type;
448448
boolean nonNull = curr.nonNull;
449-
return UnsafeAccess.unsafeCast(value, type, condition, nonNull);
449+
return UnsafeAccess.unsafeCast(value, type, condition, nonNull, false);
450450
} else {
451451
return value;
452452
}

truffle/src/com.oracle.truffle.api.object/src/com/oracle/truffle/api/object/Shape.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,7 +1056,7 @@ protected Shape setDynamicType(Object dynamicType) {
10561056
* @since 0.8 or earlier
10571057
*/
10581058
public Shape getRoot() {
1059-
return UnsafeAccess.unsafeCast(root, Shape.class, true, true);
1059+
return UnsafeAccess.unsafeCast(root, Shape.class, true, true, false);
10601060
}
10611061

10621062
/**
@@ -1636,7 +1636,7 @@ void invalidateLeafAssumption() {
16361636

16371637
/**
16381638
* {@return a string representation of the object}
1639-
*
1639+
*
16401640
* @since 25.1
16411641
*/
16421642
@Override

truffle/src/com.oracle.truffle.api.object/src/com/oracle/truffle/api/object/UnsafeAccess.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,6 @@ static <T> T unsafeCast(Object value, Class<T> type, boolean condition, boolean
9090
return (T) value;
9191
}
9292

93-
static <T> T unsafeCast(Object value, Class<T> type, boolean condition, boolean nonNull) {
94-
return unsafeCast(value, type, condition, nonNull, false);
95-
}
96-
9793
/**
9894
* Like {@link System#arraycopy}, but kills any location.
9995
*/

0 commit comments

Comments
 (0)