gh-115419: Change default sym to not_null (GH-116562)

This commit is contained in:
Ken Jin 2024-03-13 20:57:48 +08:00 committed by GitHub
parent fcd49b4f47
commit 617aca9e74
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 104 additions and 94 deletions

View file

@ -449,6 +449,14 @@ dummy_func(void) {
}
}
op(_LOAD_ATTR, (owner -- attr, self_or_null if (oparg & 1))) {
(void)owner;
OUT_OF_SPACE_IF_NULL(attr = sym_new_not_null(ctx));
if (oparg & 1) {
OUT_OF_SPACE_IF_NULL(self_or_null = sym_new_unknown(ctx));
}
}
op(_LOAD_ATTR_MODULE, (index/1, owner -- attr, null if (oparg & 1))) {
(void)index;
OUT_OF_SPACE_IF_NULL(null = sym_new_null(ctx));
@ -513,7 +521,6 @@ dummy_func(void) {
OUT_OF_SPACE_IF_NULL(self = sym_new_not_null(ctx));
}
op(_CHECK_FUNCTION_EXACT_ARGS, (func_version/2, callable, self_or_null, unused[oparg] -- callable, self_or_null, unused[oparg])) {
if (!sym_set_type(callable, &PyFunction_Type)) {
goto hit_bottom;