Ticket #440 (closed feature: fixed)

Opened 13 years ago

Last modified 13 years ago

move src/pbc_info.c to examples/c/pbc_sample.c

Reported by: rurban Owned by: jkeenan
Priority: normal Milestone: 1.5
Component: install Version: trunk
Severity: medium Keywords: pbc info dump
Cc: Language:
Patch status: applied Platform: all

Description

r3904 added src/pbc_info.c sample program

This should be moved to examples/c or examples/tools.

It is no info program, and it *changes* the pbc's by adding some sample sections. The info program is called pbc_dump.

Attachments

integer_1.pbc.info Download (137 bytes) - added by jkeenan 13 years ago.
integer_1.pbc.dump Download (2.2 KB) - added by jkeenan 13 years ago.
integer_2.pbc.info Download (1.0 KB) - added by jkeenan 13 years ago.
integer_2.pbc.dump Download (1.0 KB) - added by jkeenan 13 years ago.
number_1.pbc.info Download (221 bytes) - added by jkeenan 13 years ago.
number_1.pbc.dump Download (7.0 KB) - added by jkeenan 13 years ago.
string_1.pbc.info Download (231 bytes) - added by jkeenan 13 years ago.
string_1.pbc.dump Download (3.2 KB) - added by jkeenan 13 years ago.
parrot_config.pbc.info Download (265 bytes) - added by jkeenan 13 years ago.
parrot_config.pbc.dump Download (6.5 KB) - added by jkeenan 13 years ago.
pbc_info_remove.diff Download (19.6 KB) - added by jkeenan 13 years ago.
diff between trunk and pbc_info_remove branch

Change History

in reply to: ↑ description ; follow-up: ↓ 2   Changed 13 years ago by jkeenan

  • status changed from new to assigned
  • severity changed from high to medium
  • platform set to all
  • priority changed from major to normal
  • owner set to jkeenan
  • version set to trunk
  • keywords pbc info dump added

Replying to rurban:

r3904 added src/pbc_info.c sample program

I looked at this TT for the first time today. I am no bytecode expert, so some of the following comments/questions may be naive. But, anyhow ...

The source code file is src/pbc_info.c. It is compiled into the stand-alone executable pbc_info in the very last step of make.

src/pbc_info.c
cc -o pbc_info \
    src/pbc_info.o \
    -Wl,-rpath=/home/jimk/work/parrot/blib/lib -L/home/jimk/work/parrot/blib/lib -lparrot -lpthread -lm -L/usr/lib  -licuuc -licudata -lpthread -lm -lnsl -ldl -lm -lcrypt -lutil -lpthread -lgmp -lreadline  -L/usr/local/lib -Wl,-E  

This should be moved to examples/c or examples/tools. It is no info program, and it *changes* the pbc's by adding some sample sections. The info program is called pbc_dump.

I can't say whether pbc_info changes any PBCs; I saw no evidence of that.

But Reini is correct in reporting that it is not very informative, particularly in comparison with pbc_dump. I will attach 10 files which display the output of ./pbc_info and ./pbc_dump on each of 5 .pbc files as run on Linux i386. Except where they bytecode wasn't appropriate for Linux -- where both programs failed -- the information supplied by pbc_info was vastly inferior to that supplied by pbc_dump.

If that is the case, then I have to ask why we should have 'make' build the 'pbc_info' at all. Let's cut it out entirely. And if we do that, we shouldn't leave src/pbc_info.c where it is. But if we move it to somewhere under examples/ as Reini suggested, then we first should ask, 'What exactly is it an example of?'

Thoughts? Thank you very much.

kid51

Changed 13 years ago by jkeenan

Changed 13 years ago by jkeenan

Changed 13 years ago by jkeenan

Changed 13 years ago by jkeenan

Changed 13 years ago by jkeenan

Changed 13 years ago by jkeenan

Changed 13 years ago by jkeenan

Changed 13 years ago by jkeenan

Changed 13 years ago by jkeenan

Changed 13 years ago by jkeenan

in reply to: ↑ 1 ; follow-up: ↓ 5   Changed 13 years ago by jkeenan

  • type changed from bug to feature
  • patch set to new

Replying to jkeenan:

If that is the case, then I have to ask why we should have 'make' build the 'pbc_info' at all. Let's cut it out entirely.

No one objected to this -- but, then again, nobody said anything at all. So I now formally propose the deprecation of pbc_info as a Parrot feature. I have begun work on this in the pbc_info_remove branch. Attached is a patch which represents the work there. The following make targets ran or tested satisfactorily: all, test, buildtools_tests, manifest_tests and most of codetest. I can't quite figure out why examples/c/pbc_info.c is now failing the c_function_docs coding standard; other eyeballs welcome.

I propose that we apply this patch to trunk at the post-1.5 deprecation point, i.e., after the third Tuesday in July.

I grepped the repository for pbc_info and PINFO and removed whatever I found that wasn't tied down, with one exception: I did not touch the Cygwin ports files, as they were developed in patch form. I did, however, modify all the other ports files where those strings were found.

And if we do that, we shouldn't leave src/pbc_info.c where it is. But if we move it to somewhere under examples/ as Reini suggested, then we first should ask, 'What exactly is it an example of?'

For lack of any better idea, I have moved pbc_info.c to examples/c/.

Comments?

Thank you very much.

kid51

Changed 13 years ago by jkeenan

diff between trunk and pbc_info_remove branch

  Changed 13 years ago by jkeenan

  • milestone set to 1.5

  Changed 13 years ago by jkeenan

  • component changed from none to install

in reply to: ↑ 2   Changed 13 years ago by jkeenan

  • status changed from assigned to closed
  • resolution set to fixed

Replying to jkeenan:

For lack of any better idea, I have moved pbc_info.c to examples/c/.

Merged pbc_info_remove branch into trunk at r40204. All tests pass. Closing ticket.

  Changed 13 years ago by jkeenan

  • patch changed from new to applied
Note: See TracTickets for help on using tickets.