Initialize the internal representation of an object (its attribute values)

init_instance is the initial value of attributes

Property definitions

nitc $ VirtualMachine :: init_internal_attributes
	# Initialize the internal representation of an object (its attribute values)
	# `init_instance` is the initial value of attributes
	private fun init_internal_attributes(init_instance: Instance, size: Int): Pointer
		import Array[Instance].length, Array[Instance].[] `{

		Instance* attributes = malloc(sizeof(Instance) * size);

		int i;
		for(i=0; i<size; i++)
			attributes[i] = init_instance;

		Instance_incr_ref(init_instance);
		return attributes;
	`}
src/vm/virtual_machine.nit:182,2--195,3