Skip to content

Commit 39cda33

Browse files
committed
[GR-73555] Fix PGenerator assertion.
PullRequest: graalpython/4282
2 parents 8143970 + efa868d commit 39cda33

2 files changed

Lines changed: 1 addition & 3 deletions

File tree

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/generator/PGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public BytecodeDSLState(PBytecodeDSLRootNode rootNode, Object[] arguments, Conti
132132
}
133133

134134
public Object handleResult(PGenerator generator, ContinuationResult result) {
135-
assert result.getContinuationRootNode() == null || result.getContinuationRootNode().getFrameDescriptor() == generator.frame.getFrameDescriptor();
135+
assert PBytecodeDSLRootNode.cast(result.getContinuationRootNode()).getFrameDescriptor() == generator.frame.getFrameDescriptor();
136136
isStarted = true;
137137
// We must keep the previous root so that we can load its BytecodeNode to resolve BCI to
138138
// location, the next continuation node may have different BytecodeNode

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/bytecode_dsl/PBytecodeDSLRootNode.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,7 +1136,6 @@ public static Object doOther(Object ex) {
11361136
* provides access to the generator frame even before the generator was started.
11371137
*/
11381138
@Yield
1139-
@SuppressWarnings("truffle-interpreted-performance") // blocked by GR-69979
11401139
public static final class YieldGenerator {
11411140
@Specialization
11421141
public static Object doYield(
@@ -1199,7 +1198,6 @@ public static Object doObject(Object value,
11991198
* Performs some clean-up steps before suspending execution, and updates the generator state.
12001199
*/
12011200
@Yield
1202-
@SuppressWarnings("truffle-interpreted-performance") // blocked by GR-69979
12031201
public static final class YieldValue {
12041202
@Specialization
12051203
public static Object doObject(Object value,

0 commit comments

Comments
 (0)