Initialize the environment for a call and return a new Frame

node The AST node mpropdef The corresponding mpropdef *args Arguments of the call

Property definitions

nitc $ NaiveInterpreter :: new_frame
	# Initialize the environment for a call and return a new Frame
	# *`node` The AST node
	# *`mpropdef` The corresponding mpropdef
	# *`args` Arguments of the call
	fun new_frame(node: ANode, mpropdef: MPropDef, args: Array[Instance]): FRAME
	do
		return new InterpreterFrame(node, mpropdef, args)
	end
src/interpreter/naive_interpreter.nit:422,2--429,4

nitc :: variables_numbering $ VirtualMachine :: new_frame
	# Redef to add the numbering of variables and arguments
	redef fun new_frame(node, mpropdef, args)
	do
		var f = new VmFrame(node, mpropdef, args)

		# If this Frame is for a method or an attribute block then number variables into the body of the method
		if node isa APropdef then
			# Compile the code (number its local variables)
			if not node.is_compiled then node.compile(self)

			# Create an empty environment
			f.variables = new Array[Instance].filled_with(initialization_value, node.environment_size)
		end

		# Putting self at the beginning of the environment
		f.variables[0] = args[0]
		return f
	end
src/vm/variables_numbering.nit:37,2--54,4

nitc :: compilation $ VirtualMachine :: new_frame
	redef fun new_frame(node, mpropdef, args)
	do
		# Save the current propdef
		if node isa APropdef then self.current_propdef = node

		return super
	end
src/vm/compilation.nit:28,2--34,4