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)]
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)]
def heap(addr): return AddressLoc(ImmedLoc(addr), imm0, 0, 0)