Code Comments
Programming Forum and web based access to our favorite programming groups.# New Ticket Created by Stephane Payrard # Please include the string: [perl #53040] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=53040 > The error message is "No such caller depth" Having it working would be a additional tool. Indeed, I wanted to tweak the code manually to see the code I needed the rakudo compiler to generated. I have not investigated but I suppose some setting code is missing. -- cognominal stef
Post Follow-up to this messageOn Fri, Apr 18, 2008 at 06:30:24AM -0700, Stephane Payrard wrote: > The error message is "No such caller depth" > > Having it working would be a additional tool. > Indeed, I wanted to tweak the code manually to see the code I needed > the rakudo compiler to generated. > > I have not investigated but I suppose some setting code is missing. The code produced by --target=pir won't run standalone, it also needs support code for loading the Perl 6 runtime libraries (i.e., perl6.pbc). Pm
Post Follow-up to this messageOn Fri, Apr 18, 2008 at 09:47:06AM -0700, chromatic wrote: > > > Is it useful to add code to HLLCompiler for this purpose? I've wanted > something similar in Pheme for a while, and I suspect it would help with > debugging Tcl and Lua as well. I'm not certain it belongs mainly in HLLCompiler. To get a .pir file to run standalone we essentially need an anonymous :main sub somewhere in the --target=pir output that does: 1. load the runtime library (e.g. load_bytecode 'perl6.pbc') 2. process command line arguments similar to what HLLCompiler and the HLL would do 3. invoke the primary sub that was generated by --target=pir For #1, it would be good if the runtime library is kept in a standard location -- I don't think that hardcoding the languages/perl6 path is good for this. I suppose the compiler .pbc files could go into .../runtime/parrot/library/ but that feels a little wrong to me. (See also RT#47992, which discusses providing a standard location for compiler runtimes.) For #2 we can't just call the 'command_line' method provided by HLLCompiler, because that's processing --target= and other options that really aren't applicable to an already-compiled .pir file. Also, some command line options may end up being specific to the HLL, and thus are better handled by the HLL runtime rather than HLLCompiler itself. Anyway, this is something would be good to research achieving in Rakudo, but it will require a fair bit of refactoring in perl6.pir to move things out of the current :main and into :load :init subs. Again, the trickiest part at the moment is getting command-line arguments into the appropriate location (I have a few ideas about this that I'll try shortly). Pm
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.