5757import com .oracle .graal .python .nodes .builtins .FunctionNodesFactory .GetSignatureNodeGen ;
5858import com .oracle .truffle .api .Assumption ;
5959import com .oracle .truffle .api .dsl .Cached ;
60+ import com .oracle .truffle .api .dsl .GenerateUncached ;
6061import com .oracle .truffle .api .dsl .ImportStatic ;
6162import com .oracle .truffle .api .dsl .Specialization ;
6263
6364public abstract class FunctionNodes {
65+ @ GenerateUncached
6466 public abstract static class GetFunctionDefaultsNode extends PNodeWithContext {
6567 public abstract Object [] execute (PFunction function );
6668
@@ -83,6 +85,7 @@ public static GetFunctionDefaultsNode create() {
8385 }
8486
8587 @ ImportStatic (PGuards .class )
88+ @ GenerateUncached
8689 public abstract static class GetDefaultsNode extends PNodeWithContext {
8790 private static Object [] doFunctionInternal (GetFunctionDefaultsNode getFunctionDefaultsNode , PFunction function ) {
8891 return getFunctionDefaultsNode .execute (function );
@@ -118,6 +121,7 @@ public static GetDefaultsNode create() {
118121 }
119122 }
120123
124+ @ GenerateUncached
121125 public abstract static class GetFunctionKeywordDefaultsNode extends PNodeWithContext {
122126 public abstract PKeyword [] execute (PFunction function );
123127
@@ -140,6 +144,7 @@ public static GetFunctionKeywordDefaultsNode create() {
140144 }
141145
142146 @ ImportStatic (PGuards .class )
147+ @ GenerateUncached
143148 public abstract static class GetKeywordDefaultsNode extends PNodeWithContext {
144149 private static PKeyword [] doFunctionInternal (GetFunctionKeywordDefaultsNode getFunctionKeywordDefaultsNode , PFunction function ) {
145150 return getFunctionKeywordDefaultsNode .execute (function );
@@ -175,6 +180,7 @@ public static GetKeywordDefaultsNode create() {
175180 }
176181 }
177182
183+ @ GenerateUncached
178184 public abstract static class GetFunctionCodeNode extends PNodeWithContext {
179185 public abstract PCode execute (PFunction function );
180186
@@ -186,7 +192,7 @@ PCode getCodeCached(@SuppressWarnings("unused") PFunction self,
186192 return cachedCode ;
187193 }
188194
189- @ Specialization
195+ @ Specialization ( replaces = "getCodeCached" )
190196 PCode getCodeUncached (PFunction self ) {
191197 return self .getCode ();
192198 }
@@ -197,6 +203,7 @@ public static GetFunctionCodeNode create() {
197203 }
198204
199205 @ ImportStatic (PGuards .class )
206+ @ GenerateUncached
200207 public abstract static class GetSignatureNode extends PNodeWithContext {
201208 private static Signature doFunctionInternal (GetFunctionCodeNode getFunctionCodeNode , PFunction function ) {
202209 return getFunctionCodeNode .execute (function ).getSignature ();
0 commit comments