+ # The current node, used to print errors, debug and stack-traces
+ fun current_node: nullable ANode
+ do
+ if frames.is_empty then return null
+ return frames.first.current_node
+ end
+
+ # The dynamic type of the current `self`
+ fun current_receiver_class: MClassType
+ do
+ return frames.first.arguments.first.mtype.as(MClassType)
+ end
+
+ # 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
+