예제 #1
0
def post_constant_string(env, loc, const):
    block = Block(loc)
    block.result = VReg()
    block.op(['string', block.result, const.value])
    return block
예제 #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
예제 #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