def setup_topaz(): global ruby_space # Patch-out virtualizables from Topaz so that translation works from topaz.frame import Frame as TopazFrame from topaz.interpreter import Interpreter as TopazInterpreter try: delattr(TopazFrame, "_virtualizable_") delattr(TopazInterpreter.jitdriver, "virtualizables") except AttributeError: pass # this is fine ruby_space = ObjectSpace(None)
def getspace(config): return ObjectSpace(config)
def build_space(): space = ObjectSpace() space.setup(topaz.__file__) return space
def build_space(): space = ObjectSpace(get_combined_translation_config( overrides=get_topaz_config_options(), )) space.setup(topaz.__file__) return space
def build_space(): space = ObjectSpace( get_combined_translation_config( overrides=get_topaz_config_options(), )) space.setup(topaz.__file__) return space
def new_topaz_objspace(): translating = sys.argv[0] == '.build/build.py' # make better config = get_combined_translation_config(translating=translating) config.set(**get_topaz_config_options()) config.translation.suggest(check_str_without_nul=True) return ObjectSpace(config)