@@ -229,15 +229,14 @@ public abstract static class GetCodeSignatureNode extends PNodeWithContext {
229
229
230
230
@ Specialization (guards = {"cachedCode == code" , "isSingleContext(inliningTarget)" }, limit = "2" )
231
231
static Signature doCached (Node inliningTarget , @ SuppressWarnings ("unused" ) PCode code ,
232
- @ Cached ("code" ) PCode cachedCode ,
233
- @ Cached InlinedBranchProfile firstExecution ) {
234
- return getInSingleContextMode (inliningTarget , cachedCode , firstExecution );
232
+ @ Cached ("code" ) PCode cachedCode ) {
233
+ return getInSingleContextMode (inliningTarget , cachedCode );
235
234
}
236
235
237
236
public static Signature getInSingleContextMode (Node inliningTarget , PFunction fun , InlinedBranchProfile firstExecution ) {
238
237
assert isSingleContext (inliningTarget );
239
- if (CompilerDirectives .inCompiledCode () && CompilerDirectives .isPartialEvaluationConstant (fun ) && fun . getCodeStableAssumption (). isValid ( )) {
240
- getInSingleContextMode (inliningTarget , fun .getCode (), firstExecution );
238
+ if (CompilerDirectives .inCompiledCode () && CompilerDirectives .isPartialEvaluationConstant (fun . getCode () )) {
239
+ getInSingleContextMode (inliningTarget , fun .getCode ());
241
240
}
242
241
PCode code = fun .getCode ();
243
242
Signature signature = code .signature ;
@@ -249,12 +248,11 @@ public static Signature getInSingleContextMode(Node inliningTarget, PFunction fu
249
248
return signature ;
250
249
}
251
250
252
- public static Signature getInSingleContextMode (Node inliningTarget , PCode code , InlinedBranchProfile firstExecution ) {
251
+ public static Signature getInSingleContextMode (Node inliningTarget , PCode code ) {
253
252
assert isSingleContext (inliningTarget );
254
253
CompilerAsserts .partialEvaluationConstant (code );
255
- if (!firstExecution .wasEntered (inliningTarget )) {
256
- firstExecution .enter (inliningTarget );
257
- CompilerDirectives .transferToInterpreter ();
254
+ if (code .signature == null ) {
255
+ CompilerDirectives .transferToInterpreterAndInvalidate ();
258
256
code .initializeSignature (code .initializeCallTarget ());
259
257
}
260
258
return code .signature ;
0 commit comments