Permalink
Browse files

disasm: Move printing of type

I'd like to remove all the PACT types from the constant output, so
lets let each type handle displaying the type.
  • Loading branch information...
1 parent d0a2ada commit f4a48b261e5c19a55cb071c8beafecf04e15fec0 @Benabik Benabik committed Aug 9, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/disasm.winxed
View
@@ -73,12 +73,12 @@ function main[main](var argv) {
sub_map.set_key_type(Hash_key_type_PMC_ptr);
for (i = 0; i < elements(v); ++i) {
vi = v[i];
- print(i, ' ', typeof(vi), ' ');
+ print(i, ' ');
switch(typeof(vi)) {
case 'PACT;Packfile;Subroutine':
// label, name, options
sub_map[vi] = s = '_sub' + string(i);
- print(s, ', sc', sc_map[vi.name]);
+ print('Sub ', s, ', sc', sc_map[vi.name]);
// TODO: main, tags, subid, multi, etc
if (vi.multi_sig != null) {
@@ -116,6 +116,7 @@ function main[main](var argv) {
break;
default:
+ print(typeof(vi), ' ');
try {
say(get_repr(vi));
} catch() {

0 comments on commit f4a48b2

Please sign in to comment.