Esempio n. 1
0
def pytest_funcarg__gen(request):
    abcfile = AbcFile()
    gen = abcfile.create_generator()
    script = gen.begin_script()
    init = script.make_init()
    gen.enter_rib(init)
    return gen
Esempio n. 2
0
    def __init__(self, name="Mecheye Fusion", abc=None, flags=0):
        """
        Constructor.

        :param name: the name for the ABC Block
        :type name:  a string
        :param flags: the flags for the ABC Block
                      currently, that can be 1, which
                      lazily inits the ABC Block
        """
        self.abc = abc or AbcFile()
        self.name = name
        self.flags = flags
Esempio n. 3
0
from fusion.swf.swfdata import SwfData
from fusion.swf.records import Rect, RGBA
from fusion.swf import tags

from fusion.avm2.abc_ import AbcFile
from fusion.avm2.node import export_function, INode, Slot
from fusion.avm2.loadable import Chain, This, Field, Stack, Local
from fusion.avm2.playerglobal import flash

swf = SwfData()

abc = AbcFile()
gen = abc.create_generator()

@export_function(["Object", flash.text.TextField], rettype="void")
def dump(gen, params, tracer):
    gen.load(0)
    gen.emit('convert_i')
    index_reg = gen.store_var("idx")
    params_reg = params.get_index(gen)

    gen.set_label("loop")

    gen.emit('hasnext2', params_reg, index_reg)
    gen.branch_if_false("done")

    gen.load(params)
    gen.load(Local("idx"))
    gen.emit('nextname')
    gen.load("=")