Evaluate, store and return the default value of the attribute

Property definitions

nitc :: abstract_compiler $ AAttrPropdef :: evaluate_expr
	# Evaluate, store and return the default value of the attribute
	private fun evaluate_expr(v: AbstractCompilerVisitor, recv: RuntimeVariable): RuntimeVariable
	do
		var oldnode = v.current_node
		v.current_node = self
		var old_frame = v.frame
		var frame = new StaticFrame(v, self.mreadpropdef.as(not null), recv.mcasttype.undecorate.as(MClassType), [recv])
		v.frame = frame

		var value
		var mtype = self.mtype
		assert mtype != null

		var nexpr = self.n_expr
		var nblock = self.n_block
		if nexpr != null then
			value = v.expr(nexpr, mtype)
		else if nblock != null then
			value = v.new_var(mtype)
			frame.returnvar = value
			frame.returnlabel = v.get_name("RET_LABEL")
			v.add("\{")
			v.stmt(nblock)
			v.add("{frame.returnlabel.as(not null)}:(void)0;")
			v.add("\}")
		else
			abort
		end

		v.write_attribute(self.mpropdef.mproperty, recv, value)

		v.frame = old_frame
		v.current_node = oldnode

		return value
	end
src/compiler/abstract_compiler.nit:3627,2--3662,4