Skip to content

Commit 15e9662

Browse files
committed
Add missing Truffle bounaries
1 parent abff1ed commit 15e9662

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/lib/PyObjectFormat.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
import com.oracle.graal.python.nodes.call.special.CallBinaryMethodNode;
5757
import com.oracle.graal.python.nodes.call.special.LookupAndCallBinaryNode;
5858
import com.oracle.graal.python.nodes.object.GetClassNode;
59+
import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
5960
import com.oracle.truffle.api.dsl.Cached;
6061
import com.oracle.truffle.api.dsl.Cached.Exclusive;
6162
import com.oracle.truffle.api.dsl.Cached.Shared;
@@ -133,10 +134,11 @@ static Object doGeneric(VirtualFrame frame, Object obj, Object formatSpec,
133134
}
134135

135136
@Specialization(guards = "isString(formatSpec)", replaces = "doGeneric")
136-
static Object doGenericUncahed(VirtualFrame frame, Object obj, Object formatSpec) {
137+
@TruffleBoundary
138+
static Object doGenericUncached(Object obj, Object formatSpec) {
137139
Object klass = GetClassNode.getUncached().execute(obj);
138140
Object slot = LookupCallableSlotInMRONode.getUncached(SpecialMethodSlot.Format).execute(klass);
139-
return CallBinaryMethodNode.getUncached().executeObject(frame, slot, obj, formatSpec);
141+
return CallBinaryMethodNode.getUncached().executeObject(null, slot, obj, formatSpec);
140142
}
141143

142144
// Note: PRaiseNode is @Exclusive to workaround a bug in DSL

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/attributes/DeleteAttributeNode.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
import com.oracle.graal.python.nodes.call.special.CallBinaryMethodNode;
4646
import com.oracle.graal.python.nodes.call.special.LookupAndCallBinaryNode;
4747
import com.oracle.graal.python.nodes.object.GetClassNode;
48+
import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
4849
import com.oracle.truffle.api.dsl.Cached;
4950
import com.oracle.truffle.api.dsl.GenerateUncached;
5051
import com.oracle.truffle.api.dsl.NeverDefault;
@@ -67,9 +68,10 @@ protected void doIt(VirtualFrame frame, Object object, Object key,
6768
}
6869

6970
@Specialization(replaces = "doIt")
70-
protected void doItUncached(VirtualFrame frame, Object object, Object key) {
71+
@TruffleBoundary
72+
protected void doItUncached(Object object, Object key) {
7173
Object klass = GetClassNode.getUncached().execute(object);
7274
Object method = LookupCallableSlotInMRONode.getUncached(SpecialMethodSlot.DelAttr).execute(klass);
73-
CallBinaryMethodNode.getUncached().executeObject(frame, method, object, key);
75+
CallBinaryMethodNode.getUncached().executeObject(null, method, object, key);
7476
}
7577
}

0 commit comments

Comments
 (0)