Skip to content

Commit dc5fbf6

Browse files
timfelAdam Hrbac
authored andcommitted
fix default breakpointhook for top level breakpoints
1 parent a749dea commit dc5fbf6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/lib/PyImportImport.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
import com.oracle.graal.python.builtins.objects.function.PKeyword;
5252
import com.oracle.graal.python.nodes.PNodeWithState;
5353
import com.oracle.graal.python.nodes.call.CallNode;
54+
import com.oracle.graal.python.nodes.object.GetDictFromGlobalsNode;
5455
import com.oracle.graal.python.nodes.statement.AbstractImportNode;
5556
import com.oracle.truffle.api.dsl.Cached;
5657
import com.oracle.truffle.api.dsl.Specialization;
@@ -77,12 +78,13 @@ Object doGeneric(VirtualFrame frame, Object moduleName,
7778
@Cached PyObjectGetAttr getAttrNode,
7879
@Cached CallNode callNode,
7980
@Cached AbstractImportNode.PyImportImportModuleLevelObject importModuleLevelObject,
80-
@Cached PyEvalGetGlobals getGlobals) {
81+
@Cached PyEvalGetGlobals getGlobals,
82+
@Cached GetDictFromGlobalsNode getDictFromGlobals) {
8183
// Get the builtins from current globals
8284
Object globals = getGlobals.execute(frame);
8385
Object builtins;
8486
if (noGlobalsProfile.profile(globals != null)) {
85-
builtins = getItemNode.execute(frame, globals, T___BUILTINS__);
87+
builtins = getItemNode.execute(frame, getDictFromGlobals.execute(globals), T___BUILTINS__);
8688
} else {
8789
// No globals -- use standard builtins, and fake globals
8890
builtins = importModuleLevelObject.execute(frame, getContext(), T_BUILTINS, null, null, 0);

0 commit comments

Comments
 (0)