Re: [perl #20315] [PATCH] eval - inter code segment branches

2003-01-22 Thread Leopold Toetsch
Jason Gloudon wrote: On Tue, Jan 21, 2003 at 08:21:42PM +0100, Leopold Toetsch wrote: # #!/usr/bin/perl -w # my $i= 5; # LAB: #$i++; #eval(goto LAB if ($i==6)); Ok. Having inter_cs call DO_OP just seems more involved than it has to be. Yep. How about a single self-contained

Re: [perl #20315] [PATCH] eval - inter code segment branches

2003-01-21 Thread Jason Gloudon
On Tue, Jan 21, 2003 at 12:08:29AM +0100, Leopold Toetsch wrote: Here is a proposal for inter code segment jumps: The assembler (imcc) can recognize when a branch ins goes to a different code segment. For such a branch, imcc generates this opcode seqence: inter_cs if i, ic # or

Re: [perl #20315] [PATCH] eval - inter code segment branches

2003-01-21 Thread Leopold Toetsch
Jason Gloudon wrote: On Tue, Jan 21, 2003 at 12:08:29AM +0100, Leopold Toetsch wrote: Here is a proposal for inter code segment jumps: The assembler (imcc) can recognize when a branch ins goes to a different code segment. For such a branch, imcc generates this opcode seqence: inter_cs

Re: [perl #20315] [PATCH] eval - inter code segment branches

2003-01-21 Thread Jason Gloudon
On Tue, Jan 21, 2003 at 08:21:42PM +0100, Leopold Toetsch wrote: For such a branch, imcc generates this opcode seqence: inter_cs if i, ic # or whatever Why do we need branches to go to different code segments ? Because of this nasty piece of little code: t/syn/eval_3.imc: #

Re: [perl #20315] [PATCH] eval - inter code segment branches

2003-01-20 Thread Leopold Toetsch
Leopold Toetsch wrote: I have it ready. It's based on the packfile patch #18056 by Juergen Boemmels. On top of this patch, it was quite easy to implement multiple code segments. And yet another f'up me. Here is a proposal for inter code segment jumps: The assembler (imcc) can recognize when

Re: [perl #20315] [PATCH] eval

2003-01-20 Thread Leopold Toetsch
Leopold Toetsch wrote: I have it ready. - code is ready for debug information, I'll first do it in imcc, which could generate file/line info on the fly. Next would then be to extend the PBC format. And this is working too in imcc, including gdb-stepping into evaled code segments. Does

Re: [perl #20315] [PATCH] eval

2003-01-17 Thread Leopold Toetsch
Leopold Toetsch wrote: So it seems, that for multiple code segments, we'll have to take the PackFile_ConstTable out of the structure and include file/line/debug/whatever information. This would look like: packfile aka interpreter-code: - constants - code_segment[] - byte_code -

Re: [perl #20315] [PATCH] eval

2003-01-15 Thread Leopold Toetsch
Leopold Toetsch (via RT) wrote: # New Ticket Created by Leopold Toetsch # Please include the string: [perl #20315] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt2/Ticket/Display.html?id=20315 Attached is a first try towards eval. I have

Re: [perl #20315] [PATCH] eval

2003-01-15 Thread Jerome Quelin
Leopold Toetsch wrote: 1) The call function to the compiler/assembler is kept as a NCI. Better would be a subclass of NCI (Compiler.pmc or so), which provides invoke_keyed(key, next) Hmm, I don't know what a NCI is. Where (which files) can I find information about them? Jerome -- [EMAIL

Re: [perl #20315] [PATCH] eval

2003-01-15 Thread Dan Sugalski
At 8:27 PM + 1/14/03, Leopold Toetsch (via RT) wrote: # New Ticket Created by Leopold Toetsch # Please include the string: [perl #20315] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt2/Ticket/Display.html?id=20315 Attached is a first try

Re: [perl #20315] [PATCH] eval

2003-01-15 Thread Leopold Toetsch
In perl.perl6.internals, you wrote: Leopold Toetsch wrote: 1) The call function to the compiler/assembler is kept as a NCI. Better would be a subclass of NCI (Compiler.pmc or so), which provides invoke_keyed(key, next) Hmm, I don't know what a NCI is. Where (which files) can I find

Re: [perl #20315] [PATCH] eval

2003-01-15 Thread Leopold Toetsch
Dan Sugalski wrote: At 8:27 PM + 1/14/03, Leopold Toetsch (via RT) wrote: Yow, Cool! We *have* to get IMCC built into parrot now. You do get this wrong - always ;-) imcc = parrot + assemble.pl - pre-processor + PIR-assembler + optimizer/10#yet now already With the help

[perl #20315] [PATCH] eval

2003-01-14 Thread via RT
# New Ticket Created by Leopold Toetsch # Please include the string: [perl #20315] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt2/Ticket/Display.html?id=20315 Attached is a first try towards eval. - interpreter has a new data member