Front page | perl.perl6.internals |
Postings from October 2001
[patch] changes to trace
Thread Next
From:
Brian Wheeler
Date:
October 17, 2001 13:22
Subject:
[patch] changes to trace
Message ID:
1003350853.15224.113.camel@wombat.educ.indiana.edu
This patch makes trace a little more useful. It prints the constant
referred to, as well as the value of the register being accessed.
This string reverse program
trace 1
set S0,"Hello world"
set S1,""
set S2,""
length I0,S0
dec I0
$loop: substr S2,S0,I0,1
concat S1,S2
dec I0
ge I0,0,$loop
set S0,S1
end
produces this output (I removed some spaces on PC=16 to stop the word
wrap in my mailer):
PC=2; OP=9 (set_s_sc); ARGS=(S0=(null), "Hello world")
PC=5; OP=9 (set_s_sc); ARGS=(S1=(null), "")
PC=8; OP=9 (set_s_sc); ARGS=(S2=(null), "")
PC=11; OP=115 (length_i_s); ARGS=(I0=0, S0="Hello world")
PC=14; OP=66 (dec_i); ARGS=(I0=11)
PC=16; OP=117 (substr_s_s_i_ic); ARGS=(S2="", S0="Hello world", I0=10,1)
PC=21; OP=110 (concat_s_s); ARGS=(S1="", S2="d")
PC=24; OP=66 (dec_i); ARGS=(I0=10)
PC=26; OP=43 (ge_i_ic_ic); ARGS=(I0=9, 0, -10)
PC=16; OP=117 (substr_s_s_i_ic); ARGS=(S2="d", S0="Hello world", I0=9,1)
PC=21; OP=110 (concat_s_s); ARGS=(S1="d", S2="l")
PC=24; OP=66 (dec_i); ARGS=(I0=9)
PC=26; OP=43 (ge_i_ic_ic); ARGS=(I0=8, 0, -10)
PC=16; OP=117 (substr_s_s_i_ic); ARGS=(S2="l", S0="Hello world", I0=8,1)
PC=21; OP=110 (concat_s_s); ARGS=(S1="dl", S2="r")
PC=24; OP=66 (dec_i); ARGS=(I0=8)
PC=26; OP=43 (ge_i_ic_ic); ARGS=(I0=7, 0, -10)
PC=16; OP=117 (substr_s_s_i_ic); ARGS=(S2="r", S0="Hello world", I0=7,1)
PC=21; OP=110 (concat_s_s); ARGS=(S1="dlr", S2="o")
PC=24; OP=66 (dec_i); ARGS=(I0=7)
PC=26; OP=43 (ge_i_ic_ic); ARGS=(I0=6, 0, -10)
PC=16; OP=117 (substr_s_s_i_ic); ARGS=(S2="o", S0="Hello world", I0=6,1)
PC=21; OP=110 (concat_s_s); ARGS=(S1="dlro", S2="w")
PC=24; OP=66 (dec_i); ARGS=(I0=6)
PC=26; OP=43 (ge_i_ic_ic); ARGS=(I0=5, 0, -10)
PC=16; OP=117 (substr_s_s_i_ic); ARGS=(S2="w", S0="Hello world", I0=5,1)
PC=21; OP=110 (concat_s_s); ARGS=(S1="dlrow", S2=" ")
PC=24; OP=66 (dec_i); ARGS=(I0=5)
PC=26; OP=43 (ge_i_ic_ic); ARGS=(I0=4, 0, -10)
PC=16; OP=117 (substr_s_s_i_ic); ARGS=(S2=" ", S0="Hello world", I0=4,1)
PC=21; OP=110 (concat_s_s); ARGS=(S1="dlrow ", S2="o")
PC=24; OP=66 (dec_i); ARGS=(I0=4)
PC=26; OP=43 (ge_i_ic_ic); ARGS=(I0=3, 0, -10)
PC=16; OP=117 (substr_s_s_i_ic); ARGS=(S2="o", S0="Hello world", I0=3 1)
PC=21; OP=110 (concat_s_s); ARGS=(S1="dlrow o", S2="l")
PC=24; OP=66 (dec_i); ARGS=(I0=3)
PC=26; OP=43 (ge_i_ic_ic); ARGS=(I0=2, 0, -10)
PC=16; OP=117 (substr_s_s_i_ic); ARGS=(S2="l", S0="Hello world", I0=2,1)
PC=21; OP=110 (concat_s_s); ARGS=(S1="dlrow ol", S2="l")
PC=24; OP=66 (dec_i); ARGS=(I0=2)
PC=26; OP=43 (ge_i_ic_ic); ARGS=(I0=1, 0, -10)
PC=16; OP=117 (substr_s_s_i_ic); ARGS=(S2="l", S0="Hello world", I0=1,1)
PC=21; OP=110 (concat_s_s); ARGS=(S1="dlrow oll", S2="e")
PC=24; OP=66 (dec_i); ARGS=(I0=1)
PC=26; OP=43 (ge_i_ic_ic); ARGS=(I0=0, 0, -10)
PC=16; OP=117 (substr_s_s_i_ic); ARGS=(S2="e", S0="Hello world", I0=0,1)
PC=21; OP=110 (concat_s_s); ARGS=(S1="dlrow olle", S2="H")
PC=24; OP=66 (dec_i); ARGS=(I0=0)
PC=26; OP=43 (ge_i_ic_ic); ARGS=(I0=-1, 0, -10)
PC=30; OP=8 (set_s_s); ARGS=(S0="Hello world", S1="dlrow olleH")
PC=33; OP=0 (end)
If it looks reasonable, I'll commit it.
Brian
Thread Next
-
[patch] changes to trace
by Brian Wheeler