File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/generator Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 41
41
package com .oracle .graal .python .builtins .objects .generator ;
42
42
43
43
import com .oracle .graal .python .builtins .objects .exception .PBaseException ;
44
+ import com .oracle .truffle .api .CompilerDirectives .ValueType ;
44
45
46
+ /**
47
+ * Simple wrapper to pass a {@link PBaseException} between {@code throw} method and the
48
+ * {@code yield} expression that will continue the control flow. The wrapper is needed because the
49
+ * same frame slot is used to pass value from {@code send}, so the exception for {@code throw} needs
50
+ * to be wrapped in something that is not a Python object to be able to distinguish the two cases.
51
+ */
52
+ @ ValueType
45
53
public final class ThrowData {
46
54
public final PBaseException pythonException ;
47
55
public final boolean withJavaStacktrace ;
You can’t perform that action at this time.
0 commit comments