@@ -124,24 +124,26 @@ Object callSpecialMethodSlotCallTarget(VirtualFrame frame, BuiltinMethodDescript
124
124
return invokeNode .execute (frame , callTarget , arguments );
125
125
}
126
126
127
- @ Specialization (guards = {"func == cachedFunc" , "builtinNode != null" , "frame != null || unusedFrame" }, limit = "getCallSiteInlineCacheMaxDepth()" , assumptions = "singleContextAssumption()" )
127
+ @ Specialization (guards = {"isSingleContext()" , "func == cachedFunc" , "builtinNode != null" , "frame != null || unusedFrame" }, //
128
+ limit = "getCallSiteInlineCacheMaxDepth()" )
128
129
Object callObjectSingle (VirtualFrame frame , @ SuppressWarnings ("unused" ) PBuiltinFunction func , Object receiver ,
129
130
@ SuppressWarnings ("unused" ) @ Cached ("func" ) PBuiltinFunction cachedFunc ,
130
131
@ Cached ("getUnary(frame, func)" ) PythonUnaryBuiltinNode builtinNode ,
131
132
@ SuppressWarnings ("unused" ) @ Cached ("frameIsUnused(builtinNode)" ) boolean unusedFrame ) {
132
133
return builtinNode .execute (frame , receiver );
133
134
}
134
135
135
- @ Specialization (guards = {"func.getCallTarget() == ct" , "builtinNode != null" , "frame != null || unusedFrame" }, limit = "getCallSiteInlineCacheMaxDepth()" )
136
+ @ Specialization (guards = {"func.getCallTarget() == ct" , "builtinNode != null" , "frame != null || unusedFrame" }, //
137
+ limit = "getCallSiteInlineCacheMaxDepth()" )
136
138
Object callObject (VirtualFrame frame , @ SuppressWarnings ("unused" ) PBuiltinFunction func , Object receiver ,
137
139
@ SuppressWarnings ("unused" ) @ Cached (value = "func.getCallTarget()" ) RootCallTarget ct ,
138
140
@ Cached ("getUnary(frame, func)" ) PythonUnaryBuiltinNode builtinNode ,
139
141
@ SuppressWarnings ("unused" ) @ Cached ("frameIsUnused(builtinNode)" ) boolean unusedFrame ) {
140
142
return builtinNode .execute (frame , receiver );
141
143
}
142
144
143
- @ Specialization (guards = {"func == cachedFunc" , "builtinNode != null" , "!takesSelfArg" ,
144
- "frame != null || unusedFrame" }, limit = "getCallSiteInlineCacheMaxDepth()" , assumptions = "singleContextAssumption()" )
145
+ @ Specialization (guards = {"isSingleContext()" , " func == cachedFunc" , "builtinNode != null" , "!takesSelfArg" ,
146
+ "frame != null || unusedFrame" }, limit = "getCallSiteInlineCacheMaxDepth()" )
145
147
Object callMethodSingleContext (VirtualFrame frame , @ SuppressWarnings ("unused" ) PBuiltinMethod func , Object receiver ,
146
148
@ SuppressWarnings ("unused" ) @ Cached ("func" ) PBuiltinMethod cachedFunc ,
147
149
@ SuppressWarnings ("unused" ) @ Cached ("takesSelfArg(func)" ) boolean takesSelfArg ,
@@ -150,7 +152,8 @@ Object callMethodSingleContext(VirtualFrame frame, @SuppressWarnings("unused") P
150
152
return builtinNode .execute (frame , receiver );
151
153
}
152
154
153
- @ Specialization (guards = {"builtinNode != null" , "getCallTarget(func, getCt) == ct" , "!takesSelfArg" , "frame != null || unusedFrame" }, limit = "getCallSiteInlineCacheMaxDepth()" )
155
+ @ Specialization (guards = {"builtinNode != null" , "getCallTarget(func, getCt) == ct" , "!takesSelfArg" ,
156
+ "frame != null || unusedFrame" }, limit = "getCallSiteInlineCacheMaxDepth()" )
154
157
Object callMethod (VirtualFrame frame , @ SuppressWarnings ("unused" ) PBuiltinMethod func , Object receiver ,
155
158
@ SuppressWarnings ("unused" ) @ Cached GetCallTargetNode getCt ,
156
159
@ SuppressWarnings ("unused" ) @ Cached ("getCallTarget(func, getCt)" ) RootCallTarget ct ,
@@ -160,8 +163,8 @@ Object callMethod(VirtualFrame frame, @SuppressWarnings("unused") PBuiltinMethod
160
163
return builtinNode .execute (frame , receiver );
161
164
}
162
165
163
- @ Specialization (guards = {"func == cachedFunc" , "builtinNode != null" , "takesSelfArg" ,
164
- "frame != null || unusedFrame" }, limit = "getCallSiteInlineCacheMaxDepth()" , assumptions = "singleContextAssumption()" )
166
+ @ Specialization (guards = {"isSingleContext()" , " func == cachedFunc" , "builtinNode != null" , "takesSelfArg" ,
167
+ "frame != null || unusedFrame" }, limit = "getCallSiteInlineCacheMaxDepth()" )
165
168
Object callSelfMethodSingleContext (VirtualFrame frame , @ SuppressWarnings ("unused" ) PBuiltinMethod func , Object arg ,
166
169
@ SuppressWarnings ("unused" ) @ Cached (value = "func" , weak = true ) PBuiltinMethod cachedFunc ,
167
170
@ SuppressWarnings ("unused" ) @ Cached ("takesSelfArg(func)" ) boolean takesSelfArg ,
@@ -170,7 +173,8 @@ Object callSelfMethodSingleContext(VirtualFrame frame, @SuppressWarnings("unused
170
173
return builtinNode .execute (frame , func .getSelf (), arg );
171
174
}
172
175
173
- @ Specialization (guards = {"builtinNode != null" , "getCallTarget(func, getCt) == ct" , "takesSelfArg" , "frame != null || unusedFrame" }, limit = "getCallSiteInlineCacheMaxDepth()" )
176
+ @ Specialization (guards = {"builtinNode != null" , "getCallTarget(func, getCt) == ct" , "takesSelfArg" ,
177
+ "frame != null || unusedFrame" }, limit = "getCallSiteInlineCacheMaxDepth()" )
174
178
Object callSelfMethod (VirtualFrame frame , @ SuppressWarnings ("unused" ) PBuiltinMethod func , Object arg ,
175
179
@ SuppressWarnings ("unused" ) @ Cached GetCallTargetNode getCt ,
176
180
@ SuppressWarnings ("unused" ) @ Cached ("getCallTarget(func, getCt)" ) RootCallTarget ct ,
@@ -180,8 +184,8 @@ Object callSelfMethod(VirtualFrame frame, @SuppressWarnings("unused") PBuiltinMe
180
184
return builtinNode .execute (frame , func .getSelf (), arg );
181
185
}
182
186
183
- @ Specialization (guards = {"func == cachedFunc" , "builtinNode != null" , "!takesSelfArg" , "minArgs == 1" ,
184
- "frame != null || unusedFrame" }, limit = "getCallSiteInlineCacheMaxDepth()" , assumptions = "singleContextAssumption()" )
187
+ @ Specialization (guards = {"isSingleContext()" , " func == cachedFunc" , "builtinNode != null" , "!takesSelfArg" , "minArgs == 1" ,
188
+ "frame != null || unusedFrame" }, limit = "getCallSiteInlineCacheMaxDepth()" )
185
189
static Object callBinaryMethodSingleContext (VirtualFrame frame , @ SuppressWarnings ("unused" ) PBuiltinMethod func , Object receiver ,
186
190
@ SuppressWarnings ("unused" ) @ Cached ("func" ) PBuiltinMethod cachedFunc ,
187
191
@ SuppressWarnings ("unused" ) @ Cached ("takesSelfArg(func)" ) boolean takesSelfArg ,
@@ -191,7 +195,8 @@ static Object callBinaryMethodSingleContext(VirtualFrame frame, @SuppressWarning
191
195
return builtinNode .execute (frame , receiver , PNone .NO_VALUE );
192
196
}
193
197
194
- @ Specialization (guards = {"builtinNode != null" , "minArgs == 1" , "getCallTarget(func, getCt) == ct" , "!takesSelfArg" , "frame != null || unusedFrame" }, limit = "getCallSiteInlineCacheMaxDepth()" )
198
+ @ Specialization (guards = {"builtinNode != null" , "minArgs == 1" , "getCallTarget(func, getCt) == ct" , "!takesSelfArg" ,
199
+ "frame != null || unusedFrame" }, limit = "getCallSiteInlineCacheMaxDepth()" )
195
200
static Object callBinaryMethod (VirtualFrame frame , @ SuppressWarnings ("unused" ) PBuiltinMethod func , Object arg ,
196
201
@ SuppressWarnings ("unused" ) @ Cached GetCallTargetNode getCt ,
197
202
@ SuppressWarnings ("unused" ) @ Cached ("getCallTarget(func, getCt)" ) RootCallTarget ct ,
0 commit comments