Commit fc9f1e64 authored by Stefan Marr's avatar Stefan Marr

Backport minor style adaptations in

Signed-off-by: default avatarStefan Marr <>
parent 5865b2c0
......@@ -22,13 +22,16 @@ class Block(AbstractObject):
return universe.blockClasses[self._method.get_number_of_arguments()]
class Evaluation(Primitive):
_immutable_fields_ = ['_number_of_arguments']
def __init__(self, num_args, universe, invoke):
Primitive.__init__(self, self._compute_signature_string(num_args),
universe, invoke)
self._number_of_arguments = num_args
def _compute_signature_string(self, num_args):
def _compute_signature_string(num_args):
# Compute the signature string
signature_string = "value"
if num_args > 1:
......@@ -40,9 +43,11 @@ class Block(AbstractObject):
# Return the signature string
return signature_string
def block_evaluation_primitive(num_args, universe):
return Block.Evaluation(num_args, universe, _invoke)
def block_evaluate(block, interpreter, frame):
context = block.get_context()
method = block.get_method()
......@@ -52,7 +57,7 @@ def block_evaluate(block, interpreter, frame):
result = interpreter.interpret(method, new_frame)
frame.pop_old_arguments_and_push_result(method, result)
def _invoke(ivkbl, frame, interpreter):
assert isinstance(ivkbl, Block.Evaluation)
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment