Execute a mpropdef associated with the current node.

Property definitions

nitc :: naive_interpreter $ APropdef :: call
	# Execute a `mpropdef` associated with the current node.
	private fun call(v: NaiveInterpreter, mpropdef: MMethodDef, args: Array[Instance]): nullable Instance
	do
		fatal(v, "NOT YET IMPLEMENTED method kind {class_name}. {mpropdef}")
		abort
	end
src/interpreter/naive_interpreter.nit:890,2--895,4

nitc :: naive_interpreter $ AAttrPropdef :: call
	redef fun call(v, mpropdef, args)
	do
		var recv = args.first
		assert recv isa MutableInstance
		var attr = self.mpropdef.mproperty
		if mpropdef == mreadpropdef then
			assert args.length == 1
			if not is_lazy or v.isset_attribute(attr, recv) then return v.read_attribute(attr, recv)
			var f = v.new_frame(self, mpropdef, args)
			return evaluate_expr(v, recv, f)
		else if mpropdef == mwritepropdef then
			assert args.length == 2
			var arg = args[1]
			if is_optional and arg.is_null then
				var f = v.new_frame(self, mpropdef, args)
				arg = evaluate_expr(v, recv, f)
			end
			v.write_attribute(attr, recv, arg)
			return null
		else
			abort
		end
	end
src/interpreter/naive_interpreter.nit:1556,2--1578,4

nitc :: naive_interpreter $ AMethPropdef :: call
	redef fun call(v, mpropdef, args)
	do
		var f = v.new_frame(self, mpropdef, args)
		var res = call_commons(v, mpropdef, args, f)
		v.frames.shift
		if v.is_escape(self.return_mark) then
			res = v.escapevalue
			return res
		end
		return res
	end
src/interpreter/naive_interpreter.nit:901,2--911,4