Skip to content

Commit 357dc3a

Browse files
committed
missing truffleboundary
1 parent 614b2d8 commit 357dc3a

File tree

1 file changed

+2
-3
lines changed
  • graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/ints

1 file changed

+2
-3
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/ints/IntBuiltins.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@
8383
import com.oracle.graal.python.nodes.util.CastToIndexNode;
8484
import com.oracle.graal.python.runtime.exception.PythonErrorType;
8585
import com.oracle.truffle.api.CompilerDirectives;
86-
import com.oracle.truffle.api.CompilerDirectives.CompilationFinal;
8786
import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
8887
import com.oracle.truffle.api.dsl.Cached;
8988
import com.oracle.truffle.api.dsl.Fallback;
@@ -614,7 +613,6 @@ PNotImplemented doGeneric(Object left, Object right) {
614613
@GenerateNodeFactory
615614
@TypeSystemReference(PythonArithmeticTypes.class)
616615
abstract static class MulNode extends PythonBinaryBuiltinNode {
617-
@CompilationFinal private ConditionProfile isBigIntPowerOfTwo = ConditionProfile.createBinaryProfile();
618616

619617
@Specialization(rewriteOn = ArithmeticException.class)
620618
int doII(int x, int y) throws ArithmeticException {
@@ -655,8 +653,9 @@ PInt doPIntPInt(PInt left, PInt right) {
655653
return factory().createInt(mul(left.getValue(), right.getValue()));
656654
}
657655

656+
@TruffleBoundary
658657
BigInteger mul(BigInteger a, BigInteger b) {
659-
if (isBigIntPowerOfTwo.profile(b.and(b.subtract(BigInteger.ONE)).equals(BigInteger.ZERO))) {
658+
if (b.and(b.subtract(BigInteger.ONE)).equals(BigInteger.ZERO)) {
660659
return bigIntegerShift(a, b.getLowestSetBit());
661660
} else {
662661
return bigIntegerMul(a, b);

0 commit comments

Comments
 (0)