Accessing objects
These functions enable users to access the instance variables of an object. For all of the following functions that use an instance variable index, the first instance variable is numbered 1.
U_32 EsInstSize(EsObject object)
Returns the number of named instance variables in object.
Smalltalk equivalent: object class instSize

U_32 EsBasicHash(EsObject object)
Returns the basic hash of the object.
Smalltalk equivalent: object basicHash

U_32 EsBasicSize(EsObject object)
Returns the number of indexed instance variables in object.
Smalltalk equivalent: object basicSize

U_32 * EsInstVarAddr(EsObject object)
Answers the address of the first instance variable of object. The result value is cast to U_32 * regardless of the type of object.
Error cases: Assumes that object consists of not immediate.

EsObject EsInstVarAt(EsObject object, U_32 index)
Returns instance variable index of object. Allows access of named and indexed instance variables; that is, index 1 is the first named instance variable, if object has any.
Error cases: Assumes that object consists of pointers. index is not validated.
Smalltalk equivalent: object instVarAt: index

void EsInstVarAtPut(EsObject object, U_32 index, EsObject storedObject)
Stores storedObject into instance variable index of object. Allows access of named and indexed instance variables; that is, index 1 is the first named instance variable, if object has any.
Error cases: Assumes that object consists of pointers. index is not validated. Stores into read-only objects are not checked.
Smalltalk equivalent: object instVarAt: index put: storedObject

EsObject EsAt(EsObject object, U_32 index)
Returns indexed instance variable index of object. Does not allow access of named instance variables.
Error cases: Assumes that object consists of pointers and is indexable. index is not validated.
Smalltalk equivalent: object basicAt: index

void EsAtPut(EsObject object, U_32 index, EsObject storedObject)
Stores storedObject into indexed instance variable index of object. Does not allow access of named instance variables.
Error cases: Assumes that object consists of pointers and is indexable. index is not validated. Stores into read-only objects are not checked.
Smalltalk equivalent: object basicAt: index put: storedObject

U_8 EsByteAt(EsObject object, U_32 index), U_8 EsU8At(EsObject object, U_32 index)
Returns the unsigned byte in indexed instance variable index of object.
Error cases: Assumes that object consists of bytes. index is not validated.
Smalltalk equivalent: object basicAt: index

void EsByteAtPut(EsObject object, U_32 index, U_8 value), void EsU8AtPut(EsObject object, U_32 index, U_8 value)
Stores value into indexed instance variable index of object.
Error cases: Assumes that object consists of bytes. index is not validated. Stores into read-only objects are not checked.
Smalltalk equivalent: object basicAt: index put: value

U_16 EsWordAt(EsObject object, U_32 index), U_16 EsU16At(EsObject object, U_32 index)
Returns the unsigned word in indexed instance variable index of object.
Error cases: Assumes that object consists of words. index is not validated.
Smalltalk equivalent: object basicAt: index

void EsWordAtPut(EsObject object, U_32 index, U_16 value), void EsU16AtPut(EsObject object, U_32 index, U_16 value)
Stores value into indexed instance variable index of object.
Error cases: Assumes that object consists of words. index is not validated. Stores into read-only objects are not checked.
Smalltalk equivalent: object basicAt: index put: value

U_32 EsLongAt(EsObject object, U_32 index), U_32 EsU32At(EsObject object, U_32 index)
Returns the unsigned long in indexed instance variable index of object.
Error cases: Assumes that object consists of longs. index is not validated.
Smalltalk equivalent: object basicAt: index

void EsLongAtPut(EsObject object, U_32 index, U_32 value), void EsU32AtPut(EsObject object, U_32 index, U_32 value)
Stores value into indexed instance variable index of object.
Error cases: Assumes that object consists of longs. index is not validated. Stores into read-only objects are not checked.
Smalltalk equivalent: object basicAt: index put: value

I_8 EsSignedByteAt(EsObject object, U_32 index), I_8 EsI8At(EsObject object, U_32 index)
Returns the signed byte in indexed instance variable index of object.
Error cases: Assumes that object consists of bytes. index is not validated.
Smalltalk equivalent: object basicAt: index

void EsSignedByteAtPut(EsObject object, U_32 index, I_8 value), void EsI8AtPut(EsObject object, U_32 index, I_8 value)
Stores value into indexed instance variable index of object.
Error cases: Assumes that object consists of bytes. index is not validated. Stores into read-only objects are not checked.
Smalltalk equivalent: object basicAt: index put: value

I_16 EsSignedWordAt(EsObject object, U_32 index), I_16 EsI16At(EsObject object, U_32 index)
Returns the signed word in indexed instance variable index of object.
Error cases: Assumes that object consists of words. index is not validated.
Smalltalk equivalent: object basicAt: index

void EsSignedWordAtPut(EsObject object, U_32 index, U_16 value), void EsI16AtPut(EsObject object, U_32 index, U_16 value)
Stores value into indexed instance variable index of object.
Error cases: Assumes that object consists of words. index is not validated. Stores into read-only objects are not checked.
Smalltalk equivalent: object basicAt: index put: value

I_32 EsSignedLongAt(EsObject object, U_32 index), I_32 EsI32At(EsObject object, U_32 index)
Returns the signed long in indexed instance variable index of object.
Error cases: Assumes that object consists of longs. index is not validated.
Smalltalk equivalent: object basicAt: index

void EsSignedLongAtPut(EsObject object, U_32 index, I_32 value), void EsI32AtPut(EsObject object, U_32 index, I_32 value)
Stores value into indexed instance variable index of object.
Error cases: Assumes that object consists of longs. index is not validated. Stores into read-only objects are not checked.
Smalltalk equivalent: object basicAt: index put: value
Last modified date: 01/29/2015