Hi, On Saturday 20 March 2004 20:09, Will Coleda wrote: > I am having trouble running a .pbc that includes a call to _dumper > unless I run it from the top level parrot directory. > > bash-2.05a$ cat ./foo.imc > .sub main > _dumper($P1) > end > .end > > .include "library/dumper.imc" > bash-2.05a$ ./parrot -o foo.pbc foo.imc > bash-2.05a$ ./parrot foo.pbc > "VAR1" => null > bash-2.05a$ cd languages/ > bash-2.05a$ ../parrot ../foo.pbc > error:imcc:imcc_compile_file: couldn't open 'library/Data/Dumper.imc' > > Looks like the problem is in library/dumper.imc's _global_dumper, which > does a > > load_bytecode "library/Data/Dumper.imc" > > on line 134. Any particular reason a runtime load ("load_bytecode") is > done rather than a compile time (".include") ? It is designed to load it at runtime to reduce in-memory code duplication. The dumper can be used by many dynamically loaded files without having them to include the whole dumper code.
> (If not, then can we switch it back to compile time to avoid the > working directory issue until load_bytecode's TODO is implemented > (search the library)) I think it is better to implement the library searching. Including all source directly it is not easy, it is spread over several files containing some equal function names. You can switch back to the old dumper version with cvs update -D 2004-03-10 library/dumper.imc till the searching is implemented. > -- > Will "Coke" Coleda will at coleda > dot com jens