mirror of
https://github.com/python/cpython.git
synced 2025-07-08 03:45:36 +00:00
GH-131798: Optimize away isinstance calls in the JIT (GH-134369)
This commit is contained in:
parent
fade146cfb
commit
484e00379b
9 changed files with 312 additions and 61 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue