Sketch of exceptions

2002-06-01 Thread Dan Sugalski
Okay, here's a quick sketch of how exceptions are going to look. First, we're going to treat them as essentially a sort of upwards-only continuation. (Which they really are, so that's fine) Exceptions are semi-fatal--they are *not* resumable. Too much trouble. Maybe we'll lift that restriction

Parrot Extension API

2002-06-01 Thread Melvin Smith
I'm working on an experimental extension API, which is going well, but I'm pondering how the GC should cooperate with native calls. Currently I have some code like: # t.pasm loadlib P0, "libpqt.so" print "Loaded\n" callnative P1, P0, "PQt_init" end /* libpqt.c */ int PQt_init(Interp * interp) {

Re: Parrot Extension API

2002-06-01 Thread Melvin Smith
At 02:17 PM 6/1/2002 -0400, Melvin Smith wrote: ># t.pasm >loadlib P0, "libpqt.so" >print "Loaded\n" >callnative P1, P0, "PQt_init" >end The correct code is actually: loadlib P0, "libpqt.so" print "Loaded\n" # Save an argument for native method save "Testing..." # callnative calls a native metho

Re: [COMMIT] New Assembler in place

2002-06-01 Thread Clinton A. Pierce
I'm in the process of converting BASIC over to use this new assembler... and have hit a few snags. I'm happy to patch, but don't know if this is the Right Thing or not. At 12:39 AM 6/1/2002 -0400, you wrote: >Support for keyed parameters now exists. I need to change the name of >the 'set_keyed

Re: Parrot Extension API

2002-06-01 Thread Melvin Smith
>Now there are a dozen ways to handle this. Using flags, keeping args on the >stack until return, yada yada yada... One option is we don't pass args to native on the normal stack, rather create a scratchpad Array PMC and pass it instead, so the routine can access it randomly. However, I'm unsure

Re: [COMMIT] New Assembler in place

2002-06-01 Thread Clinton A. Pierce
>This should actually be: > >".constant PerlHash 6" > >Right? Someone's mailer is adding an extra .

[COMMIT] New Assembler (mailer-friendly version)

2002-06-01 Thread Jeff
[Previous version had a problem with some mailers due to the leading '.'. The ';' before the '.' is NOT part of the syntax, but a way to foil mailer problems.] As noted, the new assembler is now in place. There isn't much resemblance to the old assembler, excepting the fact that they both (almost)

Re: Parrot Extension API

2002-06-01 Thread Dan Sugalski
At 2:17 PM -0400 6/1/02, Melvin Smith wrote: >Now there are a dozen ways to handle this. Using flags, keeping args on the >stack until return, yada yada yada... > >I'd like to hear suggestions, or maybe reference to past discussions I might >have missed on how we shall handle this. Actually I want

[netlabs #646] [PATCH] allow labels to start with _

2002-06-01 Thread via RT
# New Ticket Created by Kevin Falcone # Please include the string: [netlabs #646] # in the subject line of all future correspondence about this issue. # http://bugs6.perl.org/rt2/Ticket/Display.html?id=646 > While testing the other assembler patch, I noticed some of the cola-generated pasm

[netlabs #647] [PATCH] allow multiple empty labels in assembler

2002-06-01 Thread via RT
# New Ticket Created by Kevin Falcone # Please include the string: [netlabs #647] # in the subject line of all future correspondence about this issue. # http://bugs6.perl.org/rt2/Ticket/Display.html?id=647 > As clint noticed with BASIC, the assembler right now can't handle things like this:

Re: [COMMIT] New Assembler in place

2002-06-01 Thread Melvin Smith
At 12:39 AM 6/1/2002 -0400, Jeff wrote: >As noted, the new assembler is now in place. There isn't much Yay! FYI, Cola breaks with the new assembler. I think this is for 2 reasons, multiple labels and not allowing _ in label names. Kevin posted a couple of patches which fix the breakage, but I'm

Re: [COMMIT] New Assembler in place

2002-06-01 Thread Melvin Smith
At 02:25 PM 6/1/2002 -0400, Clinton A. Pierce wrote: >Looks great. Converted over with little sweat, noted below. Moving in the right direction. mandelbrot.cola -> mandel.pasm Old assembler: time assemble.pl mandel.pasm > mandel.pbc | grep real real0m0.390s New assembler: time ./assembl

Re: [COMMIT] New Assembler in place

2002-06-01 Thread Clinton A. Pierce
At 04:39 PM 6/1/2002 -0400, Melvin Smith wrote: >At 02:25 PM 6/1/2002 -0400, Clinton A. Pierce wrote: > >Looks great. Converted over with little sweat, noted below. > >Moving in the right direction. mandelbrot.cola -> mandel.pasm >[...] >Thats about 37% of the old assemble time. I noticed that t

[netlabs #648] [PATCH] keyed ops renaming

2002-06-01 Thread via RT
# New Ticket Created by Simon Glover # Please include the string: [netlabs #648] # in the subject line of all future correspondence about this issue. # http://bugs6.perl.org/rt2/Ticket/Display.html?id=648 > The patch below renames the set_keyed and get_keyed ops simply to set, as Jeff su

[netlabs #649] [PATCH] Allow numerical constant keys

2002-06-01 Thread via RT
# New Ticket Created by Simon Glover # Please include the string: [netlabs #649] # in the subject line of all future correspondence about this issue. # http://bugs6.perl.org/rt2/Ticket/Display.html?id=649 > The new assembler allows one to use string constants and string registers intercha

[netlabs #650] [PATCH] Assembler documentation tweaks

2002-06-01 Thread via RT
# New Ticket Created by Simon Glover # Please include the string: [netlabs #650] # in the subject line of all future correspondence about this issue. # http://bugs6.perl.org/rt2/Ticket/Display.html?id=650 > A few small fixes to the assembler documentation. NB This patch assumes that my pr

RE: [netlabs #649] [PATCH] Allow numerical constant keys

2002-06-01 Thread Brent Dax
Simon Glover: # The new assembler allows one to use string constants and # string registers interchangably as keys, but doesn't let you # do the same for INTs or FLOATs. Patch below fixes. That was intentional. S registers used on keyed ops are supposed to contain runtime-constructed KEY st

Re: Parrot Extension API

2002-06-01 Thread Melvin Smith
At 02:50 PM 6/1/2002 -0400, Dan Sugalski wrote: >At 2:17 PM -0400 6/1/02, Melvin Smith wrote: >>Now there are a dozen ways to handle this. Using flags, keeping args on the >>stack until return, yada yada yada... >>Since extensions are supposed to be isolated from the interpreter >>internals, I'm

Re: [COMMIT] New Assembler in place

2002-06-01 Thread Kevin Falcone
> "MS" == Melvin Smith <[EMAIL PROTECTED]> writes: MS> FYI, Cola breaks with the new assembler. I think this is for 2 MS> reasons, multiple labels and not allowing _ in label names. Kevin MS> posted a couple of patches which fix the breakage, but I'm not MS> sure sticking noop in there is the

Re: [COMMIT] New Assembler in place

2002-06-01 Thread Melvin Smith
At 06:07 PM 6/1/2002 -0400, Kevin Falcone wrote: > > "MS" == Melvin Smith <[EMAIL PROTECTED]> writes: > >MS> FYI, Cola breaks with the new assembler. I think this is for 2 >MS> reasons, multiple labels and not allowing _ in label names. Kevin >MS> posted a couple of patches which fix the break

C/C++ typedefs

2002-06-01 Thread Melvin Smith
C++ automatically generates a typedef name when it sees struct Foo { .. } We have a few places that name the typedef with the same name as the tag (which I don't like as style anyway), and its causing problems when trying to compile a C++ extension lib with parrot headers. One example: interprete

Re: Some tasks for the interested

2002-06-01 Thread Jason Gloudon
On Thu, Apr 25, 2002 at 01:58:29PM -0400, Dan Sugalski wrote: > 1) We need to have a set of 'new stack frame' ops that close out the > current stack frames and start new ones. Should take an optional size > that presizes the stacks. > 3) The stack chunks need to be decoupled from the chunk hea

Re: [COMMIT] New Assembler in place

2002-06-01 Thread Jeff
Melvin Smith wrote: > > At 06:07 PM 6/1/2002 -0400, Kevin Falcone wrote: > > > "MS" == Melvin Smith <[EMAIL PROTECTED]> writes: > > > >MS> FYI, Cola breaks with the new assembler. I think this is for 2 > >MS> reasons, multiple labels and not allowing _ in label names. Kevin > >MS> posted a co

Re: [netlabs #649] [PATCH] Allow numerical constant keys

2002-06-01 Thread Jeff
"Simon Glover (via RT)" wrote: > > # New Ticket Created by Simon Glover > # Please include the string: [netlabs #649] > # in the subject line of all future correspondence about this issue. > # http://bugs6.perl.org/rt2/Ticket/Display.html?id=649 > > > The new assembler allows one to use strin

Re: [COMMIT] New Assembler in place

2002-06-01 Thread Melvin Smith
At 11:13 PM 6/1/2002 -0400, Jeff wrote: >shortly. I just didn't think that hand-written compilers would generate >this code, but I suppose it's possible. They shouldn't, only lazily written compilers do. :) >Feel free to do that but I'll fix the actual bug soon. I'll wait. >Before we go down t

Parrot_Interp -> Parrot_Interp_t

2002-06-01 Thread Melvin Smith
In order to make the extension library work with C++ I had to rename Parrot_Interp typedef to Parrot_Interp_t I know _t was a subject of discussion, but its a quick fix so I can move ahead. Its only really used from embed.h in test_main.c and the extension API layer. If there are no complaints I

[COMMIT] Patches for Pn, label formats, and multiple labels.

2002-06-01 Thread Jeff
The following items are now patched and tested: Multiple labels converging on a single instruction. (Tested in t/op/basic.t) Labels and constants now match the format [a-zA-Z_][a-zA-Z0-9_]* (Tested in t/op/macros.t) P3[7], P3[0x1a], P3[-0b10101], P4[S1], P5["Hello World"] all work. Tests will be

[COMMIT] PXS or something like that

2002-06-01 Thread Melvin Smith
Native Extensions for Parrot: Rather than talk about it at length and not get any code done, I decided, concerning the native extension interface, to just take a simple hello world approach with some outside library. Qt is a great GUI lib, so I figured what the heck. What resulted was a small A

RE: Parrot_Interp -> Parrot_Interp_t

2002-06-01 Thread Brent Dax
Melvin Smith: # In order to make the extension library work with C++ I had # to rename Parrot_Interp typedef to Parrot_Interp_t # # I know _t was a subject of discussion, but its a quick fix so # I can move ahead. Its only really used from embed.h in # test_main.c and the extension API layer. #

Win32 build broken

2002-06-01 Thread Sebastian Bergmann
cd lib/Parrot && C:\Programme\Perl\bin\perl.exe Makefile.PL && NMAKE && cd .. Can't open perl script "Makefile.PL": No such file or directory NMAKE : fatal error U1077: 'cd' : Rueckgabe-Code '0x2' Stop. -- Sebastian Bergmann http://sebastian-bergmann.de/ http://phpOpenTracker

RE: [COMMIT] PXS or something like that

2002-06-01 Thread Brent Dax
Melvin Smith: # Native Extensions for Parrot: # # Rather than talk about it at length and not get any code # done, I decided, concerning the native extension interface, # to just take a simple hello world approach with some outside library. I would normally agree with this sentiment, except th

RE: [COMMIT] PXS or something like that

2002-06-01 Thread Melvin Smith
At 10:23 PM 6/1/2002 -0700, Brent Dax wrote: >Melvin Smith: ># Native Extensions for Parrot: ># ># Rather than talk about it at length and not get any code ># done, I decided, concerning the native extension interface, ># to just take a simple hello world approach with some outside library. > >I w

RE: Parrot_Interp -> Parrot_Interp_t

2002-06-01 Thread Melvin Smith
At 10:06 PM 6/1/2002 -0700, Brent Dax wrote: >Melvin Smith: ># If there are no complaints I'm going to commit this when I ># commit the initial patch for extensions. > >I think that's renaming it the wrong way. The struct should probably >become parrot_interp_t and the typedef Parrot_Interp. Thi