Replace the value of an attribute in an instance with direct access

  • instance is the attributes array of the receiver
  • offset is the absolute offset of this attribute
  • value is the new value for this attribute

Property definitions

nitc $ VirtualMachine :: write_attribute_sst
	# Replace the value of an attribute in an instance with direct access
	# * `instance` is the attributes array of the receiver
	# * `offset` is the absolute offset of this attribute
	# * `value` is the new value for this attribute
	fun write_attribute_sst(instance: Pointer, offset: Int, value: Instance) `{
		// Direct access to the position with the absolute offset
		((Instance *)instance)[offset] = value;
		Instance_incr_ref(value);
	`}
src/vm/virtual_machine.nit:382,2--390,3