Compile a call within a callsite

Property definitions

nitc $ JavaCompilerVisitor :: compile_callsite
	# Compile a call within a callsite
	fun compile_callsite(callsite: CallSite, arguments: Array[RuntimeVariable]): nullable RuntimeVariable do
		var initializers = callsite.mpropdef.initializers
		if not initializers.is_empty then
			var recv = arguments.first

			var i = 1
			for p in initializers do
				if p isa MMethod then
					var args = [recv]
					var msignature = p.intro.msignature
					if msignature != null then
						for x in msignature.mparameters do
							args.add arguments[i]
							i += 1
						end
					end
					send(p, args)
				else if p isa MAttribute then
					info("NOT YET IMPLEMENTED {class_name}::compile_callsite for MAttribute `{p}`")
					#self.write_attribute(p, recv, arguments[i])
					i += 1
				else abort
			end
			assert i == arguments.length

			return send(callsite.mproperty, [recv])
		end

		return send(callsite.mproperty, arguments)
	end
src/compiler/java_compiler.nit:463,2--493,4