Crate emojicode_sys [] [src]

Structs

Emojicode_Block
Emojicode_Class
Emojicode_Function
Emojicode_FunctionObjectVariableRecord
Emojicode_Object
Emojicode_ObjectVariableRecord

Used to signify the compiler that from the @c from -th instruction to the to @c to -th instruction the variable at index @c variableIndex contains an object reference.

Emojicode_PackageVersion

The version of a package. Must follow semantic versioning 2.0 http://semver.org

Emojicode_ProtocolDispatchTable
Emojicode_RetainedObjectPointer
Emojicode_StackFrame
Emojicode_Thread

Constants

ContextType_None
ContextType_Object
ContextType_ValueReference
ObjectVariableType_Box

There is an object pointer a the given index if the value at @c condition is truthy

ObjectVariableType_Condition

There is an object pointer a the given index if the value at @c condition is truthy

ObjectVariableType_ConditionalSkip

There is an object pointer a the given index if the value at @c condition is truthy

ObjectVariableType_Simple

There is an object pointer a the given index

Statics

Emojicode_RetainedObjectPointer_nullobject

Functions

Emojicode_Class_Class
Emojicode_Class_Class1
Emojicode_Class_inheritsFrom

Returns true if @c a inherits from class @c from

Emojicode_Object_variableDestination
Emojicode_PackageVersion_PackageVersion
Emojicode_ProtocolDispatchTable_conformsTo
Emojicode_ProtocolDispatchTable_dispatch
Emojicode_RetainedObjectPointer_RetainedObjectPointer

Constructs a RetainedObjectPointer that will always evaluate to @c nullptr.

Emojicode_RetainedObjectPointer_unretainedPointer

Returns an ordinary pointer to the retained object. /// @warning This pointer is only valid until the next garbage collector cycle. This does, of course, not pose a /// problem if you store the pointer into another object that can be reached by the garbage collector or if you /// return it.

Emojicode_StackFrame_variableDestination
Emojicode_Thread_consumeInstruction

Consumes the next instruction from the current stack frame’s execution pointer, i.e. returns the value to which /// the pointer currently points and increments the pointer.

Emojicode_Thread_currentStackFrame
Emojicode_Thread_popStack

Pops the stack associated with this thread

Emojicode_Thread_pushReservedFrame

Pushes the reserved stack frame onto the stack

Emojicode_Thread_pushStack

Pushes a new stack frame

Emojicode_Thread_release

Release @c n objects previously retained by @c retain(). /// @warning Releasing more objects than you retained leads to undefined behavior.

Emojicode_Thread_reserveFrame

Reserves a new stack frame which can later be pushed with @c stackPushReservedFrame /// @returns A pointer to the memory reserved for the variables.

Emojicode_Thread_retain

Retains the given object. /// This method is used in native function code to "retain" an object, i.e. to prevent the object from being /// deallocated by the garbage collector and to keep a pointer to it. /// @warning You must retain all objects which you wish to keep, before you perform a potentially garbage-collector /// invoking operation. As well, you must "release" the object before your function returns by calling @c release(). /// @returns A @c RetainedObjectPointer pointing to the retained object.

Emojicode_Thread_returnErrorFromFunction

Leaves the function and sets the value of the return destination to an error with the given value.

Emojicode_Thread_returnFromFunction

Leaves the function currently executed. Effectively sets the execution pointer of /// the current stack frame to the null pointer.

Emojicode_Thread_returnFromFunction1

Leaves the function and sets the value of the return destination to the given value.

Emojicode_Thread_returnNothingnessFromFunction

Leaves the function and sets the value of the return destination to Nothingness. (See @c makeNothingness())

Emojicode_Thread_returnOEValueFromFunction

Leaves the function and sets the value of the return destination to the given value. The destination is treated /// as optional. (See @c optionalSet())

Emojicode_Thread_thisContext

Returns the value on which the method was called.

Emojicode_Thread_thisObject

Returns the object on which the method was called.

Emojicode_Thread_thisObjectAsRetained

Returns the this object as a retained object pointer. This method is only provided to allow convenient passing /// of the this object as retained object pointer. The this object itself is, of course, retained already in the /// stack frame and calls to @c thisObject() will always return a valid object pointer. /// @attention Unlike after a call to @c retain() you must not call @c release() for a call to this method.

Emojicode_Thread_variable

Returns the content of the variable slot at the specific index from the stack associated with this thread

Emojicode_Thread_variableDestination

Returns a pointer to the variable slot at the specific index from the stack associated with this thread

Emojicode_Thread_variableObjectPointerAsRetained

Returns the object pointer in the given variable slot as retained object pointer. This method is only provided /// to allow convenient passing of the object pointer as retained object pointer as variables are naturally always /// retained. /// @attention Unlike after a call to @c retain() you must not call @c release() for a call to this method.

Emojicode_Value_Value

Returns an undefined Value

Emojicode_Value_Value1
Emojicode_Value_Value2
Emojicode_Value_Value3
Emojicode_Value_Value4
Emojicode_Value_Value5
Emojicode_Value_Value6
Emojicode_Value_makeNothingness
Emojicode_Value_optionalSet
Emojicode_Value_setValueForError
Emojicode_Value_storeError
Emojicode_executeCallableExtern

You can use this function to call a callable object. It’s internally Garbage-Collector safe.

Emojicode_stringFromChar

Creates a string from a UTF8 C string. The string must be null terminated!

Emojicode_stringToCString

Converts the string to a UTF8 char array and returns it. @warning The returned pointer points into an object allocated by the Emojicode memory manager. It must not be free’d and will not survive the imminent garbage collector cycle.

Type Definitions

ContextType
EmojicodeChar

A Unicode codepoint

EmojicodeInstruction

A byte-code instruction

Emojicode_EmojicodeInteger
Emojicode_FunctionFunctionPointer
ObjectVariableType
int_fast64_t
std_nullptr_t
uint_fast16_t

Unions

Emojicode_Object__bindgen_ty_1
Emojicode_Value

A one-Emojicode-word large value without type information.