51
51
import com .oracle .graal .python .nodes .call .special .LookupSpecialMethodSlotNode ;
52
52
import com .oracle .graal .python .nodes .object .GetClassNode ;
53
53
import com .oracle .truffle .api .dsl .Cached ;
54
+ import com .oracle .truffle .api .dsl .Cached .Shared ;
54
55
import com .oracle .truffle .api .dsl .GenerateUncached ;
55
56
import com .oracle .truffle .api .dsl .ImportStatic ;
56
57
import com .oracle .truffle .api .dsl .Specialization ;
@@ -68,10 +69,10 @@ public abstract class PyObjectDelItem extends Node {
68
69
69
70
@ Specialization
70
71
static void doWithFrame (VirtualFrame frame , Object primary , Object index ,
71
- @ Cached GetClassNode getClassNode ,
72
+ @ Shared ( "getclass" ) @ Cached GetClassNode getClassNode ,
72
73
@ Cached ("create(DelItem)" ) LookupSpecialMethodSlotNode lookupDelitem ,
73
- @ Cached PRaiseNode raise ,
74
- @ Cached CallBinaryMethodNode callDelitem ) {
74
+ @ Shared ( "raiseNode" ) @ Cached PRaiseNode raise ,
75
+ @ Shared ( "callNode" ) @ Cached CallBinaryMethodNode callDelitem ) {
75
76
Object delitem = lookupDelitem .execute (frame , getClassNode .execute (primary ), primary );
76
77
if (delitem == PNone .NO_VALUE ) {
77
78
throw raise .raise (TypeError , ErrorMessages .OBJ_DOESNT_SUPPORT_DELETION , primary );
@@ -81,10 +82,10 @@ static void doWithFrame(VirtualFrame frame, Object primary, Object index,
81
82
82
83
@ Specialization (replaces = "doWithFrame" )
83
84
static void doGeneric (Object primary , Object index ,
84
- @ Cached GetClassNode getClassNode ,
85
+ @ Shared ( "getclass" ) @ Cached GetClassNode getClassNode ,
85
86
@ Cached (parameters = "DelItem" ) LookupCallableSlotInMRONode lookupDelitem ,
86
- @ Cached PRaiseNode raise ,
87
- @ Cached CallBinaryMethodNode callDelitem ) {
87
+ @ Shared ( "raiseNode" ) @ Cached PRaiseNode raise ,
88
+ @ Shared ( "callNode" ) @ Cached CallBinaryMethodNode callDelitem ) {
88
89
Object setitem = lookupDelitem .execute (getClassNode .execute (primary ));
89
90
if (setitem == PNone .NO_VALUE ) {
90
91
throw raise .raise (TypeError , ErrorMessages .OBJ_DOESNT_SUPPORT_DELETION , primary );
0 commit comments