An instance with the original receiver and callsite (for function reference)

Introduced properties

private var _callsite: CallSite

nitc :: CallrefInstance :: _callsite

The original callsite
private var _recv: Instance

nitc :: CallrefInstance :: _recv

The original receiver
fun callsite: CallSite

nitc :: CallrefInstance :: callsite

The original callsite
protected fun callsite=(callsite: CallSite)

nitc :: CallrefInstance :: callsite=

The original callsite
init defaultinit(mtype: MType, recv: Instance, callsite: CallSite)

nitc :: CallrefInstance :: defaultinit

fun recv: Instance

nitc :: CallrefInstance :: recv

The original receiver
protected fun recv=(recv: Instance)

nitc :: CallrefInstance :: recv=

The original receiver

Redefined properties

redef type SELF: CallrefInstance

nitc $ CallrefInstance :: SELF

Type of this instance, automatically specialized in every class

All properties

fun !=(other: nullable Object): Bool

core :: Object :: !=

Have self and other different values?
fun ==(other: nullable Object): Bool

core :: Object :: ==

Have self and other the same value?
type CLASS: Class[SELF]

core :: Object :: CLASS

The type of the class of self.
type SELF: Object

core :: Object :: SELF

Type of this instance, automatically specialized in every class
private var _callsite: CallSite

nitc :: CallrefInstance :: _callsite

The original callsite
private var _mtype: MType

nitc :: Instance :: _mtype

The dynamic type of the instance
private var _recv: Instance

nitc :: CallrefInstance :: _recv

The original receiver
private var _vtable: nullable VTable

nitc :: Instance :: _vtable

Associate a runtime instance to its virtual table which contains methods, types etc.
fun callsite: CallSite

nitc :: CallrefInstance :: callsite

The original callsite
protected fun callsite=(callsite: CallSite)

nitc :: CallrefInstance :: callsite=

The original callsite
protected fun class_factory(name: String): CLASS

core :: Object :: class_factory

Implementation used by get_class to create the specific class.
fun class_name: String

core :: Object :: class_name

The class name of the object.
init defaultinit(mtype: MType, recv: Instance, callsite: CallSite)

nitc :: CallrefInstance :: defaultinit

init defaultinit(mtype: MType)

nitc :: Instance :: defaultinit

fun eq_is(o: Instance): Bool

nitc :: Instance :: eq_is

Return true if self IS o (using the Nit semantic of is)
fun get_class: CLASS

core :: Object :: get_class

The meta-object representing the dynamic type of self.
fun hash: Int

core :: Object :: hash

The hash code of the object.
init init

core :: Object :: init

fun inspect: String

core :: Object :: inspect

Developer readable representation of self.
protected fun inspect_head: String

core :: Object :: inspect_head

Return "CLASSNAME:#OBJECTID".
fun is_null: Bool

nitc :: Instance :: is_null

Return true if the instance is null.
intern fun is_same_instance(other: nullable Object): Bool

core :: Object :: is_same_instance

Return true if self and other are the same instance (i.e. same identity).
fun is_same_serialized(other: nullable Object): Bool

core :: Object :: is_same_serialized

Is self the same as other in a serialization context?
intern fun is_same_type(other: Object): Bool

core :: Object :: is_same_type

Return true if self and other have the same dynamic type.
fun is_true: Bool

nitc :: Instance :: is_true

Return true if the instance is the true value.
fun mtype: MType

nitc :: Instance :: mtype

The dynamic type of the instance
protected fun mtype=(mtype: MType)

nitc :: Instance :: mtype=

The dynamic type of the instance
private intern fun native_class_name: CString

core :: Object :: native_class_name

The class name of the object in CString format.
intern fun object_id: Int

core :: Object :: object_id

An internal hash code for the object based on its identity.
fun output

core :: Object :: output

Display self on stdout (debug only).
intern fun output_class_name

core :: Object :: output_class_name

Display class name on stdout (debug only).
fun recv: Instance

nitc :: CallrefInstance :: recv

The original receiver
protected fun recv=(recv: Instance)

nitc :: CallrefInstance :: recv=

The original receiver
fun serialization_hash: Int

core :: Object :: serialization_hash

Hash value use for serialization
intern fun sys: Sys

core :: Object :: sys

Return the global sys object, the only instance of the Sys class.
fun to_b: Byte

nitc :: Instance :: to_b

Return the integer value if the instance is a byte.
fun to_f: Float

nitc :: Instance :: to_f

Return the integer value if the instance is a float.
fun to_i: Int

nitc :: Instance :: to_i

Return the integer value if the instance is an integer.
fun to_i16: Int16

nitc :: Instance :: to_i16

Return the integer value if the instance is a int16.
fun to_i32: Int32

nitc :: Instance :: to_i32

Return the integer value if the instance is a int32.
fun to_i8: Int8

nitc :: Instance :: to_i8

Return the integer value if the instance is a int8.
abstract fun to_jvalue(env: JniEnv): JValue

core :: Object :: to_jvalue

fun to_s: String

core :: Object :: to_s

User readable representation of self.
fun to_u16: UInt16

nitc :: Instance :: to_u16

Return the integer value if the instance is a uint16.
fun to_u32: UInt32

nitc :: Instance :: to_u32

Return the integer value if the instance is a uint32.
fun val: nullable Object

nitc :: Instance :: val

The real value encapsulated if the instance is primitive.
fun vtable: nullable VTable

nitc :: Instance :: vtable

Associate a runtime instance to its virtual table which contains methods, types etc.
protected fun vtable=(vtable: nullable VTable)

nitc :: Instance :: vtable=

Associate a runtime instance to its virtual table which contains methods, types etc.
package_diagram nitc::CallrefInstance CallrefInstance nitc::Instance Instance nitc::CallrefInstance->nitc::Instance core::Object Object nitc::Instance->core::Object ...core::Object ... ...core::Object->core::Object

Ancestors

interface Object

core :: Object

The root of the class hierarchy.

Parents

abstract class Instance

nitc :: Instance

An instance represents a value of the executed program.

Class definitions

nitc $ CallrefInstance
# An instance with the original receiver and callsite (for function reference)
class CallrefInstance
	super Instance

	# The original receiver
	#
	# ~~~nitish
	# var a = new A
	# var f = &a.toto # `a` is the original receiver
	# ~~~
	var recv: Instance

	# The original callsite
	#
	# ~~~nitish
	# var a = new A
	# var f = &a.toto # `toto` is the original callsite
	# ~~~
	var callsite: CallSite
end
src/interpreter/naive_interpreter.nit:778,1--797,3