if (sym_is_null(self_or_null) || sym_is_not_null(self_or_null)) {
PyFunctionObject *func = (PyFunctionObject *)sym_get_const(ctx, callable);
PyCodeObject *co = (PyCodeObject *)func->func_code;
- if (co->co_argcount == oparg + !sym_is_null(self_or_null)) {
+ if (co->co_argcount == oparg + sym_is_not_null(self_or_null)) {
ADD_OP(_NOP, 0 ,0);
}
}
op(_GUARD_CALLABLE_BUILTIN_O, (callable, self_or_null, args[oparg] -- callable, self_or_null, args[oparg])) {
PyObject *callable_o = sym_get_const(ctx, callable);
- if (callable_o && sym_matches_type(callable, &PyCFunction_Type)) {
+ if (callable_o && sym_matches_type(callable, &PyCFunction_Type) &&
+ (sym_is_not_null(self_or_null) || sym_is_null(self_or_null))) {
int total_args = oparg;
- if (!sym_is_null(self_or_null)) {
+ if (sym_is_not_null(self_or_null)) {
total_args++;
}
if (total_args == 1 && PyCFunction_GET_FLAGS(callable_o) == METH_O) {
op(_GUARD_CALLABLE_METHOD_DESCRIPTOR_O, (callable, self_or_null, args[oparg] -- callable, self_or_null, args[oparg])) {
PyObject *callable_o = sym_get_const(ctx, callable);
- if (callable_o && sym_matches_type(callable, &PyMethodDescr_Type)) {
+ if (callable_o && sym_matches_type(callable, &PyMethodDescr_Type) &&
+ (sym_is_not_null(self_or_null) || sym_is_null(self_or_null))) {
int total_args = oparg;
if (sym_is_not_null(self_or_null)) {
total_args++;
op(_GUARD_CALLABLE_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS, (callable, self_or_null, args[oparg] -- callable, self_or_null, args[oparg])) {
PyObject *callable_o = sym_get_const(ctx, callable);
- if (callable_o && sym_matches_type(callable, &PyMethodDescr_Type)) {
+ if (callable_o && sym_matches_type(callable, &PyMethodDescr_Type) &&
+ (sym_is_not_null(self_or_null) || sym_is_null(self_or_null))) {
int total_args = oparg;
if (sym_is_not_null(self_or_null)) {
total_args++;
op(_GUARD_CALLABLE_METHOD_DESCRIPTOR_NOARGS, (callable, self_or_null, args[oparg] -- callable, self_or_null, args[oparg])) {
PyObject *callable_o = sym_get_const(ctx, callable);
- if (callable_o && sym_matches_type(callable, &PyMethodDescr_Type)) {
+ if (callable_o && sym_matches_type(callable, &PyMethodDescr_Type) &&
+ (sym_is_not_null(self_or_null) || sym_is_null(self_or_null))) {
int total_args = oparg;
if (sym_is_not_null(self_or_null)) {
total_args++;
op(_GUARD_CALLABLE_METHOD_DESCRIPTOR_FAST, (callable, self_or_null, args[oparg] -- callable, self_or_null, args[oparg])) {
PyObject *callable_o = sym_get_const(ctx, callable);
- if (callable_o && sym_matches_type(callable, &PyMethodDescr_Type)) {
+ if (callable_o && sym_matches_type(callable, &PyMethodDescr_Type) &&
+ (sym_is_not_null(self_or_null) || sym_is_null(self_or_null))) {
int total_args = oparg;
if (sym_is_not_null(self_or_null)) {
total_args++;
if (sym_is_null(self_or_null) || sym_is_not_null(self_or_null)) {
PyFunctionObject *func = (PyFunctionObject *)sym_get_const(ctx, callable);
PyCodeObject *co = (PyCodeObject *)func->func_code;
- if (co->co_argcount == oparg + !sym_is_null(self_or_null)) {
+ if (co->co_argcount == oparg + sym_is_not_null(self_or_null)) {
ADD_OP(_NOP, 0 ,0);
}
}
self_or_null = stack_pointer[-1 - oparg];
callable = stack_pointer[-2 - oparg];
PyObject *callable_o = sym_get_const(ctx, callable);
- if (callable_o && sym_matches_type(callable, &PyCFunction_Type)) {
+ if (callable_o && sym_matches_type(callable, &PyCFunction_Type) &&
+ (sym_is_not_null(self_or_null) || sym_is_null(self_or_null))) {
int total_args = oparg;
- if (!sym_is_null(self_or_null)) {
+ if (sym_is_not_null(self_or_null)) {
total_args++;
}
if (total_args == 1 && PyCFunction_GET_FLAGS(callable_o) == METH_O) {
self_or_null = stack_pointer[-1 - oparg];
callable = stack_pointer[-2 - oparg];
PyObject *callable_o = sym_get_const(ctx, callable);
- if (callable_o && sym_matches_type(callable, &PyMethodDescr_Type)) {
+ if (callable_o && sym_matches_type(callable, &PyMethodDescr_Type) &&
+ (sym_is_not_null(self_or_null) || sym_is_null(self_or_null))) {
int total_args = oparg;
if (sym_is_not_null(self_or_null)) {
total_args++;
self_or_null = stack_pointer[-1 - oparg];
callable = stack_pointer[-2 - oparg];
PyObject *callable_o = sym_get_const(ctx, callable);
- if (callable_o && sym_matches_type(callable, &PyMethodDescr_Type)) {
+ if (callable_o && sym_matches_type(callable, &PyMethodDescr_Type) &&
+ (sym_is_not_null(self_or_null) || sym_is_null(self_or_null))) {
int total_args = oparg;
if (sym_is_not_null(self_or_null)) {
total_args++;
self_or_null = stack_pointer[-1 - oparg];
callable = stack_pointer[-2 - oparg];
PyObject *callable_o = sym_get_const(ctx, callable);
- if (callable_o && sym_matches_type(callable, &PyMethodDescr_Type)) {
+ if (callable_o && sym_matches_type(callable, &PyMethodDescr_Type) &&
+ (sym_is_not_null(self_or_null) || sym_is_null(self_or_null))) {
int total_args = oparg;
if (sym_is_not_null(self_or_null)) {
total_args++;
self_or_null = stack_pointer[-1 - oparg];
callable = stack_pointer[-2 - oparg];
PyObject *callable_o = sym_get_const(ctx, callable);
- if (callable_o && sym_matches_type(callable, &PyMethodDescr_Type)) {
+ if (callable_o && sym_matches_type(callable, &PyMethodDescr_Type) &&
+ (sym_is_not_null(self_or_null) || sym_is_null(self_or_null))) {
int total_args = oparg;
if (sym_is_not_null(self_or_null)) {
total_args++;