コード例 #1
0
ファイル: test_callbuilder.py プロジェクト: juokaz/pypy
def test_base_case(call_release_gil_mode=False):
    asm = FakeAssembler()
    cb = callbuilder.CallBuilder64(asm, ImmedLoc(12345), [ebx, ebx])
    if call_release_gil_mode:
        cb.select_call_release_gil_mode()
    cb.prepare_arguments()
    assert asm._log == [('mov', ebx, edi), ('mov', ebx, esi)]
コード例 #2
0
ファイル: test_callbuilder.py プロジェクト: weijiwei/pypy
def test_base_case(call_release_gil_mode=False):
    asm = FakeAssembler()
    old_follow_jump = callbuilder.follow_jump
    try:
        callbuilder.follow_jump = lambda addr: addr
        cb = callbuilder.CallBuilder64(asm, ImmedLoc(12345), [ebx, ebx])
    finally:
        callbuilder.follow_jump = old_follow_jump
    if call_release_gil_mode:
        cb.select_call_release_gil_mode()
    cb.prepare_arguments()
    assert asm._log == [('mov', ebx, edi), ('mov', ebx, esi)]
コード例 #3
0
def heap(addr):
    return AddressLoc(ImmedLoc(addr), imm0, 0, 0)