def __init__(self): SimpleTaskEngine.__init__(self) self.done = []
def __init__(self, setopts=None, default_goal=None, disable=[], exe_name=None, extmod_name=None, config=None, overrides=None): self.timer = Timer() SimpleTaskEngine.__init__(self) self.log = log if config is None: from pypy.config.pypyoption import get_pypy_config config = get_pypy_config(DEFAULTS, translating=True) self.config = config if overrides is not None: self.config.override(overrides) if setopts is not None: self.config.set(**setopts) self.exe_name = exe_name self.extmod_name = extmod_name self.done = {} self.disable(disable) if default_goal: default_goal, = self.backend_select_goals([default_goal]) if default_goal in self._maybe_skip(): default_goal = None self.default_goal = default_goal self.extra_goals = [] self.exposed = [] # expose tasks def expose_task(task, backend_goal=None): if backend_goal is None: backend_goal = task def proc(): return self.proceed(backend_goal) self.exposed.append(task) setattr(self, task, proc) backend, ts = self.get_backend_and_type_system() for task in self.tasks: explicit_task = task parts = task.split('_') if len(parts) == 1: if task in ('annotate'): expose_task(task) else: task, postfix = parts if task in ('rtype', 'backendopt', 'llinterpret', 'prehannotatebackendopt', 'hintannotate', 'timeshift'): if ts: if ts == postfix: expose_task(task, explicit_task) else: expose_task(explicit_task) elif task in ('source', 'compile', 'run'): if backend: if backend == postfix: expose_task(task, explicit_task) elif ts: if ts == backend_to_typesystem(postfix): expose_task(explicit_task) else: expose_task(explicit_task)
def __init__(self, setopts=None, default_goal=None, disable=[], exe_name=None, extmod_name=None, config=None, overrides=None): self.timer = Timer() SimpleTaskEngine.__init__(self) self.log = log if config is None: from pypy.config.pypyoption import get_pypy_config config = get_pypy_config(translating=True) self.config = config if overrides is not None: self.config.override(overrides) if setopts is not None: self.config.set(**setopts) self.exe_name = exe_name self.extmod_name = extmod_name self.done = {} self.disable(disable) if default_goal: default_goal, = self.backend_select_goals([default_goal]) if default_goal in self._maybe_skip(): default_goal = None self.default_goal = default_goal self.extra_goals = [] self.exposed = [] # expose tasks def expose_task(task, backend_goal=None): if backend_goal is None: backend_goal = task def proc(): return self.proceed(backend_goal) self.exposed.append(task) setattr(self, task, proc) backend, ts = self.get_backend_and_type_system() for task in self.tasks: explicit_task = task parts = task.split('_') if len(parts) == 1: if task in ('annotate',): expose_task(task) else: task, postfix = parts if task in ('rtype', 'backendopt', 'llinterpret', 'pyjitpl'): if ts: if ts == postfix: expose_task(task, explicit_task) else: expose_task(explicit_task) elif task in ('source', 'compile', 'run'): if backend: if backend == postfix: expose_task(task, explicit_task) elif ts: if ts == backend_to_typesystem(postfix): expose_task(explicit_task) else: expose_task(explicit_task)