コード例 #1
0
ファイル: universe.py プロジェクト: QDucasse/PySOM
    def new_method(self, signature, num_bytecodes, num_literals, num_locals,
                   maximum_number_of_stack_elements):
        # Allocate a new method and set its class to be the method class
        result = Method(self._nilObject, num_literals, num_locals,
                        maximum_number_of_stack_elements, num_bytecodes,
                        signature)
        result.set_class(self._methodClass)

        # Return the freshly allocated method
        return result
コード例 #2
0
ファイル: universe.py プロジェクト: Gabri3l/PySOM
    def new_method(self, signature, num_bytecodes, num_literals,
                   num_locals, maximum_number_of_stack_elements):
        # Allocate a new method and set its class to be the method class
        result = Method(self._nilObject,
                        num_literals,
                        num_locals,
                        maximum_number_of_stack_elements,
                        num_bytecodes,
                        signature)
        result.set_class(self._methodClass)

        # Return the freshly allocated method
        return result
コード例 #3
0
ファイル: universe.py プロジェクト: krono/PySOM
    def new_method(self, signature, num_bytecodes, num_literals):
        # Allocate a new method and set its class to be the method class
        result = Method(self._nilObject)
        result.set_class(self._methodClass)

        # Set the signature and the number of bytecodes
        result.set_signature(signature)
        result.set_number_of_bytecodes(num_bytecodes)
        result.set_number_of_indexable_fields_and_clear(num_literals, self._nilObject)

        # Return the freshly allocated method
        return result
コード例 #4
0
 def new_method(signature, num_bytecodes, literals,
                num_locals, maximum_number_of_stack_elements):
     return Method(literals, num_locals, maximum_number_of_stack_elements,
                   num_bytecodes, signature)
コード例 #5
0
 def new_method(self, signature, invokable, embedded_block_methods):
     return Method(signature, invokable, embedded_block_methods, self)