Returns a C expression of the runtime class structure of the value.

The point of the method is to work also with primitive types.

Property definitions

nitc $ SeparateCompilerVisitor :: class_info
	# Returns a C expression of the runtime class structure of the value.
	# The point of the method is to work also with primitive types.
	fun class_info(value: RuntimeVariable): String
	do
		if not value.mtype.is_c_primitive then
			if can_be_primitive(value) and not compiler.modelbuilder.toolcontext.opt_no_tag_primitives.value then
				var tag = extract_tag(value)
				return "({tag}?class_info[{tag}]:{value}->class)"
			end
			return "{value}->class"
		else
			compiler.undead_types.add(value.mtype)
			self.require_declaration("class_{value.mtype.c_name}")
			return "(&class_{value.mtype.c_name})"
		end
	end
src/compiler/separate_compiler.nit:1394,2--1409,4