51
51
import com .oracle .graal .python .builtins .objects .function .PKeyword ;
52
52
import com .oracle .graal .python .nodes .PNodeWithState ;
53
53
import com .oracle .graal .python .nodes .call .CallNode ;
54
+ import com .oracle .graal .python .nodes .object .GetDictFromGlobalsNode ;
54
55
import com .oracle .graal .python .nodes .statement .AbstractImportNode ;
55
56
import com .oracle .truffle .api .dsl .Cached ;
56
57
import com .oracle .truffle .api .dsl .Specialization ;
@@ -77,12 +78,13 @@ Object doGeneric(VirtualFrame frame, Object moduleName,
77
78
@ Cached PyObjectGetAttr getAttrNode ,
78
79
@ Cached CallNode callNode ,
79
80
@ Cached AbstractImportNode .PyImportImportModuleLevelObject importModuleLevelObject ,
80
- @ Cached PyEvalGetGlobals getGlobals ) {
81
+ @ Cached PyEvalGetGlobals getGlobals ,
82
+ @ Cached GetDictFromGlobalsNode getDictFromGlobals ) {
81
83
// Get the builtins from current globals
82
84
Object globals = getGlobals .execute (frame );
83
85
Object builtins ;
84
86
if (noGlobalsProfile .profile (globals != null )) {
85
- builtins = getItemNode .execute (frame , globals , T___BUILTINS__ );
87
+ builtins = getItemNode .execute (frame , getDictFromGlobals . execute ( globals ) , T___BUILTINS__ );
86
88
} else {
87
89
// No globals -- use standard builtins, and fake globals
88
90
builtins = importModuleLevelObject .execute (frame , getContext (), T_BUILTINS , null , null , 0 );
0 commit comments