]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-115419: Change default sym to not_null (GH-116562)
authorKen Jin <kenjin@python.org>
Wed, 13 Mar 2024 12:57:48 +0000 (20:57 +0800)
committerGitHub <noreply@github.com>
Wed, 13 Mar 2024 12:57:48 +0000 (20:57 +0800)
Lib/test/test_generated_cases.py
Python/optimizer_bytecodes.c
Python/optimizer_cases.c.h
Tools/cases_generator/optimizer_generator.py

index 32c2c2fca05c4ed8244c203a20834b7a69ec9a30..7b9dd36f85454f94f84e48f915df27063444865f 100644 (file)
@@ -908,7 +908,7 @@ class TestGeneratedAbstractCases(unittest.TestCase):
 
         case OP2: {
             _Py_UopsSymbol *out;
-            out = sym_new_unknown(ctx);
+            out = sym_new_not_null(ctx);
             if (out == NULL) goto out_of_space;
             stack_pointer[-1] = out;
             break;
@@ -933,7 +933,7 @@ class TestGeneratedAbstractCases(unittest.TestCase):
         output = """
         case OP: {
             _Py_UopsSymbol *out;
-            out = sym_new_unknown(ctx);
+            out = sym_new_not_null(ctx);
             if (out == NULL) goto out_of_space;
             stack_pointer[-1] = out;
             break;
index e3f7c9822103e61e63d5a4328b77524063f988ef..54abbcd74d7934068ea8df690cbe51ee37c7dce5 100644 (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;
index fed5730d2e50c187a45524805f85285d24140065..7e4214cc9acf3997aa60f0847f6a4be3b82870b0 100644 (file)
@@ -80,7 +80,7 @@
 
         case _END_SEND: {
             _Py_UopsSymbol *value;
-            value = sym_new_unknown(ctx);
+            value = sym_new_not_null(ctx);
             if (value == NULL) goto out_of_space;
             stack_pointer[-2] = value;
             stack_pointer += -1;
@@ -89,7 +89,7 @@
 
         case _UNARY_NEGATIVE: {
             _Py_UopsSymbol *res;
-            res = sym_new_unknown(ctx);
+            res = sym_new_not_null(ctx);
             if (res == NULL) goto out_of_space;
             stack_pointer[-1] = res;
             break;
@@ -97,7 +97,7 @@
 
         case _UNARY_NOT: {
             _Py_UopsSymbol *res;
-            res = sym_new_unknown(ctx);
+            res = sym_new_not_null(ctx);
             if (res == NULL) goto out_of_space;
             stack_pointer[-1] = res;
             break;
 
         case _REPLACE_WITH_TRUE: {
             _Py_UopsSymbol *res;
-            res = sym_new_unknown(ctx);
+            res = sym_new_not_null(ctx);
             if (res == NULL) goto out_of_space;
             stack_pointer[-1] = res;
             break;
 
         case _UNARY_INVERT: {
             _Py_UopsSymbol *res;
-            res = sym_new_unknown(ctx);
+            res = sym_new_not_null(ctx);
             if (res == NULL) goto out_of_space;
             stack_pointer[-1] = res;
             break;
 
         case _BINARY_SUBSCR: {
             _Py_UopsSymbol *res;
-            res = sym_new_unknown(ctx);
+            res = sym_new_not_null(ctx);
             if (res == NULL) goto out_of_space;
             stack_pointer[-2] = res;
             stack_pointer += -1;
 
         case _BINARY_SLICE: {
             _Py_UopsSymbol *res;
-            res = sym_new_unknown(ctx);
+            res = sym_new_not_null(ctx);
             if (res == NULL) goto out_of_space;
             stack_pointer[-3] = res;
             stack_pointer += -2;
 
         case _BINARY_SUBSCR_LIST_INT: {
             _Py_UopsSymbol *res;
-            res = sym_new_unknown(ctx);
+            res = sym_new_not_null(ctx);
             if (res == NULL) goto out_of_space;
             stack_pointer[-2] = res;
             stack_pointer += -1;
 
         case _BINARY_SUBSCR_STR_INT: {
             _Py_UopsSymbol *res;
-            res = sym_new_unknown(ctx);
+            res = sym_new_not_null(ctx);
             if (res == NULL) goto out_of_space;
             stack_pointer[-2] = res;
             stack_pointer += -1;
 
         case _BINARY_SUBSCR_TUPLE_INT: {
             _Py_UopsSymbol *res;
-            res = sym_new_unknown(ctx);
+            res = sym_new_not_null(ctx);
             if (res == NULL) goto out_of_space;
             stack_pointer[-2] = res;
             stack_pointer += -1;
 
         case _BINARY_SUBSCR_DICT: {
             _Py_UopsSymbol *res;
-            res = sym_new_unknown(ctx);
+            res = sym_new_not_null(ctx);
             if (res == NULL) goto out_of_space;
             stack_pointer[-2] = res;
             stack_pointer += -1;
 
         case _CALL_INTRINSIC_1: {
             _Py_UopsSymbol *res;
-            res = sym_new_unknown(ctx);
+            res = sym_new_not_null(ctx);
             if (res == NULL) goto out_of_space;
             stack_pointer[-1] = res;
             break;
 
         case _CALL_INTRINSIC_2: {
             _Py_UopsSymbol *res;
-            res = sym_new_unknown(ctx);
+            res = sym_new_not_null(ctx);
             if (res == NULL) goto out_of_space;
             stack_pointer[-2] = res;
             stack_pointer += -1;
 
         case _GET_AITER: {
             _Py_UopsSymbol *iter;
-            iter = sym_new_unknown(ctx);
+            iter = sym_new_not_null(ctx);
             if (iter == NULL) goto out_of_space;
             stack_pointer[-1] = iter;
             break;
 
         case _GET_ANEXT: {
             _Py_UopsSymbol *awaitable;
-            awaitable = sym_new_unknown(ctx);
+            awaitable = sym_new_not_null(ctx);
             if (awaitable == NULL) goto out_of_space;
             stack_pointer[0] = awaitable;
             stack_pointer += 1;
 
         case _GET_AWAITABLE: {
             _Py_UopsSymbol *iter;
-            iter = sym_new_unknown(ctx);
+            iter = sym_new_not_null(ctx);
             if (iter == NULL) goto out_of_space;
             stack_pointer[-1] = iter;
             break;
 
         case _LOAD_ASSERTION_ERROR: {
             _Py_UopsSymbol *value;
-            value = sym_new_unknown(ctx);
+            value = sym_new_not_null(ctx);
             if (value == NULL) goto out_of_space;
             stack_pointer[0] = value;
             stack_pointer += 1;
 
         case _LOAD_BUILD_CLASS: {
             _Py_UopsSymbol *bc;
-            bc = sym_new_unknown(ctx);
+            bc = sym_new_not_null(ctx);
             if (bc == NULL) goto out_of_space;
             stack_pointer[0] = bc;
             stack_pointer += 1;
         case _UNPACK_SEQUENCE_TWO_TUPLE: {
             _Py_UopsSymbol *val1;
             _Py_UopsSymbol *val0;
-            val1 = sym_new_unknown(ctx);
+            val1 = sym_new_not_null(ctx);
             if (val1 == NULL) goto out_of_space;
-            val0 = sym_new_unknown(ctx);
+            val0 = sym_new_not_null(ctx);
             if (val0 == NULL) goto out_of_space;
             stack_pointer[-1] = val1;
             stack_pointer[0] = val0;
             _Py_UopsSymbol **values;
             values = &stack_pointer[-1];
             for (int _i = oparg; --_i >= 0;) {
-                values[_i] = sym_new_unknown(ctx);
+                values[_i] = sym_new_not_null(ctx);
                 if (values[_i] == NULL) goto out_of_space;
             }
             stack_pointer += -1 + oparg;
             _Py_UopsSymbol **values;
             values = &stack_pointer[-1];
             for (int _i = oparg; --_i >= 0;) {
-                values[_i] = sym_new_unknown(ctx);
+                values[_i] = sym_new_not_null(ctx);
                 if (values[_i] == NULL) goto out_of_space;
             }
             stack_pointer += -1 + oparg;
 
         case _LOAD_LOCALS: {
             _Py_UopsSymbol *locals;
-            locals = sym_new_unknown(ctx);
+            locals = sym_new_not_null(ctx);
             if (locals == NULL) goto out_of_space;
             stack_pointer[0] = locals;
             stack_pointer += 1;
 
         case _LOAD_FROM_DICT_OR_GLOBALS: {
             _Py_UopsSymbol *v;
-            v = sym_new_unknown(ctx);
+            v = sym_new_not_null(ctx);
             if (v == NULL) goto out_of_space;
             stack_pointer[-1] = v;
             break;
 
         case _LOAD_NAME: {
             _Py_UopsSymbol *v;
-            v = sym_new_unknown(ctx);
+            v = sym_new_not_null(ctx);
             if (v == NULL) goto out_of_space;
             stack_pointer[0] = v;
             stack_pointer += 1;
         case _LOAD_GLOBAL: {
             _Py_UopsSymbol *res;
             _Py_UopsSymbol *null = NULL;
-            res = sym_new_unknown(ctx);
+            res = sym_new_not_null(ctx);
             if (res == NULL) goto out_of_space;
             null = sym_new_null(ctx);
             if (null == NULL) goto out_of_space;
         case _LOAD_GLOBAL_MODULE: {
             _Py_UopsSymbol *res;
             _Py_UopsSymbol *null = NULL;
-            res = sym_new_unknown(ctx);
+            res = sym_new_not_null(ctx);
             if (res == NULL) goto out_of_space;
             null = sym_new_null(ctx);
             if (null == NULL) goto out_of_space;
         case _LOAD_GLOBAL_BUILTINS: {
             _Py_UopsSymbol *res;
             _Py_UopsSymbol *null = NULL;
-            res = sym_new_unknown(ctx);
+            res = sym_new_not_null(ctx);
             if (res == NULL) goto out_of_space;
             null = sym_new_null(ctx);
             if (null == NULL) goto out_of_space;
 
         case _LOAD_FROM_DICT_OR_DEREF: {
             _Py_UopsSymbol *value;
-            value = sym_new_unknown(ctx);
+            value = sym_new_not_null(ctx);
             if (value == NULL) goto out_of_space;
             stack_pointer[-1] = value;
             break;
 
         case _LOAD_DEREF: {
             _Py_UopsSymbol *value;
-            value = sym_new_unknown(ctx);
+            value = sym_new_not_null(ctx);
             if (value == NULL) goto out_of_space;
             stack_pointer[0] = value;
             stack_pointer += 1;
 
         case _BUILD_STRING: {
             _Py_UopsSymbol *str;
-            str = sym_new_unknown(ctx);
+            str = sym_new_not_null(ctx);
             if (str == NULL) goto out_of_space;
             stack_pointer[-oparg] = str;
             stack_pointer += 1 - oparg;
 
         case _BUILD_TUPLE: {
             _Py_UopsSymbol *tup;
-            tup = sym_new_unknown(ctx);
+            tup = sym_new_not_null(ctx);
             if (tup == NULL) goto out_of_space;
             stack_pointer[-oparg] = tup;
             stack_pointer += 1 - oparg;
 
         case _BUILD_LIST: {
             _Py_UopsSymbol *list;
-            list = sym_new_unknown(ctx);
+            list = sym_new_not_null(ctx);
             if (list == NULL) goto out_of_space;
             stack_pointer[-oparg] = list;
             stack_pointer += 1 - oparg;
 
         case _BUILD_SET: {
             _Py_UopsSymbol *set;
-            set = sym_new_unknown(ctx);
+            set = sym_new_not_null(ctx);
             if (set == NULL) goto out_of_space;
             stack_pointer[-oparg] = set;
             stack_pointer += 1 - oparg;
 
         case _BUILD_MAP: {
             _Py_UopsSymbol *map;
-            map = sym_new_unknown(ctx);
+            map = sym_new_not_null(ctx);
             if (map == NULL) goto out_of_space;
             stack_pointer[-oparg*2] = map;
             stack_pointer += 1 - oparg*2;
 
         case _BUILD_CONST_KEY_MAP: {
             _Py_UopsSymbol *map;
-            map = sym_new_unknown(ctx);
+            map = sym_new_not_null(ctx);
             if (map == NULL) goto out_of_space;
             stack_pointer[-1 - oparg] = map;
             stack_pointer += -oparg;
 
         case _LOAD_SUPER_ATTR_ATTR: {
             _Py_UopsSymbol *attr;
-            attr = sym_new_unknown(ctx);
+            attr = sym_new_not_null(ctx);
             if (attr == NULL) goto out_of_space;
             stack_pointer[-3] = attr;
             stack_pointer += -2;
         case _LOAD_SUPER_ATTR_METHOD: {
             _Py_UopsSymbol *attr;
             _Py_UopsSymbol *self_or_null;
-            attr = sym_new_unknown(ctx);
+            attr = sym_new_not_null(ctx);
             if (attr == NULL) goto out_of_space;
-            self_or_null = sym_new_unknown(ctx);
+            self_or_null = sym_new_not_null(ctx);
             if (self_or_null == NULL) goto out_of_space;
             stack_pointer[-3] = attr;
             stack_pointer[-2] = self_or_null;
         }
 
         case _LOAD_ATTR: {
+            _Py_UopsSymbol *owner;
             _Py_UopsSymbol *attr;
             _Py_UopsSymbol *self_or_null = NULL;
-            attr = sym_new_unknown(ctx);
-            if (attr == NULL) goto out_of_space;
-            self_or_null = sym_new_unknown(ctx);
-            if (self_or_null == NULL) goto out_of_space;
+            owner = stack_pointer[-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));
+            }
             stack_pointer[-1] = attr;
             if (oparg & 1) stack_pointer[0] = self_or_null;
             stack_pointer += (oparg & 1);
 
         case _CONTAINS_OP_SET: {
             _Py_UopsSymbol *b;
-            b = sym_new_unknown(ctx);
+            b = sym_new_not_null(ctx);
             if (b == NULL) goto out_of_space;
             stack_pointer[-2] = b;
             stack_pointer += -1;
 
         case _CONTAINS_OP_DICT: {
             _Py_UopsSymbol *b;
-            b = sym_new_unknown(ctx);
+            b = sym_new_not_null(ctx);
             if (b == NULL) goto out_of_space;
             stack_pointer[-2] = b;
             stack_pointer += -1;
         case _CHECK_EG_MATCH: {
             _Py_UopsSymbol *rest;
             _Py_UopsSymbol *match;
-            rest = sym_new_unknown(ctx);
+            rest = sym_new_not_null(ctx);
             if (rest == NULL) goto out_of_space;
-            match = sym_new_unknown(ctx);
+            match = sym_new_not_null(ctx);
             if (match == NULL) goto out_of_space;
             stack_pointer[-2] = rest;
             stack_pointer[-1] = match;
 
         case _CHECK_EXC_MATCH: {
             _Py_UopsSymbol *b;
-            b = sym_new_unknown(ctx);
+            b = sym_new_not_null(ctx);
             if (b == NULL) goto out_of_space;
             stack_pointer[-1] = b;
             break;
 
         case _IS_NONE: {
             _Py_UopsSymbol *b;
-            b = sym_new_unknown(ctx);
+            b = sym_new_not_null(ctx);
             if (b == NULL) goto out_of_space;
             stack_pointer[-1] = b;
             break;
 
         case _GET_LEN: {
             _Py_UopsSymbol *len_o;
-            len_o = sym_new_unknown(ctx);
+            len_o = sym_new_not_null(ctx);
             if (len_o == NULL) goto out_of_space;
             stack_pointer[0] = len_o;
             stack_pointer += 1;
 
         case _MATCH_CLASS: {
             _Py_UopsSymbol *attrs;
-            attrs = sym_new_unknown(ctx);
+            attrs = sym_new_not_null(ctx);
             if (attrs == NULL) goto out_of_space;
             stack_pointer[-3] = attrs;
             stack_pointer += -2;
 
         case _MATCH_MAPPING: {
             _Py_UopsSymbol *res;
-            res = sym_new_unknown(ctx);
+            res = sym_new_not_null(ctx);
             if (res == NULL) goto out_of_space;
             stack_pointer[0] = res;
             stack_pointer += 1;
 
         case _MATCH_SEQUENCE: {
             _Py_UopsSymbol *res;
-            res = sym_new_unknown(ctx);
+            res = sym_new_not_null(ctx);
             if (res == NULL) goto out_of_space;
             stack_pointer[0] = res;
             stack_pointer += 1;
 
         case _MATCH_KEYS: {
             _Py_UopsSymbol *values_or_none;
-            values_or_none = sym_new_unknown(ctx);
+            values_or_none = sym_new_not_null(ctx);
             if (values_or_none == NULL) goto out_of_space;
             stack_pointer[0] = values_or_none;
             stack_pointer += 1;
 
         case _GET_ITER: {
             _Py_UopsSymbol *iter;
-            iter = sym_new_unknown(ctx);
+            iter = sym_new_not_null(ctx);
             if (iter == NULL) goto out_of_space;
             stack_pointer[-1] = iter;
             break;
 
         case _GET_YIELD_FROM_ITER: {
             _Py_UopsSymbol *iter;
-            iter = sym_new_unknown(ctx);
+            iter = sym_new_not_null(ctx);
             if (iter == NULL) goto out_of_space;
             stack_pointer[-1] = iter;
             break;
 
         case _FOR_ITER_TIER_TWO: {
             _Py_UopsSymbol *next;
-            next = sym_new_unknown(ctx);
+            next = sym_new_not_null(ctx);
             if (next == NULL) goto out_of_space;
             stack_pointer[0] = next;
             stack_pointer += 1;
 
         case _ITER_NEXT_LIST: {
             _Py_UopsSymbol *next;
-            next = sym_new_unknown(ctx);
+            next = sym_new_not_null(ctx);
             if (next == NULL) goto out_of_space;
             stack_pointer[0] = next;
             stack_pointer += 1;
 
         case _ITER_NEXT_TUPLE: {
             _Py_UopsSymbol *next;
-            next = sym_new_unknown(ctx);
+            next = sym_new_not_null(ctx);
             if (next == NULL) goto out_of_space;
             stack_pointer[0] = next;
             stack_pointer += 1;
         case _BEFORE_ASYNC_WITH: {
             _Py_UopsSymbol *exit;
             _Py_UopsSymbol *res;
-            exit = sym_new_unknown(ctx);
+            exit = sym_new_not_null(ctx);
             if (exit == NULL) goto out_of_space;
-            res = sym_new_unknown(ctx);
+            res = sym_new_not_null(ctx);
             if (res == NULL) goto out_of_space;
             stack_pointer[-1] = exit;
             stack_pointer[0] = res;
         case _BEFORE_WITH: {
             _Py_UopsSymbol *exit;
             _Py_UopsSymbol *res;
-            exit = sym_new_unknown(ctx);
+            exit = sym_new_not_null(ctx);
             if (exit == NULL) goto out_of_space;
-            res = sym_new_unknown(ctx);
+            res = sym_new_not_null(ctx);
             if (res == NULL) goto out_of_space;
             stack_pointer[-1] = exit;
             stack_pointer[0] = res;
 
         case _WITH_EXCEPT_START: {
             _Py_UopsSymbol *res;
-            res = sym_new_unknown(ctx);
+            res = sym_new_not_null(ctx);
             if (res == NULL) goto out_of_space;
             stack_pointer[0] = res;
             stack_pointer += 1;
         case _PUSH_EXC_INFO: {
             _Py_UopsSymbol *prev_exc;
             _Py_UopsSymbol *new_exc;
-            prev_exc = sym_new_unknown(ctx);
+            prev_exc = sym_new_not_null(ctx);
             if (prev_exc == NULL) goto out_of_space;
-            new_exc = sym_new_unknown(ctx);
+            new_exc = sym_new_not_null(ctx);
             if (new_exc == NULL) goto out_of_space;
             stack_pointer[-1] = prev_exc;
             stack_pointer[0] = new_exc;
 
         case _LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES: {
             _Py_UopsSymbol *attr;
-            attr = sym_new_unknown(ctx);
+            attr = sym_new_not_null(ctx);
             if (attr == NULL) goto out_of_space;
             stack_pointer[-1] = attr;
             break;
 
         case _LOAD_ATTR_NONDESCRIPTOR_NO_DICT: {
             _Py_UopsSymbol *attr;
-            attr = sym_new_unknown(ctx);
+            attr = sym_new_not_null(ctx);
             if (attr == NULL) goto out_of_space;
             stack_pointer[-1] = attr;
             break;
 
         case _CALL_TYPE_1: {
             _Py_UopsSymbol *res;
-            res = sym_new_unknown(ctx);
+            res = sym_new_not_null(ctx);
             if (res == NULL) goto out_of_space;
             stack_pointer[-3] = res;
             stack_pointer += -2;
 
         case _CALL_STR_1: {
             _Py_UopsSymbol *res;
-            res = sym_new_unknown(ctx);
+            res = sym_new_not_null(ctx);
             if (res == NULL) goto out_of_space;
             stack_pointer[-3] = res;
             stack_pointer += -2;
 
         case _CALL_TUPLE_1: {
             _Py_UopsSymbol *res;
-            res = sym_new_unknown(ctx);
+            res = sym_new_not_null(ctx);
             if (res == NULL) goto out_of_space;
             stack_pointer[-3] = res;
             stack_pointer += -2;
 
         case _CALL_BUILTIN_CLASS: {
             _Py_UopsSymbol *res;
-            res = sym_new_unknown(ctx);
+            res = sym_new_not_null(ctx);
             if (res == NULL) goto out_of_space;
             stack_pointer[-2 - oparg] = res;
             stack_pointer += -1 - oparg;
 
         case _CALL_BUILTIN_O: {
             _Py_UopsSymbol *res;
-            res = sym_new_unknown(ctx);
+            res = sym_new_not_null(ctx);
             if (res == NULL) goto out_of_space;
             stack_pointer[-2 - oparg] = res;
             stack_pointer += -1 - oparg;
 
         case _CALL_BUILTIN_FAST: {
             _Py_UopsSymbol *res;
-            res = sym_new_unknown(ctx);
+            res = sym_new_not_null(ctx);
             if (res == NULL) goto out_of_space;
             stack_pointer[-2 - oparg] = res;
             stack_pointer += -1 - oparg;
 
         case _CALL_BUILTIN_FAST_WITH_KEYWORDS: {
             _Py_UopsSymbol *res;
-            res = sym_new_unknown(ctx);
+            res = sym_new_not_null(ctx);
             if (res == NULL) goto out_of_space;
             stack_pointer[-2 - oparg] = res;
             stack_pointer += -1 - oparg;
 
         case _CALL_LEN: {
             _Py_UopsSymbol *res;
-            res = sym_new_unknown(ctx);
+            res = sym_new_not_null(ctx);
             if (res == NULL) goto out_of_space;
             stack_pointer[-2 - oparg] = res;
             stack_pointer += -1 - oparg;
 
         case _CALL_ISINSTANCE: {
             _Py_UopsSymbol *res;
-            res = sym_new_unknown(ctx);
+            res = sym_new_not_null(ctx);
             if (res == NULL) goto out_of_space;
             stack_pointer[-2 - oparg] = res;
             stack_pointer += -1 - oparg;
 
         case _CALL_METHOD_DESCRIPTOR_O: {
             _Py_UopsSymbol *res;
-            res = sym_new_unknown(ctx);
+            res = sym_new_not_null(ctx);
             if (res == NULL) goto out_of_space;
             stack_pointer[-2 - oparg] = res;
             stack_pointer += -1 - oparg;
 
         case _CALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS: {
             _Py_UopsSymbol *res;
-            res = sym_new_unknown(ctx);
+            res = sym_new_not_null(ctx);
             if (res == NULL) goto out_of_space;
             stack_pointer[-2 - oparg] = res;
             stack_pointer += -1 - oparg;
 
         case _CALL_METHOD_DESCRIPTOR_NOARGS: {
             _Py_UopsSymbol *res;
-            res = sym_new_unknown(ctx);
+            res = sym_new_not_null(ctx);
             if (res == NULL) goto out_of_space;
             stack_pointer[-2 - oparg] = res;
             stack_pointer += -1 - oparg;
 
         case _CALL_METHOD_DESCRIPTOR_FAST: {
             _Py_UopsSymbol *res;
-            res = sym_new_unknown(ctx);
+            res = sym_new_not_null(ctx);
             if (res == NULL) goto out_of_space;
             stack_pointer[-2 - oparg] = res;
             stack_pointer += -1 - oparg;
 
         case _MAKE_FUNCTION: {
             _Py_UopsSymbol *func;
-            func = sym_new_unknown(ctx);
+            func = sym_new_not_null(ctx);
             if (func == NULL) goto out_of_space;
             stack_pointer[-1] = func;
             break;
 
         case _SET_FUNCTION_ATTRIBUTE: {
             _Py_UopsSymbol *func;
-            func = sym_new_unknown(ctx);
+            func = sym_new_not_null(ctx);
             if (func == NULL) goto out_of_space;
             stack_pointer[-2] = func;
             stack_pointer += -1;
 
         case _BUILD_SLICE: {
             _Py_UopsSymbol *slice;
-            slice = sym_new_unknown(ctx);
+            slice = sym_new_not_null(ctx);
             if (slice == NULL) goto out_of_space;
             stack_pointer[-2 - ((oparg == 3) ? 1 : 0)] = slice;
             stack_pointer += -1 - ((oparg == 3) ? 1 : 0);
 
         case _CONVERT_VALUE: {
             _Py_UopsSymbol *result;
-            result = sym_new_unknown(ctx);
+            result = sym_new_not_null(ctx);
             if (result == NULL) goto out_of_space;
             stack_pointer[-1] = result;
             break;
 
         case _FORMAT_SIMPLE: {
             _Py_UopsSymbol *res;
-            res = sym_new_unknown(ctx);
+            res = sym_new_not_null(ctx);
             if (res == NULL) goto out_of_space;
             stack_pointer[-1] = res;
             break;
 
         case _FORMAT_WITH_SPEC: {
             _Py_UopsSymbol *res;
-            res = sym_new_unknown(ctx);
+            res = sym_new_not_null(ctx);
             if (res == NULL) goto out_of_space;
             stack_pointer[-2] = res;
             stack_pointer += -1;
 
         case _BINARY_OP: {
             _Py_UopsSymbol *res;
-            res = sym_new_unknown(ctx);
+            res = sym_new_not_null(ctx);
             if (res == NULL) goto out_of_space;
             stack_pointer[-2] = res;
             stack_pointer += -1;
 
         case _POP_TOP_LOAD_CONST_INLINE_BORROW: {
             _Py_UopsSymbol *value;
-            value = sym_new_unknown(ctx);
+            value = sym_new_not_null(ctx);
             if (value == NULL) goto out_of_space;
             stack_pointer[-1] = value;
             break;
index a0a2f10aa760b70a7c605e04b6a04e3504d71b40..1c6b708e82321a4f5fd887441b48555f2943e9e0 100644 (file)
@@ -83,14 +83,14 @@ def emit_default(out: CWriter, uop: Uop) -> None:
         if var.name != "unused" and not var.peek:
             if var.is_array():
                 out.emit(f"for (int _i = {var.size}; --_i >= 0;) {{\n")
-                out.emit(f"{var.name}[_i] = sym_new_unknown(ctx);\n")
+                out.emit(f"{var.name}[_i] = sym_new_not_null(ctx);\n")
                 out.emit(f"if ({var.name}[_i] == NULL) goto out_of_space;\n")
                 out.emit("}\n")
             elif var.name == "null":
                 out.emit(f"{var.name} = sym_new_null(ctx);\n")
                 out.emit(f"if ({var.name} == NULL) goto out_of_space;\n")
             else:
-                out.emit(f"{var.name} = sym_new_unknown(ctx);\n")
+                out.emit(f"{var.name} = sym_new_not_null(ctx);\n")
                 out.emit(f"if ({var.name} == NULL) goto out_of_space;\n")