|
85 | 85 | import com.oracle.graal.python.builtins.objects.module.PythonModule;
|
86 | 86 | import com.oracle.graal.python.builtins.objects.str.NativeCharSequence;
|
87 | 87 | import com.oracle.graal.python.builtins.objects.str.PString;
|
| 88 | +import com.oracle.graal.python.builtins.objects.type.LazyPythonClass; |
88 | 89 | import com.oracle.graal.python.builtins.objects.type.PythonAbstractClass;
|
89 | 90 | import com.oracle.graal.python.builtins.objects.type.PythonManagedClass;
|
90 | 91 | import com.oracle.graal.python.builtins.objects.type.TypeNodes;
|
@@ -2192,43 +2193,43 @@ public static void transformToNative(PythonContext context, PFrame.Reference fra
|
2192 | 2193 | @GenerateUncached
|
2193 | 2194 | public abstract static class PRaiseNativeNode extends Node {
|
2194 | 2195 |
|
2195 |
| - public final int raiseInt(Frame frame, int errorValue, PythonBuiltinClassType errType, String format, Object... arguments) { |
| 2196 | + public final int raiseInt(Frame frame, int errorValue, LazyPythonClass errType, String format, Object... arguments) { |
2196 | 2197 | return executeInt(frame, errorValue, errType, format, arguments);
|
2197 | 2198 | }
|
2198 | 2199 |
|
2199 |
| - public final Object raise(Frame frame, Object errorValue, PythonBuiltinClassType errType, String format, Object... arguments) { |
| 2200 | + public final Object raise(Frame frame, Object errorValue, LazyPythonClass errType, String format, Object... arguments) { |
2200 | 2201 | return execute(frame, errorValue, errType, format, arguments);
|
2201 | 2202 | }
|
2202 | 2203 |
|
2203 |
| - public final int raiseIntWithoutFrame(int errorValue, PythonBuiltinClassType errType, String format, Object... arguments) { |
| 2204 | + public final int raiseIntWithoutFrame(int errorValue, LazyPythonClass errType, String format, Object... arguments) { |
2204 | 2205 | return executeInt(null, errorValue, errType, format, arguments);
|
2205 | 2206 | }
|
2206 | 2207 |
|
2207 |
| - public final Object raiseWithoutFrame(Object errorValue, PythonBuiltinClassType errType, String format, Object... arguments) { |
| 2208 | + public final Object raiseWithoutFrame(Object errorValue, LazyPythonClass errType, String format, Object... arguments) { |
2208 | 2209 | return execute(null, errorValue, errType, format, arguments);
|
2209 | 2210 | }
|
2210 | 2211 |
|
2211 |
| - public abstract Object execute(Frame frame, Object errorValue, PythonBuiltinClassType errType, String format, Object[] arguments); |
| 2212 | + public abstract Object execute(Frame frame, Object errorValue, LazyPythonClass errType, String format, Object[] arguments); |
2212 | 2213 |
|
2213 |
| - public abstract int executeInt(Frame frame, int errorValue, PythonBuiltinClassType errType, String format, Object[] arguments); |
| 2214 | + public abstract int executeInt(Frame frame, int errorValue, LazyPythonClass errType, String format, Object[] arguments); |
2214 | 2215 |
|
2215 | 2216 | @Specialization
|
2216 |
| - int doInt(Frame frame, int errorValue, PythonBuiltinClassType errType, String format, Object[] arguments, |
| 2217 | + static int doInt(Frame frame, int errorValue, LazyPythonClass errType, String format, Object[] arguments, |
2217 | 2218 | @Shared("raiseNode") @Cached PRaiseNode raiseNode,
|
2218 | 2219 | @Shared("transformExceptionToNativeNode") @Cached TransformExceptionToNativeNode transformExceptionToNativeNode) {
|
2219 | 2220 | raiseNative(frame, errType, format, arguments, raiseNode, transformExceptionToNativeNode);
|
2220 | 2221 | return errorValue;
|
2221 | 2222 | }
|
2222 | 2223 |
|
2223 | 2224 | @Specialization
|
2224 |
| - Object doObject(Frame frame, Object errorValue, PythonBuiltinClassType errType, String format, Object[] arguments, |
| 2225 | + static Object doObject(Frame frame, Object errorValue, LazyPythonClass errType, String format, Object[] arguments, |
2225 | 2226 | @Shared("raiseNode") @Cached PRaiseNode raiseNode,
|
2226 | 2227 | @Shared("transformExceptionToNativeNode") @Cached TransformExceptionToNativeNode transformExceptionToNativeNode) {
|
2227 | 2228 | raiseNative(frame, errType, format, arguments, raiseNode, transformExceptionToNativeNode);
|
2228 | 2229 | return errorValue;
|
2229 | 2230 | }
|
2230 | 2231 |
|
2231 |
| - public static void raiseNative(Frame frame, PythonBuiltinClassType errType, String format, Object[] arguments, PRaiseNode raiseNode, |
| 2232 | + public static void raiseNative(Frame frame, LazyPythonClass errType, String format, Object[] arguments, PRaiseNode raiseNode, |
2232 | 2233 | TransformExceptionToNativeNode transformExceptionToNativeNode) {
|
2233 | 2234 | try {
|
2234 | 2235 | throw raiseNode.execute(errType, PNone.NO_VALUE, format, arguments);
|
|
0 commit comments