|
60 | 60 | import com.oracle.graal.python.nodes.PNodeWithContext;
|
61 | 61 | import com.oracle.graal.python.nodes.PRaiseNode;
|
62 | 62 | import com.oracle.graal.python.nodes.argument.CreateArgumentsNodeGen.ApplyKeywordsNodeGen;
|
63 |
| -import com.oracle.graal.python.nodes.argument.CreateArgumentsNodeGen.ApplyKeywordsNodeGen.SearchNamedParameterNodeGen; |
64 | 63 | import com.oracle.graal.python.nodes.argument.CreateArgumentsNodeGen.ApplyPositionalArgumentsNodeGen;
|
65 | 64 | import com.oracle.graal.python.nodes.argument.CreateArgumentsNodeGen.CreateAndCheckArgumentsNodeGen;
|
66 | 65 | import com.oracle.graal.python.nodes.argument.CreateArgumentsNodeGen.FillDefaultsNodeGen;
|
67 | 66 | import com.oracle.graal.python.nodes.argument.CreateArgumentsNodeGen.FillKwDefaultsNodeGen;
|
68 | 67 | import com.oracle.graal.python.nodes.argument.CreateArgumentsNodeGen.FindKwDefaultNodeGen;
|
69 | 68 | import com.oracle.graal.python.nodes.argument.CreateArgumentsNodeGen.HandleTooManyArgumentsNodeGen;
|
| 69 | +import com.oracle.graal.python.nodes.argument.CreateArgumentsNodeGen.ApplyKeywordsNodeGen.SearchNamedParameterNodeGen; |
70 | 70 | import com.oracle.graal.python.nodes.builtins.FunctionNodes.GetDefaultsNode;
|
71 | 71 | import com.oracle.graal.python.nodes.builtins.FunctionNodes.GetKeywordDefaultsNode;
|
72 | 72 | import com.oracle.graal.python.nodes.builtins.FunctionNodes.GetSignatureNode;
|
@@ -375,7 +375,7 @@ protected abstract static class HandleTooManyArgumentsNode extends PNodeWithCont
|
375 | 375 | public abstract PException execute(Object[] scope_w, Object callable, Signature signature, int co_argcount, int co_kwonlyargcount, int ndefaults, int avail, boolean methodcall,
|
376 | 376 | int adjustCount);
|
377 | 377 |
|
378 |
| - @Specialization(guards = {"co_kwonlyargcount == cachedKwOnlyArgCount"}) |
| 378 | + @Specialization(guards = {"co_kwonlyargcount == cachedKwOnlyArgCount", "cachedKwOnlyArgCount <= 32"}) |
379 | 379 | @ExplodeLoop
|
380 | 380 | static PException doCached(Object[] scope_w, Object callable, Signature signature, int co_argcount, @SuppressWarnings("unused") int co_kwonlyargcount, int ndefaults, int avail,
|
381 | 381 | boolean methodcall, int adjustCount,
|
@@ -543,7 +543,7 @@ int getUserArgumentLength(Object[] arguments) {
|
543 | 543 | return PArguments.getUserArgumentLength(arguments);
|
544 | 544 | }
|
545 | 545 |
|
546 |
| - @Specialization(guards = {"kwLen == keywords.length", "calleeSignature == cachedSignature"}) |
| 546 | + @Specialization(guards = {"kwLen == keywords.length", "calleeSignature == cachedSignature", "kwLen <= 32"}) |
547 | 547 | @ExplodeLoop
|
548 | 548 | Object[] applyCached(Object callee, @SuppressWarnings("unused") Signature calleeSignature, Object[] arguments, PKeyword[] keywords,
|
549 | 549 | @Cached PRaiseNode raise,
|
@@ -687,7 +687,7 @@ private static String joinNames(List<String> names) {
|
687 | 687 | protected abstract static class SearchNamedParameterNode extends Node {
|
688 | 688 | public abstract int execute(String[] parameters, String name);
|
689 | 689 |
|
690 |
| - @Specialization(guards = "cachedLen == parameters.length") |
| 690 | + @Specialization(guards = {"cachedLen == parameters.length", "cachedLen <= 32"}) |
691 | 691 | @ExplodeLoop
|
692 | 692 | int cached(String[] parameters, String name,
|
693 | 693 | @Cached("parameters.length") int cachedLen) {
|
@@ -877,7 +877,7 @@ protected abstract static class FindKwDefaultNode extends Node {
|
877 | 877 |
|
878 | 878 | public abstract PKeyword execute(PKeyword[] kwdefaults, String kwname);
|
879 | 879 |
|
880 |
| - @Specialization(guards = {"kwdefaults.length == cachedLength", "kwdefaults.length < 32"}) |
| 880 | + @Specialization(guards = {"kwdefaults.length == cachedLength", "cachedLength < 32"}) |
881 | 881 | @ExplodeLoop(kind = LoopExplosionKind.FULL_UNROLL_UNTIL_RETURN)
|
882 | 882 | PKeyword doCached(PKeyword[] kwdefaults, String kwname,
|
883 | 883 | @Cached("kwdefaults.length") int cachedLength) {
|
|
0 commit comments