Skip to content

Commit c7c5a98

Browse files
fangererqunaibit
authored andcommitted
Fix: used wrong inlining target
1 parent 22c7cd9 commit c7c5a98

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/capi/CExtNodes.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,7 @@
184184
import com.oracle.graal.python.runtime.exception.PException;
185185
import com.oracle.graal.python.runtime.exception.PythonErrorType;
186186
import com.oracle.graal.python.runtime.object.PythonObjectFactory;
187-
import com.oracle.graal.python.runtime.sequence.storage.BasicSequenceStorage;
188187
import com.oracle.graal.python.runtime.sequence.storage.MroSequenceStorage;
189-
import com.oracle.graal.python.runtime.sequence.storage.ObjectSequenceStorage;
190188
import com.oracle.graal.python.util.ComparisonOp;
191189
import com.oracle.graal.python.util.Function;
192190
import com.oracle.graal.python.util.PythonUtils;
@@ -216,11 +214,8 @@
216214
import com.oracle.truffle.api.interop.UnsupportedTypeException;
217215
import com.oracle.truffle.api.library.CachedLibrary;
218216
import com.oracle.truffle.api.nodes.Node;
219-
import com.oracle.truffle.api.object.DynamicObject;
220-
import com.oracle.truffle.api.object.DynamicObjectLibrary;
221217
import com.oracle.truffle.api.profiles.InlinedBranchProfile;
222218
import com.oracle.truffle.api.profiles.InlinedConditionProfile;
223-
import com.oracle.truffle.api.profiles.InlinedLoopConditionProfile;
224219
import com.oracle.truffle.api.source.Source;
225220
import com.oracle.truffle.api.strings.TruffleString;
226221
import com.oracle.truffle.api.strings.TruffleString.Encoding;

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/capi/transitions/CApiTransitions.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1250,6 +1250,7 @@ protected boolean needsTransfer() {
12501250

12511251
@Specialization
12521252
Object doNative(PythonAbstractNativeObject obj,
1253+
@Bind("this") Node inliningTarget,
12531254
@CachedLibrary(limit = "2") InteropLibrary lib,
12541255
@Cached InlinedBranchProfile inlinedBranchProfile,
12551256
@Cached UpdateRefNode updateRefNode) {
@@ -1268,11 +1269,11 @@ Object doNative(PythonAbstractNativeObject obj,
12681269
* the replicated native references.
12691270
*/
12701271
if (newRefcnt == MANAGED_REFCNT + 1 && obj.getReplicatedNativeReferences() != null) {
1271-
inlinedBranchProfile.enter(this);
1272+
inlinedBranchProfile.enter(inliningTarget);
12721273
for (Object referent : obj.getReplicatedNativeReferences()) {
12731274
if (referent instanceof PythonObject pythonObject) {
12741275
PythonAbstractObjectNativeWrapper nativeWrapper = pythonObject.getNativeWrapper();
1275-
updateRefNode.execute(this, nativeWrapper, nativeWrapper.getRefCount());
1276+
updateRefNode.execute(inliningTarget, nativeWrapper, nativeWrapper.getRefCount());
12761277
}
12771278
}
12781279
}

0 commit comments

Comments
 (0)