|
42 | 42 |
|
43 | 43 | import com.oracle.graal.python.builtins.PythonBuiltinClassType;
|
44 | 44 | import com.oracle.graal.python.builtins.objects.PNone;
|
45 |
| -import com.oracle.graal.python.builtins.objects.exception.PBaseException; |
46 | 45 | import com.oracle.graal.python.builtins.objects.function.PArguments;
|
47 | 46 | import com.oracle.graal.python.builtins.objects.generator.ThrowData;
|
48 | 47 | import com.oracle.graal.python.builtins.objects.object.PythonObjectLibrary;
|
49 |
| -import com.oracle.graal.python.builtins.objects.traceback.GetTracebackNode; |
50 | 48 | import com.oracle.graal.python.nodes.WriteUnraisableNode;
|
51 | 49 | import com.oracle.graal.python.nodes.attributes.GetAttributeNode;
|
52 | 50 | import com.oracle.graal.python.nodes.call.CallNode;
|
@@ -76,7 +74,6 @@ public class YieldFromNode extends AbstractYieldNode implements GeneratorControl
|
76 | 74 | @Child private GetAttributeNode getSendNode;
|
77 | 75 | @Child private CallNode callSendNode;
|
78 | 76 |
|
79 |
| - @Child private GetTracebackNode getTracebackNode; |
80 | 77 | @Child private WriteUnraisableNode writeUnraisableNode;
|
81 | 78 |
|
82 | 79 | @Child private IsBuiltinClassProfile stopIterProfile1 = IsBuiltinClassProfile.create();
|
@@ -176,12 +173,7 @@ public Object execute(VirtualFrame frame) {
|
176 | 173 | throw PException.fromObject(_e.pythonException, this, _e.withJavaStacktrace);
|
177 | 174 | }
|
178 | 175 | try {
|
179 |
| - PBaseException pythonException = _e.pythonException; |
180 |
| - Object excTraceback = ensureGetTracebackNode().execute(pythonException.getTraceback()); |
181 |
| - if (excTraceback == null) { |
182 |
| - excTraceback = PNone.NONE; |
183 |
| - } |
184 |
| - _y = getCallThrowNode().execute(frame, _m, pythonException, PNone.NONE, excTraceback); |
| 176 | + _y = getCallThrowNode().execute(frame, _m, _e.pythonException); |
185 | 177 | } catch (PException _e2) {
|
186 | 178 | access.setIterator(frame, iteratorSlot, null);
|
187 | 179 | _e2.expectStopIteration(stopIterProfile2);
|
@@ -276,14 +268,6 @@ private CallNode getCallSendNode() {
|
276 | 268 | return callSendNode;
|
277 | 269 | }
|
278 | 270 |
|
279 |
| - private GetTracebackNode ensureGetTracebackNode() { |
280 |
| - if (getTracebackNode == null) { |
281 |
| - CompilerDirectives.transferToInterpreterAndInvalidate(); |
282 |
| - getTracebackNode = insert(GetTracebackNode.create()); |
283 |
| - } |
284 |
| - return getTracebackNode; |
285 |
| - } |
286 |
| - |
287 | 271 | private WriteUnraisableNode ensureWriteUnraisable() {
|
288 | 272 | if (writeUnraisableNode == null) {
|
289 | 273 | CompilerDirectives.transferToInterpreterAndInvalidate();
|
|
0 commit comments