Home
last modified time | relevance | path

Searched refs:PyLong_Type (Results 1 – 25 of 38) sorted by relevance

12

/external/python/cpython3/Python/
Doptimizer_bytecodes.c103 if (sym_matches_type(left, &PyLong_Type)) { in dummy_func()
104 if (sym_matches_type(right, &PyLong_Type)) { in dummy_func()
112 if (sym_matches_type(right, &PyLong_Type)) { in dummy_func()
116 if (!sym_set_type(left, &PyLong_Type)) { in dummy_func()
119 if (!sym_set_type(right, &PyLong_Type)) { in dummy_func()
162 if (ltype != NULL && (ltype == &PyLong_Type || ltype == &PyFloat_Type) && in dummy_func()
163 rtype != NULL && (rtype == &PyLong_Type || rtype == &PyFloat_Type)) in dummy_func()
166 ltype == &PyLong_Type && rtype == &PyLong_Type) { in dummy_func()
168 OUT_OF_SPACE_IF_NULL(res = sym_new_type(ctx, &PyLong_Type)); in dummy_func()
180 sym_matches_type(left, &PyLong_Type) && sym_matches_type(right, &PyLong_Type)) in dummy_func()
[all …]
Doptimizer_symbols.c288 if (tp == &PyLong_Type) { in _Py_uop_sym_truthiness()
424 TEST_PREDICATE(!_Py_uop_sym_matches_type(sym, &PyLong_Type), "top matches a type"); in _Py_uop_symbols_test()
435 TEST_PREDICATE(!_Py_uop_sym_matches_type(sym, &PyLong_Type), "bottom matches a type"); in _Py_uop_symbols_test()
440 sym = _Py_uop_sym_new_type(ctx, &PyLong_Type); in _Py_uop_symbols_test()
446 TEST_PREDICATE(_Py_uop_sym_matches_type(sym, &PyLong_Type), "int isn't int"); in _Py_uop_symbols_test()
451 _Py_uop_sym_set_type(sym, &PyLong_Type); // Should be a no-op in _Py_uop_symbols_test()
452 TEST_PREDICATE(_Py_uop_sym_matches_type(sym, &PyLong_Type), "(int and int) isn't int"); in _Py_uop_symbols_test()
465 sym = _Py_uop_sym_new_type(ctx, &PyLong_Type); in _Py_uop_symbols_test()
473 TEST_PREDICATE(_Py_uop_sym_matches_type(sym, &PyLong_Type), "42 isn't an int"); in _Py_uop_symbols_test()
479 _Py_uop_sym_set_type(sym, &PyLong_Type); // Should be a no-op in _Py_uop_symbols_test()
[all …]
Doptimizer_cases.c.h147 if(!sym_set_type(value, &PyLong_Type)) {
228 if (sym_matches_type(left, &PyLong_Type)) {
229 if (sym_matches_type(right, &PyLong_Type)) {
237 if (sym_matches_type(right, &PyLong_Type)) {
241 if (!sym_set_type(left, &PyLong_Type)) {
244 if (!sym_set_type(right, &PyLong_Type)) {
265 sym_matches_type(left, &PyLong_Type) && sym_matches_type(right, &PyLong_Type))
281 OUT_OF_SPACE_IF_NULL(res = sym_new_type(ctx, &PyLong_Type));
295 sym_matches_type(left, &PyLong_Type) && sym_matches_type(right, &PyLong_Type))
311 OUT_OF_SPACE_IF_NULL(res = sym_new_type(ctx, &PyLong_Type));
[all …]
Dcrossinterp_data_lookup.h566 if (_xidregistry_add_type(xidregistry, &PyLong_Type, _long_shared) != 0) { in _register_builtins_for_crossinterpreter_data()
/external/python/cpython3/Objects/
Dboolobject.c83 return PyLong_Type.tp_as_number->nb_invert(v); in bool_invert()
90 return PyLong_Type.tp_as_number->nb_and(a, b); in bool_and()
98 return PyLong_Type.tp_as_number->nb_or(a, b); in bool_or()
106 return PyLong_Type.tp_as_number->nb_xor(a, b); in bool_xor()
202 &PyLong_Type, /* tp_base */
Dlongobject.c164 _PyObject_Init((PyObject*)result, &PyLong_Type); in _PyLong_New()
216 _PyObject_Init((PyObject*)v, &PyLong_Type); in _PyLong_FromMedium()
5863 if (type != &PyLong_Type) in long_new_impl()
5914 assert(PyType_IsSubtype(type, &PyLong_Type)); in long_subtype_new()
5915 tmp = (PyLongObject *)long_new_impl(&PyLong_Type, x, obase); in long_subtype_new()
6441 if (long_obj != NULL && type != &PyLong_Type) { in int_from_bytes_impl()
6585 PyTypeObject PyLong_Type = { variable
Dlistobject.c2777 assert(Py_IS_TYPE(v, &PyLong_Type)); in unsafe_long_compare()
2778 assert(Py_IS_TYPE(w, &PyLong_Type)); in unsafe_long_compare()
2983 if (key_type == &PyLong_Type && in list_sort_impl()
3004 else if (key_type == &PyLong_Type && ints_are_bounded) { in list_sort_impl()
Dfloatobject.c1569 PyNumberMethods *long_methods = PyLong_Type.tp_as_number; in float_as_integer_ratio_impl()
/external/pytorch/torch/csrc/
DTHP.h14 #define PyInt_Type PyLong_Type
DDtype.h24 obj == (PyObject*)(&PyLong_Type); in THPPythonScalarType_Check()
/external/python/cpython3/Include/
Dlongobject.h14 #define PyLong_CheckExact(op) Py_IS_TYPE((op), &PyLong_Type)
Dobject.h342 PyAPI_DATA(PyTypeObject) PyLong_Type;
347 assert(ob->ob_type != &PyLong_Type); in Py_SIZE()
433 assert(ob->ob_base.ob_type != &PyLong_Type); in Py_SET_SIZE()
/external/python/cpython3/Modules/
D_testcapimodule.c529 newfunc tp_new = PyType_GetSlot(&PyLong_Type, Py_tp_new); in test_get_statictype_slots()
530 if (PyLong_Type.tp_new != tp_new) { in test_get_statictype_slots()
535 reprfunc tp_repr = PyType_GetSlot(&PyLong_Type, Py_tp_repr); in test_get_statictype_slots()
536 if (PyLong_Type.tp_repr != tp_repr) { in test_get_statictype_slots()
541 ternaryfunc tp_call = PyType_GetSlot(&PyLong_Type, Py_tp_call); in test_get_statictype_slots()
547 binaryfunc nb_add = PyType_GetSlot(&PyLong_Type, Py_nb_add); in test_get_statictype_slots()
548 if (PyLong_Type.tp_as_number->nb_add != nb_add) { in test_get_statictype_slots()
553 lenfunc mp_length = PyType_GetSlot(&PyLong_Type, Py_mp_length); in test_get_statictype_slots()
559 void *over_value = PyType_GetSlot(&PyLong_Type, Py_bf_releasebuffer + 1); in test_get_statictype_slots()
565 tp_new = PyType_GetSlot(&PyLong_Type, 0); in test_get_statictype_slots()
[all …]
D_json.c961 else if (!is_float && s->parse_int != (PyObject *) &PyLong_Type) in _match_number_unicode()
1404 PyObject *encoded = PyLong_Type.tp_repr(obj); in encoder_listencode_obj()
1499 keystr = PyLong_Type.tp_repr(key); in encoder_encode_key_value()
/external/python/cpython3/Include/internal/
Dpycore_long.h295 .ob_base = _PyObject_HEAD_INIT(&PyLong_Type), \
Dpycore_object.h322 assert(typeobj != &PyLong_Type); in _PyObject_InitVar()
/external/tensorflow/tensorflow/compiler/xla/python/
Dpy_values.cc258 (*p)[reinterpret_cast<PyObject*>(&PyLong_Type)] = HandlePythonInt; in DevicePut()
412 (*p)[reinterpret_cast<PyObject*>(&PyLong_Type)] = int_handler; in PyArgSignatureOfValue()
/external/pytorch/torch/csrc/utils/
Ddisable_torch_function.cpp293 tp == &PyLong_Type || tp == &PyFloat_Type || tp == &PyComplex_Type || in is_basic_python_type()
/external/tensorflow/tensorflow/python/framework/
Dop_def_util.cc40 #define PY_INT_TYPE PyLong_Type
/external/python/cpython3/Modules/_sqlite/
Dmodule.c132 if (type == &PyLong_Type || type == &PyFloat_Type in pysqlite_register_adapter_impl()
/external/python/cpython3/Tools/c-analyzer/cpython/
Dglobals-to-fix.tsv64 Objects/longobject.c - PyLong_Type -
/external/python/cpython3/PC/
Dpython3dll.c892 EXPORT_DATA(PyLong_Type)
/external/python/cpython3/Doc/data/
Dstable_abi.dat379 data,PyLong_Type,3.2,,
/external/python/cpython3/Modules/_decimal/
D_decimal.c5871 state->_py_long_multiply = PyLong_Type.tp_as_number->nb_multiply; in _decimal_exec()
5872 state->_py_long_floor_divide = PyLong_Type.tp_as_number->nb_floor_divide; in _decimal_exec()
5873 state->_py_long_power = PyLong_Type.tp_as_number->nb_power; in _decimal_exec()
5878 cfunc_noargs(&PyLong_Type, "bit_length")); in _decimal_exec()
/external/python/cpython3/Doc/c-api/
Dlong.rst21 .. c:var:: PyTypeObject PyLong_Type

12