|
72 | 72 | import com.oracle.graal.python.builtins.objects.cext.capi.ExternalFunctionNodes.PExternalFunctionWrapper;
|
73 | 73 | import com.oracle.graal.python.builtins.objects.cext.common.CExtCommonNodes.AsNativePrimitiveNode;
|
74 | 74 | import com.oracle.graal.python.builtins.objects.cext.common.CExtCommonNodes.ConvertPIntToPrimitiveNode;
|
| 75 | +import com.oracle.graal.python.builtins.objects.cext.common.CExtCommonNodes.TransformExceptionToNativeNode; |
75 | 76 | import com.oracle.graal.python.builtins.objects.cext.common.CExtContext;
|
76 | 77 | import com.oracle.graal.python.builtins.objects.cext.common.CExtToJavaNode;
|
77 | 78 | import com.oracle.graal.python.builtins.objects.cext.common.CExtToNativeNode;
|
|
141 | 142 | import com.oracle.graal.python.nodes.attributes.WriteAttributeToPythonObjectNode;
|
142 | 143 | import com.oracle.graal.python.nodes.call.CallNode;
|
143 | 144 | import com.oracle.graal.python.nodes.classes.IsSubtypeNode;
|
144 |
| -import com.oracle.graal.python.nodes.frame.GetCurrentFrameRef; |
145 | 145 | import com.oracle.graal.python.nodes.object.GetClassNode;
|
146 | 146 | import com.oracle.graal.python.nodes.object.IsNode;
|
147 | 147 | import com.oracle.graal.python.nodes.util.CannotCastException;
|
148 | 148 | import com.oracle.graal.python.nodes.util.CastToJavaIntExactNode;
|
149 | 149 | import com.oracle.graal.python.runtime.PythonContext;
|
150 |
| -import com.oracle.graal.python.runtime.PythonContext.GetThreadStateNode; |
151 | 150 | import com.oracle.graal.python.runtime.PythonContext.PythonThreadState;
|
152 | 151 | import com.oracle.graal.python.runtime.PythonImageBuildOptions;
|
153 | 152 | import com.oracle.graal.python.runtime.PythonOptions;
|
@@ -254,17 +253,13 @@ public static void executeUncached(GraalHPyContext nativeContext, PException e)
|
254 | 253 | }
|
255 | 254 |
|
256 | 255 | public static void executeUncached(PException e) {
|
257 |
| - HPyTransformExceptionToNativeNodeGen.getUncached().execute(null, PythonContext.get(null).getHPyContext(), e); |
| 256 | + HPyTransformExceptionToNativeNodeGen.getUncached().execute(null, null, e); |
258 | 257 | }
|
259 | 258 |
|
260 | 259 | @Specialization
|
261 |
| - static void setCurrentException(Frame frame, Node inliningTarget, GraalHPyContext nativeContext, PException e, |
262 |
| - @Cached GetCurrentFrameRef getCurrentFrameRef, |
263 |
| - @Cached GetThreadStateNode getThreadStateNode) { |
264 |
| - // TODO connect f_back |
265 |
| - getCurrentFrameRef.execute(frame, inliningTarget).markAsEscaped(); |
266 |
| - PythonThreadState threadState = getThreadStateNode.execute(inliningTarget, nativeContext.getContext()); |
267 |
| - threadState.setCurrentException(e); |
| 260 | + static void setCurrentException(Frame frame, Node inliningTarget, @SuppressWarnings("unused") GraalHPyContext nativeContext, PException e, |
| 261 | + @Cached TransformExceptionToNativeNode transformExceptionToNativeNode) { |
| 262 | + transformExceptionToNativeNode.execute(frame, inliningTarget, e); |
268 | 263 | }
|
269 | 264 | }
|
270 | 265 |
|
|
0 commit comments