|
{:function, :do_read, 5, 11, |
|
[ |
|
{:line, 1}, |
|
{:label, 10}, |
|
{:func_info, {:atom, Test}, {:atom, :do_read}, 5}, |
|
{:label, 11}, |
|
{:test, :is_lt, {:f, 13}, [integer: 0, x: 3]}, |
|
{:allocate, 6, 5}, |
|
{:init_yregs, {:list, [y: 0]}}, |
|
{:move, {:x, 4}, {:y, 1}}, |
|
{:move, {:x, 3}, {:y, 2}}, |
|
{:move, {:x, 2}, {:y, 3}}, |
|
{:move, {:x, 1}, {:y, 4}}, |
|
{:move, {:x, 0}, {:y, 5}}, |
|
{:line, 2}, |
|
{:call_ext, 3, {:extfunc, ThousandIsland.Socket, :recv, 3}}, |
|
{:test, :is_tagged_tuple, {:f, 12}, [{:x, 0}, 2, {:atom, :ok}]}, |
|
{:get_tuple_element, {:x, 0}, 1, {:y, 0}}, |
|
{:line, 3}, |
|
{:gc_bif, :byte_size, {:f, 0}, 0, [y: 0], {:x, 0}}, |
|
{:gc_bif, :-, {:f, 0}, 1, |
|
[{:y, 2}, {:tr, {:x, 0}, {{:t_integer, :any}, 0, 288230376151711743}}], |
|
{:y, 2}}, |
|
{:move, {:y, 2}, {:x, 1}}, |
|
{:move, {:y, 4}, {:x, 0}}, |
|
{:init_yregs, {:list, [y: 4]}}, |
|
{:call_ext, 2, {:extfunc, :erlang, :min, 2}}, |
|
{:test_heap, 2, 1}, |
|
{:put_list, {:y, 1}, {:y, 0}, {:x, 4}}, |
|
{:move, {:y, 3}, {:x, 2}}, |
|
{:move, {:x, 0}, {:x, 1}}, |
|
{:move, {:y, 2}, {:x, 3}}, |
|
{:move, {:y, 5}, {:x, 0}}, |
|
{:call_last, 5, {Test, :do_read, 5}, 6}, |
|
{:label, 12}, |
|
{:deallocate, 6}, |
|
:return, |
|
{:label, 13}, |
|
{:test_heap, 3, ...}, |
|
{:put_tuple2, ...}, |
|
:return |
|
]} |
|
|
|
{:function, :read, 5, 21, |
|
[ |
|
{:line, 4}, |
|
{:label, 20}, |
|
{:func_info, {:atom, Test}, {:atom, :read}, 5}, |
|
{:label, 21}, |
|
{:allocate, 4, 5}, |
|
{:move, {:x, 4}, {:y, 0}}, |
|
{:move, {:x, 2}, {:y, 1}}, |
|
{:move, {:x, 1}, {:y, 2}}, |
|
{:move, {:x, 0}, {:y, 3}}, |
|
{:move, {:atom, :read_length}, {:x, 1}}, |
|
{:move, {:x, 2}, {:x, 0}}, |
|
{:move, {:integer, 1000000}, {:x, 2}}, |
|
{:line, 5}, |
|
{:call_ext, 3, {:extfunc, Keyword, :get, 3}}, |
|
{:move, {:x, 0}, {:x, 1}}, |
|
{:move, {:y, 2}, {:x, 0}}, |
|
{:call_ext, 2, {:extfunc, :erlang, :min, 2}}, |
|
{:swap, {:y, 1}, {:x, 0}}, |
|
{:move, {:atom, :read_timeout}, {:x, 1}}, |
|
{:line, 6}, |
|
{:call_ext, 2, {:extfunc, Keyword, :get, 2}}, |
|
{:move, {:x, 0}, {:x, 2}}, |
|
{:move, {:y, 0}, {:x, 4}}, |
|
{:move, {:y, 1}, {:x, 1}}, |
|
{:move, {:y, 2}, {:x, 3}}, |
|
{:move, {:y, 3}, {:x, 0}}, |
|
{:call_last, 5, {Test, :do_read, 5}, 4} |
|
]} |