Example #1
0
def post_constant_string(env, loc, const):
    block = Block(loc)
    block.result = VReg()
    block.op(['string', block.result, const.value])
    return block
Example #2
0
def post_function(env, loc, body):
    closure = new_closure(env, body)
    block = Block(loc)
    block.result = VReg()
    block.op(['closure', block.result, closure])
    return block
Example #3
0
def post_constant_int(env, loc, const):
    block = Block(loc)
    block.result = VReg()
    block.op(['int32', block.result, int(const.value)])
    return block