#1885: Parrot_load_bytecode should only load bytecode
-------------------------+--------------------------------------------------
 Reporter:  whiteknight  |       Owner:  cotto   
     Type:  RFC          |      Status:  new     
 Priority:  normal       |   Milestone:          
Component:  core         |     Version:  master  
 Severity:  medium       |    Keywords:  pir, pbc
     Lang:               |       Patch:          
 Platform:  all          |  
-------------------------+--------------------------------------------------

Comment(by whiteknight):

 Thanks for the testcase Patrick. You're right that I am very surprised by
 that result. In fact, I'm much more surprised that it hadn't been flagged
 as a bug beforehand. This rabbithole keeps going deeper.

 src/packfile.c:Parrot_load_bytecode() calls
 src/packfile.c:compile_of_load_file(), which calls
 src/interp/inter_misc.c:Parrot_compile_file(), which calls
 compilers/imcc/parser_util.c:imcc_compile_file() which does compile the
 PIR down but doesn't trigger any of the :load or :init functions. The
 :load functions are then triggered back in compile_or_load_file, but only
 for the special case of .pir or .pasm files (it's triggered automatically
 for .pbc files, like it should be).

 So there is one mystery down.

-- 
Ticket URL: <https://trac.parrot.org/parrot/ticket/1885#comment:9>
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