Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

[perl #53040] rakdudo : code generated by --target=pir does not execute in parrot
# 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


Report this thread to moderator Post Follow-up to this message
Old Post
Stephane Payrard (via RT)
04-19-08 01:37 PM


Re: [perl #53040] rakdudo : code generated by --target=pir does not execute in parrot
On 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


Report this thread to moderator Post Follow-up to this message
Old Post
Patrick R. Michaud
04-20-08 12:31 AM


Re: [perl #53040] rakdudo : code generated by --target=pir does not execute in parrot
On 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


Report this thread to moderator Post Follow-up to this message
Old Post
Patrick R. Michaud
04-21-08 01:19 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Perl 6 Compiler archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 11:11 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.