#206: extend disassembler to print constants in const table
--------------------+-------------------------------------------------------
 Reporter:  kjs     |       Owner:              
     Type:  RFC     |      Status:  new         
 Priority:  normal  |   Milestone:              
Component:  core    |     Version:              
 Severity:  medium  |    Keywords:  disassembler
     Lang:          |       Patch:              
 Platform:          |  
--------------------+-------------------------------------------------------

Comment(by rurban):

 I do not understand.

 pbc_disassemble already prints via print_constant_table() the constant
 table content.
 {{{
 $ ./pbc_disassemble -b t/native_pbc/string_1.pbc
 =head1 Constant-table

 PMC_CONST(0): 'ParrotInterpreter'
 PMC_CONST(1): abc
 PMC_CONST(2): a2c
 PMC_CONST(3):    X
 PMC_CONST(4): Dw
 PMC_CONST(5):

 PMC_CONST(6): t/op/string_133.pasm
 PMC_CONST(7):
 PMC_CONST(8): (null)

 =cut

 # Current Source Filename 't/op/string_133.pasm'
         set_s_sc S1,"a2c"
         set_s_sc S2,"Dw"
         bxors_s_s S1,S2
         print_s S1
         print_sc "\n"
         print_s S2
         print_sc "\n"
         set_s_sc S1,"abc"
         set_s_sc S2,"   X"
         bxors_s_s S1,S2
         print_s S1
         print_sc "\n"
         print_s S2
         print_sc "\n"
         end
 }}}

 Do you want the set_s_sc S1,"a2c" argument refer to PMC_CONST(1) and not
 the value?
 Or maybe add set_s_sc S1,"a2c" #PMC_CONST(1) as comment?

 The trick here is that the disassmebled pbc can be assembled with parrot
 again, roundtrip.

-- 
Ticket URL: <https://trac.parrot.org/parrot/ticket/206#comment:1>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets

Reply via email to