Exemple #1
0
     def __init__(self, num_args, universe):            
         def _invoke(ivkbl, frame, interpreter):
             # Get the block (the receiver) from the stack
             rcvr = frame.get_stack_element(ivkbl._number_of_arguments - 1)
 
             # Get the context of the block...
             context = rcvr.get_context()
 
             # Push a new frame and set its context to be the one specified in
             # the block
             new_frame = interpreter.push_new_frame(rcvr.get_method(), context)
             new_frame.copy_arguments_from(frame)
         
         Primitive.__init__(self, self._compute_signature_string(num_args), universe, _invoke)
         self._number_of_arguments = num_args
Exemple #2
0
        def __init__(self, num_args, universe):
            def _invoke(ivkbl, frame, interpreter):
                # Get the block (the receiver) from the stack
                rcvr = frame.get_stack_element(ivkbl._number_of_arguments - 1)

                # Get the context of the block...
                context = rcvr.get_context()

                # Push a new frame and set its context to be the one specified in
                # the block
                new_frame = interpreter.push_new_frame(rcvr.get_method(),
                                                       context)
                new_frame.copy_arguments_from(frame)

            Primitive.__init__(self, self._compute_signature_string(num_args),
                               universe, _invoke)
            self._number_of_arguments = num_args
Exemple #3
0
 def __init__(self, num_args, universe, invoke):
     Primitive.__init__(self, self._compute_signature_string(num_args),
                        universe, invoke)
     self._number_of_arguments = num_args
Exemple #4
0
 def __init__(self, num_args, universe, invoke):
     Primitive.__init__(self, self._compute_signature_string(num_args),
                        universe, invoke)
     self._number_of_arguments = num_args