Home | History | Annotate | Download | only in Python

Lines Matching refs:consts

30    The consts table must still be in list form so that the
37 tuple_of_constants(unsigned char *codestr, Py_ssize_t n, PyObject *consts)
43 assert(PyList_CheckExact(consts));
53 len_consts = PyList_GET_SIZE(consts);
57 constant = PyList_GET_ITEM(consts, arg);
62 /* Append folded constant onto consts */
63 if (PyList_Append(consts, newconst)) {
79 The consts table must still be in list form so that the
88 fold_binops_on_constants(unsigned char *codestr, PyObject *consts)
95 assert(PyList_CheckExact(consts));
100 v = PyList_GET_ITEM(consts, GETARG(codestr, 0));
101 w = PyList_GET_ITEM(consts, GETARG(codestr, 3));
174 /* Append folded constant into consts table */
175 len_consts = PyList_GET_SIZE(consts);
176 if (PyList_Append(consts, newconst)) {
190 fold_unaryops_on_constants(unsigned char *codestr, PyObject *consts)
197 assert(PyList_CheckExact(consts));
201 v = PyList_GET_ITEM(consts, GETARG(codestr, 0));
227 /* Append folded constant into consts table */
228 len_consts = PyList_GET_SIZE(consts);
229 if (PyList_Append(consts, newconst)) {
284 The consts object should still be in list form to allow new constants
299 PyCode_Optimize(PyObject *code, PyObject* consts, PyObject *names,
355 assert(PyList_Check(consts));
400 for (j=0 ; j < PyList_GET_SIZE(consts) ; j++) {
401 if (PyList_GET_ITEM(consts, j) == Py_None)
404 if (j == PyList_GET_SIZE(consts)) {
405 if (PyList_Append(consts, Py_None) == -1)
408 assert(PyList_GET_ITEM(consts, j) == Py_None);
422 !PyObject_IsTrue(PyList_GET_ITEM(consts, j)))
446 tuple_of_constants(&codestr[h], j, consts)) {
484 fold_binops_on_constants(&codestr[i-6], consts)) {
498 fold_unaryops_on_constants(&codestr[i-3], consts)) {