Lines Matching refs:PythonObject
38 template <> Expected<bool> python::As<bool>(Expected<PythonObject> &&obj) { in As()
45 Expected<long long> python::As<long long>(Expected<PythonObject> &&obj) { in As()
53 python::As<unsigned long long>(Expected<PythonObject> &&obj) { in As()
60 Expected<std::string> python::As<std::string>(Expected<PythonObject> &&obj) { in As()
83 void PythonObject::Reset() { in Reset()
97 Expected<long long> PythonObject::AsLongLong() const { in AsLongLong()
107 Expected<unsigned long long> PythonObject::AsUnsignedLongLong() const { in AsUnsignedLongLong()
118 Expected<unsigned long long> PythonObject::AsModuloUnsignedLongLong() const { in AsModuloUnsignedLongLong()
135 void PythonObject::Dump(Stream &strm) const { in Dump()
155 PyObjectType PythonObject::GetObjectType() const { in GetObjectType()
184 PythonString PythonObject::Repr() const { in Repr()
193 PythonString PythonObject::Str() const { in Str()
202 PythonObject
203 PythonObject::ResolveNameWithDictionary(llvm::StringRef name, in ResolveNameWithDictionary()
207 PythonObject result = dict.GetItemForKey(PythonString(piece)); in ResolveNameWithDictionary()
218 PythonObject PythonObject::ResolveName(llvm::StringRef name) const { in ResolveName()
238 PythonObject parent = ResolveName(name.substr(0, dot_pos)); in ResolveName()
240 return PythonObject(); in ResolveName()
246 bool PythonObject::HasAttribute(llvm::StringRef attr) const { in HasAttribute()
253 PythonObject PythonObject::GetAttributeValue(llvm::StringRef attr) const { in GetAttributeValue()
255 return PythonObject(); in GetAttributeValue()
259 return PythonObject(); in GetAttributeValue()
261 return PythonObject(PyRefType::Owned, in GetAttributeValue()
265 StructuredData::ObjectSP PythonObject::CreateStructuredObject() const { in CreateStructuredObject()
296 PythonObject(PyRefType::Borrowed, m_py_obj))); in CreateStructuredObject()
548 PythonObject PythonList::GetItemAtIndex(uint32_t index) const { in GetItemAtIndex()
550 return PythonObject(PyRefType::Borrowed, PyList_GetItem(m_py_obj, index)); in GetItemAtIndex()
551 return PythonObject(); in GetItemAtIndex()
554 void PythonList::SetItemAtIndex(uint32_t index, const PythonObject &object) { in SetItemAtIndex()
563 void PythonList::AppendItem(const PythonObject &object) { in AppendItem()
575 PythonObject obj = GetItemAtIndex(i); in CreateStructuredArray()
592 PythonTuple::PythonTuple(std::initializer_list<PythonObject> objects) { in PythonTuple()
608 PythonObject object(PyRefType::Borrowed, py_object); in PythonTuple()
627 PythonObject PythonTuple::GetItemAtIndex(uint32_t index) const { in GetItemAtIndex()
629 return PythonObject(PyRefType::Borrowed, PyTuple_GetItem(m_py_obj, index)); in GetItemAtIndex()
630 return PythonObject(); in GetItemAtIndex()
633 void PythonTuple::SetItemAtIndex(uint32_t index, const PythonObject &object) { in SetItemAtIndex()
646 PythonObject obj = GetItemAtIndex(i); in CreateStructuredArray()
692 PythonObject PythonDictionary::GetItemForKey(const PythonObject &key) const { in GetItemForKey()
696 return PythonObject(); in GetItemForKey()
701 Expected<PythonObject>
702 PythonDictionary::GetItem(const PythonObject &key) const { in GetItem()
710 return Retain<PythonObject>(o); in GetItem()
713 Expected<PythonObject> PythonDictionary::GetItem(const Twine &key) const { in GetItem()
721 return Retain<PythonObject>(o); in GetItem()
724 Error PythonDictionary::SetItem(const PythonObject &key, in SetItem()
725 const PythonObject &value) const { in SetItem()
735 const PythonObject &value) const { in SetItem()
744 void PythonDictionary::SetItemForKey(const PythonObject &key, in SetItemForKey()
745 const PythonObject &value) { in SetItemForKey()
757 PythonObject key = keys.GetItemAtIndex(i); in CreateStructuredDictionary()
758 PythonObject value = GetItemForKey(key); in CreateStructuredDictionary()
781 Expected<PythonObject> PythonModule::Get(const Twine &name) { in Get()
790 return Retain<PythonObject>(item); in Get()
846 Expected<PythonObject> pyarginfo = get_arg_info(*this); in GetArgInfo()
872 PythonObject im_self = GetAttributeValue("im_self"); in GetArgInfo()
878 PythonObject __call__ = GetAttributeValue("__call__"); in GetArgInfo()
883 PythonObject im_self = __callable__.GetAttributeValue("im_self"); in GetArgInfo()
912 PythonObject PythonCallable::operator()() { in operator ()()
913 return PythonObject(PyRefType::Owned, PyObject_CallObject(m_py_obj, nullptr)); in operator ()()
916 PythonObject PythonCallable::
919 return PythonObject(PyRefType::Owned, in operator ()()
923 PythonObject PythonCallable::
924 operator()(std::initializer_list<PythonObject> args) { in operator ()()
926 return PythonObject(PyRefType::Owned, in operator ()()
1049 GetOptionsForPyObject(const PythonObject &obj) { in GetOptionsForPyObject()
1153 static Expected<PythonBuffer> Create(PythonObject &obj, in Create()
1244 auto pybuffer = Take<PythonObject>(pybuffer_p); in Write()
1476 Take<PythonObject>(o); in Init()
1485 llvm::Expected<PythonObject>
1501 auto code_ref = Take<PythonObject>(code); in runStringOneLine()
1508 return Take<PythonObject>(result); in runStringOneLine()
1511 llvm::Expected<PythonObject>
1521 return Take<PythonObject>(result); in runStringMultiLine()