Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2024, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2024, 2026, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* The Universal Permissive License (UPL), Version 1.0
Expand Down Expand Up @@ -57,6 +57,7 @@
import com.oracle.graal.python.nodes.object.GetClassNode;
import com.oracle.graal.python.runtime.object.PFactory;
import com.oracle.graal.python.runtime.sequence.storage.SequenceStorage;
import com.oracle.truffle.api.HostCompilerDirectives.InliningCutoff;
import com.oracle.truffle.api.bytecode.OperationProxy;
import com.oracle.truffle.api.bytecode.StoreBytecodeIndex;
import com.oracle.truffle.api.dsl.Bind;
Expand Down Expand Up @@ -103,6 +104,7 @@ public static TruffleString doIt(TruffleString left, TruffleString right,
}

@Fallback
@InliningCutoff
@StoreBytecodeIndex
public static Object doIt(VirtualFrame frame, Object v, Object w,
@Bind Node inliningTarget,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2025, 2026, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* The Universal Permissive License (UPL), Version 1.0
Expand Down Expand Up @@ -42,6 +42,7 @@

import com.oracle.graal.python.builtins.objects.type.slots.TpSlotBinaryOp.ReversibleSlot;
import com.oracle.graal.python.lib.fastpath.PyNumberFloorDivideFastPathsBase;
import com.oracle.truffle.api.HostCompilerDirectives.InliningCutoff;
import com.oracle.truffle.api.bytecode.OperationProxy;
import com.oracle.truffle.api.bytecode.StoreBytecodeIndex;
import com.oracle.truffle.api.dsl.Bind;
Expand All @@ -60,6 +61,7 @@ public abstract class PyNumberFloorDivideNode extends PyNumberFloorDivideFastPat

@Fallback
@StoreBytecodeIndex
@InliningCutoff
public static Object doIt(VirtualFrame frame, Object v, Object w,
@Bind Node inliningTarget,
@Cached CallBinaryOpNode callBinaryOpNode) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2025, 2026, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* The Universal Permissive License (UPL), Version 1.0
Expand Down Expand Up @@ -41,7 +41,8 @@
package com.oracle.graal.python.lib;

import com.oracle.graal.python.builtins.objects.type.slots.TpSlotBinaryOp.InplaceSlot;
import com.oracle.graal.python.nodes.expression.BinaryOpNode;
import com.oracle.graal.python.lib.fastpath.PyNumberLshiftFastPathsBase;
import com.oracle.truffle.api.HostCompilerDirectives.InliningCutoff;
import com.oracle.truffle.api.bytecode.OperationProxy;
import com.oracle.truffle.api.bytecode.StoreBytecodeIndex;
import com.oracle.truffle.api.dsl.Bind;
Expand All @@ -53,13 +54,13 @@
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.nodes.Node;

// TODO: should inherit from PyNumberLshiftFastPathsBase, blocked by GR-64005
@GenerateInline(false)
@GenerateUncached
@OperationProxy.Proxyable(allowUncached = true, storeBytecodeIndex = false)
public abstract class PyNumberInPlaceLshiftNode extends BinaryOpNode {
@Specialization // (replaces = {"doII", "doLL"})
public abstract class PyNumberInPlaceLshiftNode extends PyNumberLshiftFastPathsBase {
@Specialization(replaces = {"doII", "doLL"})
@StoreBytecodeIndex
@InliningCutoff
public static Object doIt(VirtualFrame frame, Object v, Object w,
@Bind Node inliningTarget,
@Cached CallBinaryIOpNode callBinaryOpNode) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2025, 2026, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* The Universal Permissive License (UPL), Version 1.0
Expand Down Expand Up @@ -41,7 +41,8 @@
package com.oracle.graal.python.lib;

import com.oracle.graal.python.builtins.objects.type.slots.TpSlotBinaryOp.ReversibleSlot;
import com.oracle.graal.python.nodes.expression.BinaryOpNode;
import com.oracle.graal.python.lib.fastpath.PyNumberLshiftFastPathsBase;
import com.oracle.truffle.api.HostCompilerDirectives.InliningCutoff;
import com.oracle.truffle.api.bytecode.OperationProxy;
import com.oracle.truffle.api.bytecode.StoreBytecodeIndex;
import com.oracle.truffle.api.dsl.Bind;
Expand All @@ -53,14 +54,14 @@
import com.oracle.truffle.api.frame.VirtualFrame;
import com.oracle.truffle.api.nodes.Node;

// TODO: should inherit from PyNumberLshiftFastPathsBase, blocked by GR-64005
@GenerateInline(false)
@GenerateUncached
@OperationProxy.Proxyable(storeBytecodeIndex = false, allowUncached = true)
public abstract class PyNumberLshiftNode extends BinaryOpNode {
public abstract class PyNumberLshiftNode extends PyNumberLshiftFastPathsBase {

@Specialization // (replaces = {"doII", "doLL"})
@Specialization(replaces = {"doII", "doLL"})
@StoreBytecodeIndex
@InliningCutoff
public static Object doIt(VirtualFrame frame, Object v, Object w,
@Bind Node inliningTarget,
@Cached CallBinaryOpNode callBinaryOpNode) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2024, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2024, 2026, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* The Universal Permissive License (UPL), Version 1.0
Expand Down Expand Up @@ -49,6 +49,7 @@
import com.oracle.graal.python.lib.fastpath.PyNumberMultiplyFastPathsBase;
import com.oracle.graal.python.nodes.PRaiseNode;
import com.oracle.graal.python.nodes.object.GetClassNode;
import com.oracle.truffle.api.HostCompilerDirectives.InliningCutoff;
import com.oracle.truffle.api.bytecode.OperationProxy;
import com.oracle.truffle.api.bytecode.StoreBytecodeIndex;
import com.oracle.truffle.api.dsl.Bind;
Expand All @@ -69,6 +70,7 @@ public abstract class PyNumberMultiplyNode extends PyNumberMultiplyFastPathsBase

@Fallback
@StoreBytecodeIndex
@InliningCutoff
public static Object doIt(VirtualFrame frame, Object v, Object w,
@Bind Node inliningTarget,
@Exclusive @Cached GetClassNode getVClass,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2025, 2026, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* The Universal Permissive License (UPL), Version 1.0
Expand Down Expand Up @@ -74,6 +74,7 @@ public abstract class PyNumberRshiftNode extends PyNumberRshiftFastPathsBase {

@Fallback
@StoreBytecodeIndex
@InliningCutoff
public static Object doIt(VirtualFrame frame, Object v, Object w,
@Bind Node inliningTarget,
@Cached GetClassNode getVClass,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2025, 2026, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* The Universal Permissive License (UPL), Version 1.0
Expand Down Expand Up @@ -47,7 +47,7 @@

/**
* Helper class with shared fast-paths. Must be public so that it is accessible by the Bytecode DSL
* generated code. TODO: unused due to GR-64005
* generated code.
*/
@GenerateCached(false)
public abstract class PyNumberLshiftFastPathsBase extends BinaryOpNode {
Expand Down
Loading