|
81 | 81 | import com.oracle.graal.python.builtins.objects.type.TypeNodes.IsSameTypeNode;
|
82 | 82 | import com.oracle.graal.python.builtins.objects.type.TypeNodesFactory.IsSameTypeNodeGen;
|
83 | 83 | import com.oracle.graal.python.nodes.ErrorMessages;
|
84 |
| -import com.oracle.graal.python.nodes.bytecode.PBytecodeRootNode; |
85 | 84 | import com.oracle.graal.python.nodes.PNodeWithContext;
|
86 | 85 | import com.oracle.graal.python.nodes.SpecialAttributeNames;
|
87 | 86 | import com.oracle.graal.python.nodes.argument.ReadIndexedArgumentNode;
|
88 | 87 | import com.oracle.graal.python.nodes.attributes.LookupInheritedSlotNode;
|
89 | 88 | import com.oracle.graal.python.nodes.attributes.ReadAttributeFromObjectNode;
|
| 89 | +import com.oracle.graal.python.nodes.bytecode.PBytecodeRootNode; |
90 | 90 | import com.oracle.graal.python.nodes.call.special.CallTernaryMethodNode;
|
91 | 91 | import com.oracle.graal.python.nodes.call.special.LookupAndCallBinaryNode;
|
92 | 92 | import com.oracle.graal.python.nodes.classes.IsSubtypeNode;
|
@@ -323,14 +323,11 @@ private Object getClassFromTarget(VirtualFrame frame, PFrame target, HashingStor
|
323 | 323 | // sys._getframe(1).f_code.co_closure?
|
324 | 324 | PDict locals = (PDict) target.getLocalsDict();
|
325 | 325 | Object cls = hlib.getItemWithState(locals.getDictStorage(), SpecialAttributeNames.T___CLASS__, PArguments.getThreadState(frame));
|
326 |
| - if (cls instanceof PCell) { |
327 |
| - cls = getGetRefNode().execute((PCell) cls); |
328 |
| - if (cls == null) { |
329 |
| - // the cell is empty |
330 |
| - throw raise(PythonErrorType.RuntimeError, ErrorMessages.SUPER_EMPTY_CLASS); |
331 |
| - } |
| 326 | + if (cls == null) { |
| 327 | + // the cell is empty |
| 328 | + throw raise(PythonErrorType.RuntimeError, ErrorMessages.SUPER_EMPTY_CLASS); |
332 | 329 | }
|
333 |
| - return cls != null ? cls : PNone.NONE; |
| 330 | + return cls; |
334 | 331 | }
|
335 | 332 |
|
336 | 333 | private CellBuiltins.GetRefNode getGetRefNode() {
|
|
0 commit comments