Example #1
0
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)
Example #2
0
def getspace(config):
    return ObjectSpace(config)
Example #3
0
 def build_space():
     space = ObjectSpace()
     space.setup(topaz.__file__)
     return space
Example #4
0
 def build_space():
     space = ObjectSpace(get_combined_translation_config(
         overrides=get_topaz_config_options(),
     ))
     space.setup(topaz.__file__)
     return space
Example #5
0
 def build_space():
     space = ObjectSpace(
         get_combined_translation_config(
             overrides=get_topaz_config_options(), ))
     space.setup(topaz.__file__)
     return space
Example #6
0
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)