this repo has no description
at trunk 64 lines 2.6 kB view raw
1/* Copyright (c) Facebook, Inc. and its affiliates. (http://www.facebook.com) */ 2#pragma once 3 4#include "globals.h" 5#include "runtime.h" 6 7namespace py { 8 9RawObject instanceDelAttr(Thread* thread, const Instance& instance, 10 const Object& name); 11 12RawObject instanceGetAttribute(Thread* thread, const Instance& instance, 13 const Object& name); 14 15RawObject instanceGetAttributeSetLocation(Thread* thread, 16 const Instance& instance, 17 const Object& name_interned, 18 Object* location_out); 19 20void instanceGrowOverflow(Thread* thread, const Instance& instance, 21 word length); 22 23RawObject instanceSetAttr(Thread* thread, const Instance& instance, 24 const Object& name, const Object& value); 25 26RawObject objectDeleteAttribute(Thread* thread, const Object& receiver, 27 const Object& name); 28 29RawObject objectGetAttribute(Thread* thread, const Object& object, 30 const Object& name); 31 32// Same as `objectGetAttribute()` but stores a value into `location_out` that is 33// used by the inline cache and interpreted by 34// `Interpreter::loadAttrWithLocation()`. 35RawObject objectGetAttributeSetLocation(Thread* thread, const Object& object, 36 const Object& name, 37 Object* location_out, 38 LoadAttrKind* kind); 39 40// Raise an AttributeError that `object` has no attribute named `name`. 41RawObject objectRaiseAttributeError(Thread* thread, const Object& object, 42 const Object& name); 43 44RawObject objectSetAttr(Thread* thread, const Object& object, 45 const Object& name, const Object& value); 46 47RawObject objectSetAttrSetLocation(Thread* thread, const Object& object, 48 const Object& name, const Object& value, 49 Object* location_out); 50 51RawObject objectNew(Thread* thread, const Type& type); 52 53RawObject objectDelItem(Thread* thread, const Object& object, 54 const Object& key); 55 56RawObject objectGetItem(Thread* thread, const Object& object, 57 const Object& key); 58 59RawObject objectSetItem(Thread* thread, const Object& object, const Object& key, 60 const Object& value); 61 62void initializeObjectTypes(Thread* thread); 63 64} // namespace py