File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/argument Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -82,12 +82,19 @@ private Object returnValue(PKeyword[] keywords) {
82
82
}
83
83
}
84
84
85
+ @ Specialization (guards = {"getKwargLen(frame) == cachedLen" , "cachedLen == 0" }, limit = "1" )
86
+ @ ExplodeLoop
87
+ Object noKeywordArgs (@ SuppressWarnings ("unused" ) VirtualFrame frame ,
88
+ @ SuppressWarnings ("unused" ) @ Cached ("getAndCheckKwargLen(frame)" ) int cachedLen ) {
89
+ return returnValue (PKeyword .EMPTY_KEYWORDS );
90
+ }
91
+
85
92
@ Specialization (guards = {"getKwargLen(frame) == cachedLen" }, limit = "getLimit()" )
86
93
@ ExplodeLoop
87
94
Object extractKwargs (VirtualFrame frame ,
88
95
@ Cached ("getAndCheckKwargLen(frame)" ) int cachedLen ) {
89
96
PKeyword [] keywordArguments = PArguments .getKeywordArguments (frame );
90
- PKeyword [] remArguments = new PKeyword [keywordArguments . length ];
97
+ PKeyword [] remArguments = new PKeyword [cachedLen ];
91
98
CompilerAsserts .compilationConstant (keywordNames .length );
92
99
int i = 0 ;
93
100
for (int j = 0 ; j < cachedLen ; j ++) {
You can’t perform that action at this time.
0 commit comments