Skip to content

Commit 6bde9ef

Browse files
committed
Fix builtins.modules.io.TextIOWrapperNodes.CheckClosedNode and use inliningTarged as current node
An inlined PRaiseNode is passed to a static method that in turn passes it to the LanguageReference#get method, which results in the PythonLanguage instance not being a partial evaluation constant, which among other things causes compilation failures.
1 parent d1de6d9 commit 6bde9ef

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/io/TextIOWrapperNodes.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,11 +183,10 @@ static void error(@SuppressWarnings("unused") PTextIO self,
183183
static void checkGeneric(VirtualFrame frame, PTextIO self,
184184
@Bind Node inliningTarget,
185185
@Cached PyObjectGetAttr getAttr,
186-
@Cached PyObjectIsTrueNode isTrueNode,
187-
@Cached PRaiseNode raiseNode) {
186+
@Cached PyObjectIsTrueNode isTrueNode) {
188187
Object res = getAttr.execute(frame, inliningTarget, self.getBuffer(), T_CLOSED);
189188
if (isTrueNode.execute(frame, res)) {
190-
error(self, raiseNode);
189+
error(self, inliningTarget);
191190
}
192191
}
193192
}

0 commit comments

Comments
 (0)