Example #1
0
    def __init__(self, name, package_name, source_ref):
        ClosureGiverNodeBase.__init__(
            self,
            name        = name,
            code_prefix = "module",
            source_ref  = source_ref
        )

        PythonModuleMixin.__init__(
            self,
            name         = name,
            package_name = package_name
        )


        ChildrenHavingMixin.__init__(
            self,
            values = {
                "body" : None # delayed
            },
        )

        self.variables = set()

        # The list functions contained in that module.
        self.functions = OrderedSet()

        self.active_functions = OrderedSet()
        self.cross_used_functions = OrderedSet()

        # SSA trace based information about the module.
        self.collection = None
Example #2
0
def startTraversal():
    # Using global here, as this is really a singleton, in the form of a module,
    # pylint: disable=W0603
    global active_modules, done_modules

    active_modules = OrderedSet(root_modules)
    done_modules = OrderedSet()

    for active_module in active_modules:
        active_module.startTraversal()
Example #3
0
    def __init__(self, name, code_prefix, source_ref):
        CodeNodeBase.__init__(self,
                              name=name,
                              code_prefix=code_prefix,
                              source_ref=source_ref)

        self.providing = OrderedDict()

        self.keeper_variables = OrderedSet()
Example #4
0
    def __init__(self, name, package_name, source_ref):
        ClosureGiverNodeBase.__init__(self,
                                      name=name,
                                      code_prefix="module",
                                      source_ref=source_ref)

        ChildrenHavingMixin.__init__(
            self,
            values={},
        )

        MarkContainsTryExceptIndicator.__init__(self)

        PythonModuleMixin.__init__(self, name=name, package_name=package_name)

        self.variables = set()

        # The list functions contained in that module.
        self.functions = OrderedSet()

        self.active_functions = OrderedSet()

        # SSA trace based information about the module.
        self.collection = None
Example #5
0
    def __init__(self, name, package, source_ref):
        assert type(name) is str, type(name)
        assert "." not in name, name
        assert package is None or (type(package) is str and package != "")

        ClosureGiverNodeBase.__init__(self,
                                      name=name,
                                      code_prefix="module",
                                      source_ref=source_ref)

        ChildrenHavingMixin.__init__(self, values={})

        MarkContainsTryExceptIndicator.__init__(self)

        self.package = package

        self.variables = set()

        # The list functions contained in that module.
        self.functions = OrderedSet()
Example #6
0
#     See the License for the specific language governing permissions and
#     limitations under the License.
#
""" This to keep track of used modules.

    There is a set of root modules, which are user specified, and must be
    processed. As they go, they add more modules to active modules list
    and move done modules out of it.

    That process can be restarted and modules will be fetched back from
    the existing set of modules.
"""

from nuitka.oset import OrderedSet

root_modules = OrderedSet()


def addRootModule(module):
    root_modules.add(module)


def getRootModules():
    return root_modules


active_modules = OrderedSet()
done_modules = OrderedSet()


def startTraversal():
Example #7
0
 def startTraversal(self):
     self.active_functions = OrderedSet()
    def __init__(self, parent):
        ConstraintCollectionBase.__init__(self, parent=parent)

        self.branch_only_traces = OrderedSet()