GH-131798: Optimize away isinstance calls in the JIT (GH-134369)
This commit is contained in:
@@ -5287,18 +5287,54 @@ dummy_func(
|
||||
value = PyStackRef_FromPyObjectBorrow(ptr);
|
||||
}
|
||||
|
||||
tier2 pure op (_POP_TOP_LOAD_CONST_INLINE_BORROW, (ptr/4, pop -- value)) {
|
||||
tier2 op(_POP_CALL, (callable, null --)) {
|
||||
(void)null; // Silence compiler warnings about unused variables
|
||||
DEAD(null);
|
||||
PyStackRef_CLOSE(callable);
|
||||
}
|
||||
|
||||
tier2 op(_POP_CALL_ONE, (callable, null, pop --)) {
|
||||
PyStackRef_CLOSE(pop);
|
||||
(void)null; // Silence compiler warnings about unused variables
|
||||
DEAD(null);
|
||||
PyStackRef_CLOSE(callable);
|
||||
}
|
||||
|
||||
tier2 op(_POP_CALL_TWO, (callable, null, pop1, pop2 --)) {
|
||||
PyStackRef_CLOSE(pop2);
|
||||
PyStackRef_CLOSE(pop1);
|
||||
(void)null; // Silence compiler warnings about unused variables
|
||||
DEAD(null);
|
||||
PyStackRef_CLOSE(callable);
|
||||
}
|
||||
|
||||
tier2 op(_POP_TOP_LOAD_CONST_INLINE_BORROW, (ptr/4, pop -- value)) {
|
||||
PyStackRef_CLOSE(pop);
|
||||
value = PyStackRef_FromPyObjectBorrow(ptr);
|
||||
}
|
||||
|
||||
tier2 pure op(_POP_TWO_LOAD_CONST_INLINE_BORROW, (ptr/4, pop1, pop2 -- value)) {
|
||||
tier2 op(_POP_TWO_LOAD_CONST_INLINE_BORROW, (ptr/4, pop1, pop2 -- value)) {
|
||||
PyStackRef_CLOSE(pop2);
|
||||
PyStackRef_CLOSE(pop1);
|
||||
value = PyStackRef_FromPyObjectBorrow(ptr);
|
||||
}
|
||||
|
||||
tier2 pure op(_POP_CALL_TWO_LOAD_CONST_INLINE_BORROW, (ptr/4, callable, null, pop1, pop2 -- value)) {
|
||||
tier2 op(_POP_CALL_LOAD_CONST_INLINE_BORROW, (ptr/4, callable, null -- value)) {
|
||||
(void)null; // Silence compiler warnings about unused variables
|
||||
DEAD(null);
|
||||
PyStackRef_CLOSE(callable);
|
||||
value = PyStackRef_FromPyObjectBorrow(ptr);
|
||||
}
|
||||
|
||||
tier2 op(_POP_CALL_ONE_LOAD_CONST_INLINE_BORROW, (ptr/4, callable, null, pop -- value)) {
|
||||
PyStackRef_CLOSE(pop);
|
||||
(void)null; // Silence compiler warnings about unused variables
|
||||
DEAD(null);
|
||||
PyStackRef_CLOSE(callable);
|
||||
value = PyStackRef_FromPyObjectBorrow(ptr);
|
||||
}
|
||||
|
||||
tier2 op(_POP_CALL_TWO_LOAD_CONST_INLINE_BORROW, (ptr/4, callable, null, pop1, pop2 -- value)) {
|
||||
PyStackRef_CLOSE(pop2);
|
||||
PyStackRef_CLOSE(pop1);
|
||||
(void)null; // Silence compiler warnings about unused variables
|
||||
|
||||
Reference in New Issue
Block a user