Re: [perl #23292] [PATCH] Update for memory_internals.pod

2003-08-14 Thread Simon Glover
On Tue, 12 Aug 2003, Jürgen Bömmels wrote: > It took me some minutes to find out how ARENA_DOD_FLAGS work. I added > a section to memory_internals.pod that others hopefully need a few > minutes less to figure out what its good for. > Thanks, applied, with a few tweaks. Simon

Re: Packfile stuff

2003-08-14 Thread Dan Sugalski
At 12:18 PM +0200 8/5/03, Leopold Toetsch wrote: Dan Sugalski <[EMAIL PROTECTED]> wrote: Here's some stuff we need to add to the packfile format and the sub header to get things ready for more language work. First: any changes here imply, that assemble.pl/disassemble.pl will seeze to work. So fir

Re: Re[2]: parrot, win32, stand-alone distribution, separate Parrot maillist

2003-08-14 Thread Vladimir Lipskiy
> Is it as simple as checking whether the OS is Windows, and setting %options > to contain appropriate paths, e.g. It's no use while checking if the OS is Windows, 'cause the distribution is intended for only Win 32 users. So you should predefine the hash below. > %options = ( buildprefix => '',

Re: Packfile stuff

2003-08-14 Thread Leopold Toetsch
Nicholas Clark <[EMAIL PROTECTED]> wrote: > On Tue, Aug 05, 2003 at 11:48:25PM +0200, Leopold Toetsch wrote: >> All packfile.c based utilities are fine, as disassemble.c is[1]. >> F has a --disassemble option too. These tools are ok. Only the >> handrolled (sorry) perl stuff isn't working. If some

Re: pirate guide

2003-08-14 Thread K Stol
- Original Message - From: "Adriano R. Ferreira" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, August 06, 2003 6:49 PM Subject: Re: pirate guide > > Isn't 'pirate' the name of the Lua compiler for Parrot (by Klaas-Jan Stol)? > Actually it is :-). At the time that the threa

Re: [CVS ci] bitwise string vtables; ands, ors opcodes

2003-08-14 Thread Vladimir Lipskiy
> I have checked in some functionality for string bitwise ops. > - vtable > - B, B opcodes > - string_bitwise_{or,and} functions in string.c > - minimal tests > > Missing: > - B ops > - support for perl scalar PMCs > > I'd be glad if someone wants to continue that stuff. The patch below implements

pmc.c ([constant_]pmc_new_noinit)

2003-08-14 Thread Benjamin Goldberg
In pmc_new_noinit, I see a switch() which decides whether or not to do add_pmc_ext. Why not have that information (whether or not an ext is needed) defined in each of the .pmc files, and stuck in the vtable? That would allow other cache-only pmcs to avoid getting an unnecessary chunk of bytes al

perlnum.pmc

2003-08-14 Thread Benjamin Goldberg
Shouldn't the get_number() method use string_from_num, instead of calling sprintf/snprintf? -- $a=24;split//,240513;s/\B/ => /for@@=qw(ac ab bc ba cb ca );{push(@b,$a),($a-=6)^=1 for 2..$a/6x--$|;print "[EMAIL PROTECTED] ]\n";((6<=($a-=6))?$a+=$_[$a%6]-$a%6:($a=pop @b))&&redo;}

Re: calling conventions, variable-length parameter lists

2003-08-14 Thread Leopold Toetsch
Luke Palmer <[EMAIL PROTECTED]> wrote: > Sure that will be possible. You put the first 11 args in P5-P15, and > the rest in P4. s/P4/P3/g > Luke leo

#define name collisions -- yet another small project

2003-08-14 Thread Dan Sugalski
Well, it turns out that at least some compilers (AIX's) are really unhappy about redefined #defines in the C source. This turns out to be a problem with things like HAS_STDLIB_H, which is common enough to cause collisions. So, we need to go name-prefix all the #defines. So, the project. Someone

Re: [CVS ci] bitwise string vtables; ands, ors opcodes

2003-08-14 Thread Vladimir Lipskiy
> At 1:35 AM +0300 8/8/03, Vladimir Lipskiy wrote: > > > What in $DEITY's name is *that*? It sure isn't a context diff. > >> A context diff is what you get from "diff -u" or "diff -c". YAY! Thanks Chip for you caustic remark -- it made me to know about how to get a context diff with WinCVS. Da

Re: calling conventions, variable-length parameter lists

2003-08-14 Thread Luke Palmer
> I want to be able to have a function with > this kind of signature: > > func ($param1, *$otherparams) Uh. What kind of signature? What does that mean? If it's Perl 6, sub ($param1, *$otherparams) Is nothing special: it takes two parameters. Did you mean sub ($param1, [EMAIL PROT

pcc_return problem

2003-08-14 Thread TOGoS
I'm not sure if this is a bug in IMCC or not, but I don't see the use of it, and it's causing my program to segfault. If I have more than one .pcc_begin_return .return x .return y etc .pcc_end_return block in a single compilation unit, every block wants to return the return values o

Re: Further to: Resumable ops and exceptions

2003-08-14 Thread Leopold Toetsch
Jos Visser wrote: There are a number of ops that could fail. Examples are find_lex but also the various load and lookup ops. Options for handling failure are: I would therefore vote for a feature where I (as language designer) could indicate whether for instance a find_lex (but others too) fails s

Parrot 0.1.0 -- what's left?

2003-08-14 Thread Steve Fink
In light of the insane amount of work that's gone into Parrot recently, I'd say it's about time to cut another release. What else would people like to slip in? This is not a freeze announcement yet -- I want to know what people think of the state of things they're working on first. As for the vers

Re: parrot bug: continuations/multiple return

2003-08-14 Thread Leopold Toetsch
Michal Wallace wrote: def f(x): if x: return 1 else: return 0 print f(1), f(0) Nice coincidence. S. Togos' bug report too. Anyway, its already fixed. leo

Re: set vs. assign, continued: 'add' vs. 'add!'

2003-08-14 Thread Leopold Toetsch
Togos <[EMAIL PROTECTED]> wrote: [ add semantics ] > ... Adding something to a PythonInt > would return a PythonInt, while adding to a PerlInt > would return a PerlInt. That's anway the way these oopcode work: add PDest, PSsrc, PVal PSrc->vtable->add ... do add according to type, then

Re: #define name collisions -- yet another small project

2003-08-14 Thread Benjamin Goldberg
Dan Sugalski wrote: > > Well, it turns out that at least some compilers (AIX's) are really > unhappy about redefined #defines in the C source. This turns out to > be a problem with things like HAS_STDLIB_H, which is common enough to > cause collisions. So, we need to go name-prefix all the #defi

bug: two segfaults

2003-08-14 Thread Michal Wallace
The following code segfaults immediately. If you uncomment the second line (print "") it works. However, if you then uncomment the #non_prototyped keyword in _depth1, it segfaults immediately again. When I say it segfaults immediately, I mean that the initial 0 is not printed. (Should I be rep

Re: packfile and EXEC

2003-08-14 Thread Leopold Toetsch
Daniel Grunblatt <[EMAIL PROTECTED]> wrote: > Just checked in a patch that should solve it, but it's temporary since it's > overwriting something somewhere :), I'll track it down. Works for me. > Daniel. leo

Re: parrot bug: continuations/multiple return

2003-08-14 Thread Leopold Toetsch
Piers Cawley <[EMAIL PROTECTED]> wrote: > Leopold Toetsch <[EMAIL PROTECTED]> writes: >> As calling conventions clearly state, that the caller has to save >> everything, its probably up to imcc/pcc.c to insert above >> statements, if another sub gets called from a sub. I'll fix that in >> a minute

Re: set_pmc vs clone?

2003-08-14 Thread Leopold Toetsch
Benjamin Goldberg <[EMAIL PROTECTED]> wrote: > What's the difference between VTABLE_set_pmc and VTABLE_clone? shallow vs deep copy? leo

Re: parrot bug: continuations/multiple return

2003-08-14 Thread Michal Wallace
On Sun, 10 Aug 2003, Leopold Toetsch wrote: > Piers Cawley <[EMAIL PROTECTED]> wrote: > > Leopold Toetsch <[EMAIL PROTECTED]> writes: > >> As calling conventions clearly state, that the caller has to save > >> everything, its probably up to imcc/pcc.c to insert above > >> statements, if another su

[CVS ci] MIPS JIT

2003-08-14 Thread Daniel Grunblatt
I've checked in what I did last year to make the JIT work on MIPS, it's not finished but IMHO it's a good start, so if anyone wants to continue or gimme an account in one (which I don't have anymore) I would be glad. Daniel.

Re: configure.pl failed under cygwin, build failed on win32

2003-08-14 Thread K Stol
- Original Message - From: "Jonathan Worthington" <[EMAIL PROTECTED]> To: "K Stol" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Sunday, August 10, 2003 6:08 AM Subject: Re: configure.pl failed under cygwin, build failed on win32 > Hi, > > > I just picked up a fresh copy with cvs. > > U

Re: [PATCH] Win32 compilation fix

2003-08-14 Thread Vladimir Lipskiy
> Puts #ifdefs as per the rest of i386/jit_emit.h. Good land! How did he compute that? It works!!!

This Week's Summary

2003-08-14 Thread Piers Cawley
Perl 6 Summary for the week ending 20030810 Another week, another summary. How predictable is that? In keeping with the predictability, we'll start with the internals list. Set vs. Assign "T.O.G of Spookware" has an issue with the way IMCC treats "="; sometimes an "=" means "set

[PATCH] Win32 env.pmc fixes

2003-08-14 Thread Mattia Barbon
Hello, the correct fix is probably having different code paths for Win32 (because on Windows NT/2000/XP/.Net and funnier names of the future environment is/will be Unicode, not char*). For now this makes env.t pass on Win32. Regards Mattia parrot.cvs.diff Description: Binary data

[PATCH] Win32 compilation fix

2003-08-14 Thread Mattia Barbon
Puts #ifdefs as per the rest of i386/jit_emit.h. Regards Mattia Index: jit/i386/jit_emit.h === RCS file: /cvs/public/parrot/jit/i386/jit_emit.h,v retrieving revision 1.79 diff -u -2 -r1.79 jit_emit.h --- jit/i386/jit_emit.h

Re: parrot bug: continuations/multiple return

2003-08-14 Thread Leopold Toetsch
Benjamin Goldberg <[EMAIL PROTECTED]> wrote: > This is where .macro comes in handy :) >.macro lexical(name_in_pad, register_name) > local .register_name > find_lex .register_name, .name_in_pad >.endm Macros are currently enabled for PASM mode only. But there is no special rea

RE: #define name collisions -- yet another small project

2003-08-14 Thread Brent Dax
Vladimir Lipskiy: # Plus I forgot to mention of specific cc flags like -DHAS_JIT, - # D$jitcpuarch, # -DHAVE_COMPUTED_GOTO, -DGC_IS_MALLOC which we set up # in jit.pl, cgoto.pl, gc.pl respectively. I think the flags could settle in # feature.h and also get the PARROT_ prefix. Ain't' these features,

Re: IMCC hangs

2003-08-14 Thread Vladimir Lipskiy
> Seems to be related with the multiple freeing reported by Michael. I thought his name was Michal (:>8

Re: [perl #23252] [PATCH] IO seek/tell refactoring

2003-08-14 Thread Leopold Toetsch
Vladimir Lipskiy <[EMAIL PROTECTED]> wrote: > Bi-bi (~8 .. In itself io_15.pasm is okay. The problem(?) was > that there wasn't close FOO before openning the same file > for writing which the FOO file handle pointed to. The > attachment fixes it. Thanks, applied. leo

Re: parrot, win32, stand-alone distribution, separate Parrot maillist

2003-08-14 Thread Piers Cawley
Dan Sugalski <[EMAIL PROTECTED]> writes: > At 8:48 PM +0200 8/4/03, Valery A.Khamenya wrote: >>Hi All, >> >> are there any info on getting ready-to-try >> Parrot for win32 as stand-alone distribution? > > Not that I know of. If someone's got a working build and can put > together a tarball or

help raise hell

2003-08-14 Thread Michal Wallace
Here is how I usually trigger a generic exception in python: >>> raise hell Traceback (most recent call last): File "", line 1, in ? NameError: name 'hell' is not defined Unfortunately, I can't seem to trap that in parrot, because a find_lex failure isn't an exception. Or am I

Re: [perl #23252] [PATCH] IO seek/tell refactoring

2003-08-14 Thread Juergen Boemmels
Index: config/gen/makefiles/root.in === RCS file: /cvs/public/parrot/config/gen/makefiles/root.in,v retrieving revision 1.104 diff -u -r1.104 root.in --- config/gen/makefiles/root.in 12 Aug 2003 07:57:33 - 1.104 +++ config/gen/make

RE: help raise hell

2003-08-14 Thread Joseph F. Ryan
> -Original Message- > Date: Mon 08/11/03 3:30 AM > From: Michal Wallace <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > CC: > Subject: help raise hell > > > > Here is how I usually trigger a generic exception > in python: > > >>> raise hell > Traceback (most recent call last)

Re: pirate status / need help with instances

2003-08-14 Thread Michal Wallace
On Tue, 12 Aug 2003, Michal Wallace wrote: > I wound up getting a couple C books today. I'm > trying to see what I can do about wrapping > PyObject as a PMC... What's the secret to making parrot recognize a new PMC? I've got my .pmc file but I'm not sure what to do next. The article about making

Re: parrot bug: continuations/multiple return

2003-08-14 Thread Leopold Toetsch
Michal Wallace <[EMAIL PROTECTED]> wrote: > On Sun, 10 Aug 2003, Leopold Toetsch wrote: >> Piers Cawley <[EMAIL PROTECTED]> wrote: >> > If and only if that's not a tail call of course. >> >> Good point. But I can imagine, that's by far more simple to detect tail >> calls at the AST level > Well,

Re: XGameStation

2003-08-14 Thread Michael G Schwern
On Mon, Aug 11, 2003 at 01:45:35AM -0700, Ask Bjoern Hansen wrote: > We totally need to have Parrot running on this thing when it comes > out. :-) > > http://www.xgamestation.com/ Great idea, shame the hardware is crap. :( "Third-generation Motorola 68HCS12 16-bit processor @ 25 MHz. Graphic

Re: pirate status / need help with instances

2003-08-14 Thread Leopold Toetsch
Michal Wallace <[EMAIL PROTECTED]> wrote: >class Clown: >pass > I have a lexical variable "Clown" pointing at > a parrotclass pmc. > However, when I go to instantiate Clown, I do > this: First parrot objects aren't that finished, that you can instantiate an object... >bozo = Cl

Re: This Week's Summary

2003-08-14 Thread Piers Cawley
Matt Fowles <[EMAIL PROTECTED]> writes: > Piers Cawley wrote: >> I want a Ponie! >> I promise that, as development of Ponie (the port of Perl 5 to Parrot) >> accelerates you'll see a summary of Ponie activity in this summary as >> well. However, almost all the traffic on the [EMAIL PRO

Approaching m4

2003-08-14 Thread Bernhard Schmalhofer
Hi, I have started an implementation of m4 in PIR. See http://www.gnu.org/software/m4/m4.html. Initially I wanted to tackle Ruby or QCL, http://tph.tuwien.ac.at/~oemer/qcl.html. But I found those too intimidating. The goal is to make a lot of tests work, and eventually getting a drop in repla

packfile and EXEC

2003-08-14 Thread Leopold Toetsch
I started extending the packfile functions towards multiple code segments. First is still some cleanup, but I already have troubles with the EXEC stuff :-( $ parrot -o mops.pbc mops.pasm $ parrot -j mops.pbc 782.604453 M op/s $ parrot -o mops.o mops.pbc $ make exec EXEC=mops exec_start.c cc -o m

Re: Packfile stuff

2003-08-14 Thread Benjamin Goldberg
Luke Palmer wrote: > > Leopold Toetsch writes: > > Juergen Boemmels <[EMAIL PROTECTED]> wrote: > > > what still fails is pbc2c.pl (This needs Parrot::Packfile, which can > > > only read format 0 (old assemble.pl) bytecodes). > > > > This is obsoleted by Daniel's exec patches. > > Sadly. I mean

[CVS ci] EXEC ARM

2003-08-14 Thread Daniel Grunblatt
Now EXEC works for ARM (linux) too.

Re: call and return conventions

2003-08-14 Thread Luke Palmer
TOGoS writes: > I0 Prototyped return? > I1 Number of overflow return values > I2 Number of return values in PMC registers > P3 Overflow return values in an array PMC > > so as to make call/return symmetrical > (this would also allow me to use the same > Params class in my compiler for both > c

Re: packfile and EXEC

2003-08-14 Thread Daniel Grunblatt
On Wednesday 13 August 2003 12:28, Daniel Grunblatt wrote: > On Wednesday 13 August 2003 05:07, Leopold Toetsch wrote: > > I started extending the packfile functions towards multiple code > > segments. First is still some cleanup, but I already have troubles with > > the EXEC stuff :-( > > I could

RE: set vs. assign, continued: 'add' vs. 'add!'

2003-08-14 Thread Brent Dax
TOGoS: # syntax. As it is, the add(ints) op and the # add(pmcs) ops do very different things (one # has 'set' while the other has 'assign' semantics), # but they look exactly the same. If not at I think that's mostly because there's no difference between set semantics and assign semantics for ints

Re: Parrot 0.1.0 -- what's left?

2003-08-14 Thread Leopold Toetsch
Steve Fink <[EMAIL PROTECTED]> wrote: > I want to know what people think of the state of things they're > working on first. PCC is still missing the return convention stuff (and unifying call and return convention) PackFile is in flux, but this need a lot more anyway. > As for the version number

nmake fails

2003-08-14 Thread Vladimir Lipskiy
D:\build\parrot>nmake [snip] Microsoft (R) Library Manager Version 6.00.8168 Copyright (C) Microsoft Corp 1992-1998. All rights reserved. rem blib/lib/libparrot_s.lib link -out:parrot.exe -nologo -nodefaultlib -debug -pdb:none-machine: x86 test_main.obj blib/lib/libparrot_s.lib

Re: [perl #23252] [PATCH] IO seek/tell refactoring

2003-08-14 Thread Vladimir Lipskiy
> This is a missing implementation of fdopen on windows. > Its not clear to me how this call should behave. PIO_win32_fdopen > takes a Parrot_WIN32_Handle which is actually a void*. To my mind the imlementation is fine. > Using the numbers 0,1,2 in this call does not seem right > here. Especially

find_lex/exception_handling; am I missing something?

2003-08-14 Thread Jos Visser
Hi, The long story short: * EXCEPTION_LEX_NOT_FOUND is not picked up correctly from the include file * The return continuation of the exception does not save registers, since $P1 (mapped to P16 by imcc) is messed up by $P2 (also mapped to P16). * I would really like the name of the missing le

Re: serializing functions?

2003-08-14 Thread Leopold Toetsch
Michal Wallace <[EMAIL PROTECTED]> wrote: > Could you serialize a parrot function? > In other words, if you interactively define a > function at the prompt, could you save it to > disk? (not the source code, the actual binary > representation of the function?) Yes. Its almost done. It needs some

RE: set vs. assign, continued: 'add' vs. 'add!'

2003-08-14 Thread TOGoS
--- Brent Dax <[EMAIL PROTECTED]> wrote: > TOGoS: > # When I say in IMCC: > # > # $P0 = $P1 + $P2 > # > # , I expect it to create a new value and store it > in > # $P0, not give me a segfault because I didn't say > # > # $P0 = new # $P0 is supposed to be based > #

Parrot and STDOUT/STDERR

2003-08-14 Thread Arthur Bergman
Hi, In my efforts to embed parrot into perl I stumbled upon something mildly interesting but most likely terribly hard to track down problem. If I execute a miniperl (but linked into parrot and with it's own parrot interpreter) it works, but if the caller closes(STDERR) before invoking miniper

Re: set vs. assign, continued: 'add' vs. 'add!'

2003-08-14 Thread Gordon Henriksen
On Thursday, August 14, 2003, at 04:36 , TOGoS wrote: P1 = new PerlInt P1 <- P2 + P3 # When you see "<-" instead of "=", # You know that it's operating on # an existing value, not just # altering the contents of # registers, as yo

Re: set vs. assign, continued: 'add' vs. 'add!'

2003-08-14 Thread Leopold Toetsch
Togos <[EMAIL PROTECTED]> wrote: > add(out PMC, in PMC, in PMC) > add!(in PMC, in PMC, in PMC) While that is all fine and useful, we would need that for e.g. keyed set and get too (store/get a reference or value). So that would lead to effectively almost doubling our opcode count. This can l

interpreter globals (was: QUERIES: ...)

2003-08-14 Thread Leopold Toetsch
Dan Sugalski <[EMAIL PROTECTED]> wrote: > At 11:06 AM +0200 8/8/03, Leopold Toetsch wrote: >>This is an unordered list of issues - mainly design questions - about >>the specific implementation of some parts. >> >>Interpreter globals >>--- >> >>We have real globals (e.g. Parrot_base_

[CVS ci] PackFIle stuff

2003-08-14 Thread Leopold Toetsch
Here is s short overview of the current packfile changes til now (PackFile-6). - struct PackFile is now a PackFile_Directory holding BYTECODE, CONSTANT, FIXUP and some other segments - directories can have subdirectories which can be e.g. loaded packfiles - ... which is done by the C opcode - the

why new_pad *INT*?

2003-08-14 Thread Michal Wallace
Hey all, I'm just starting to get into using pads, and I'm not sure I understand new_pad. Specifically, why does it take an int? It seems to me, that 9 times out of 10, you're going to want to create a new pad at the next lower depth than the one before. So, two questions: 1. Should there b

Re: [perl #23252] [PATCH] IO seek/tell refactoring

2003-08-14 Thread Juergen Boemmels
Index: io.ops === RCS file: /cvs/public/parrot/io.ops,v retrieving revision 1.31 diff -u -r1.31 io.ops --- io.ops 9 Aug 2003 07:22:20 - 1.31 +++ io.ops 11 Aug 2003 12:32:00 - @@ -422,7 +422,7 @@ 64bit tell: Get the current

Re: calling conventions, variable-length parameter lists

2003-08-14 Thread TOGoS
Luke said: > > sub ($param1, [EMAIL PROTECTED]) > > In which case, if it's prototyped, we stuff > everything besides the > first parameter into a PMC representing > @otherparams. > > And if you meant something else, can't help ya. > > Luke Maybe I misunderstand what 'prototyped' means. I as

Re: calling conventions, variable-length parameter lists

2003-08-14 Thread TOGoS
> > Unprototyped :-) I guess I didn't make that quite > > clear, enough. > > Setup a param array, that's all. > > leo Umm... OK. Here's what I've done: I created 2 functions that I can use when dealing with variable-length parameter lists. One to turn an array into pcc-compliant parameters, and on

Re: Approaching m4

2003-08-14 Thread Sean O'Rourke
Bernhard Schmalhofer <[EMAIL PROTECTED]> writes: > I have started an implementation of m4 in PIR. The implications are staggering... Sure, plenty of compilers can bootstrap themselves, but how many can generate their own configure scripts via autoconf? With p4rrot, we may live to see this dream.

Re: Packfile stuff

2003-08-14 Thread Luke Palmer
Leopold Toetsch writes: > Juergen Boemmels <[EMAIL PROTECTED]> wrote: > > what still fails is pbc2c.pl (This needs Parrot::Packfile, which can > > only read format 0 (old assemble.pl) bytecodes). > > This is obsoleted by Daniel's exec patches. Sadly. I mean, the exec patches are great, but I fou

RE: pirate status / need help with instances

2003-08-14 Thread Brent Dax
Sean O'Rourke: # >* make parrotclass handle "invoke" # > this strikes me as the most efficient, # > but I'm not really confident with C # > so I'm hesitant to try it # # This seems to me like the way to go, except you might # subclass parrotclass to pythonclass (since this lack-

Re: IMCC hangs

2003-08-14 Thread Michal Wallace
On Sun, 10 Aug 2003, Vladimir Lipskiy wrote: > > Seems to be related with the multiple freeing reported by Michael. > > I thought his name was Michal (:>8 yes, I was born without an e. :) Sincerely, Michal J Wallace Sabren Enterprises, Inc. - contact: [EMAI

RE: assign opcodes

2003-08-14 Thread Brent Dax
TOGoS: # Personally, I would like "=" to mean 'set', and # maybe "<-" do 'assign'. I usually think of registers as variables with fixed names, so the Perl 6 part of my brain suggests: $P0 = $P1 #assign $P0 := $P1 #set --Brent Dax <[EMAIL PROTECTED]> Perl and Parrot hac

Re: pirate status / need help with instances

2003-08-14 Thread Juergen Boemmels
"K Stol" <[EMAIL PROTECTED]> writes: > > What's the secret to making parrot recognize > > a new PMC? I've got my .pmc file but I'm > > not sure what to do next. The article about > > making PMC's on perl.com is WAY out of date. > > > > 1. create your PMC class, add it to the classes/ directory >

Re: [RfC] disable unused vtable entries

2003-08-14 Thread Leopold Toetsch
Dan Sugalski wrote: Got Warnocked, I think. I'm partway through partitioning the vtable up to make overriding vtables on a per-PMC basis less expensive. I'm pretty sure that most of the keyed variants will end up being used, but we may end up pruning a bunch of these out. The _keyed math, logic

Re: pirate status / need help with instances

2003-08-14 Thread Michal Wallace
On Tue, 12 Aug 2003, Leopold Toetsch wrote: > > ... So I'm trying to decide between two > > approaches: > > 3) wait until classes and objects are done ;-) 4) simulate an object system with closures :) I wound up getting a couple C books today. I'm trying to see what I can do about wrapping PyO

Re: Packfile stuff

2003-08-14 Thread Simon Glover
On Tue, 12 Aug 2003, Leopold Toetsch wrote: > Juergen Boemmels <[EMAIL PROTECTED]> wrote: > > > what still fails is pbc2c.pl (This needs Parrot::Packfile, which can > > only read format 0 (old assemble.pl) bytecodes). > > This is obsoleted by Daniel's exec patches. Don't we need to keep this fo

Re: pirate status / need help with instances

2003-08-14 Thread K Stol
- Original Message - From: "Sean O'Rourke" <[EMAIL PROTECTED]> To: "Michal Wallace" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, August 11, 2003 6:43 AM Subject: Re: pirate status / need help with instances > Michal Wallace <[EMAIL PROTECTED]> writes: > > Py-pirate can now h

Re: okay to use iterator?

2003-08-14 Thread Leopold Toetsch
Michal Wallace <[EMAIL PROTECTED]> wrote: > perlhash.pod says: > """ > TODO: Steve Fink sayd: > And if there were a keys() method, then 'defined' and 'exists' are > very different. (And there ought to be, and would be if we weren't > all ignoring Leo's iterator proposal.) > I need to read

Re: #define name collisions -- yet another small project

2003-08-14 Thread Vladimir Lipskiy
I wrote: > >While configuring we generate 3 header files: config.h, has_header.h, > >feature.h. Plus I forgot to mention of specific cc flags like -DHAS_JIT, -D$jitcpuarch, -DHAVE_COMPUTED_GOTO, -DGC_IS_MALLOC which we set up in jit.pl, cgoto.pl, gc.pl respectively. I think the flags could settle

[perl #23292] [PATCH] Update for memory_internals.pod

2003-08-14 Thread Jürgen
# New Ticket Created by Jürgen Bömmels # Please include the string: [perl #23292] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt2/Ticket/Display.html?id=23292 > Hello, It took me some minutes to find out how ARENA_DOD_FLAGS work. I added a sectio

RE: set vs. assign, continued: 'add' vs. 'add!'

2003-08-14 Thread TOGoS
> that's mostly because there's no difference > between set > semantics and assign semantics for ints. You can > think of them as both > having assign semantics, if you like. Works better to think of only 'set' semantics. I think of it like this, and it makes things work out very nicely: Think o

Re: calling conventions, variable-length parameter lists

2003-08-14 Thread TOGoS
--- TOGoS <[EMAIL PROTECTED]> wrote: > > Leopold Toetsch wrote: > > TOGoS wrote: > Unprototyped :-) I guess I didn't make that > quite clear, enough. > >>> > >>> Setup a param array, that's all. > >>> > >>> leo > >> Umm... OK. Here's what I've done: I created 2 > >> functions that I ca

Re: This Week's Summary

2003-08-14 Thread Juergen Boemmels
Piers Cawley <[EMAIL PROTECTED]> writes: > Why "new_pad *INT*"? > Michal Wallace asked for some clarification about "new_pad", the opcode > that creates a new lexical scratchpad. He thought that, 9 times out of > 10 you would want to create a new pad at the next lower depth from the

Re: why ~ for xor?

2003-08-14 Thread Leopold Toetsch
Michal Wallace <[EMAIL PROTECTED]> wrote: > Out of curiosity, why does ~ map to both > unary bitwise-not and binary bitwise-xor > in imcc? > I was expecting xor to be ^ and ^^ Perl6ism at some time IIRC. I stopped following the various operator threat^Hds in p6l. But if they are fixed, we should

Re: call and return conventions

2003-08-14 Thread TOGoS
--- Luke Palmer <[EMAIL PROTECTED]> wrote: > TOGoS writes: > > I0 Prototyped return? > > I1 Number of overflow return values > > I2 Number of return values in PMC registers > > P3 Overflow return values in an array PMC > > > > so as to make call/return symmetrical > > (this would also allow me

[perl #23297] Numbers in IMCC POD

2003-08-14 Thread via RT
# New Ticket Created by Andy Bussey # Please include the string: [perl #23297] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt2/Ticket/Display.html?id=23297 > There appears to be a problem whereby numbers that include decimal points inside IMCC POD

Re: This Week's Summary

2003-08-14 Thread Piers Cawley
Simon Glover <[EMAIL PROTECTED]> writes: > On Mon, 11 Aug 2003, Piers Cawley wrote: > >> Matt Fowles <[EMAIL PROTECTED]> writes: >> >> > Piers Cawley wrote: >> >> I want a Ponie! >> >> I promise that, as development of Ponie (the port of Perl 5 to Parrot) >> >> accelerates you'll see a summ

Re: [perl #23276] Prefixing #define names

2003-08-14 Thread Benjamin Goldberg
Michael G Schwern wrote: > > On Mon, Aug 11, 2003 at 01:45:35AM -0700, Ask Bjoern Hansen wrote: > > We totally need to have Parrot running on this thing when it comes > > out. :-) > > > > http://www.xgamestation.com/ > > Great idea, shame the hardware is crap. :( > > "Third-generation Motorol

Re: [perl #23252] [PATCH] IO seek/tell refactoring

2003-08-14 Thread Vladimir Lipskiy
>This only happens on Windows. On Linux i can build pdb and step >through the pasm code. This smells like makefile problems. Can you try >the attached patch? WORKS! I'm out of English words; I just run mandel.pbc in pdb and it printed out such a cool Mandel bug or whatever(or maybe even Leon Broca

Re: calling conventions, variable-length parameter lists

2003-08-14 Thread Michal Wallace
On Fri, 8 Aug 2003, TOGoS wrote: > Unprototyped :-) I guess I didn't make that quite > clear, enough. Nah, you did. I just didn't think about it... :) I think I see the problem now. > maybe this kind of unprototyped function is expected > to be uncommon enough that we can put up with having

Re: This Week's Summary

2003-08-14 Thread Simon Glover
On Mon, 11 Aug 2003, Piers Cawley wrote: > Matt Fowles <[EMAIL PROTECTED]> writes: > > > Piers Cawley wrote: > >> I want a Ponie! > >> I promise that, as development of Ponie (the port of Perl 5 to Parrot) > >> accelerates you'll see a summary of Ponie activity in this summary as > >>

[perl #23299] Dynamic type handling in IMCC

2003-08-14 Thread via RT
# New Ticket Created by Kenneth Graves # Please include the string: [perl #23299] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt2/Ticket/Display.html?id=23299 > .sub __main $S0 = "PerlInt" find_type $I0, $S0 new $P0, $I0 $P0 = 42 print $P0 print "

Re: This Week's Summary

2003-08-14 Thread Piers Cawley
Dave Mitchell <[EMAIL PROTECTED]> writes: > On Mon, Aug 11, 2003 at 07:32:00PM -, Rafael Garcia-Suarez wrote: >> Will I really be forced to reimplement the whole subrecursive frobnizer >> for tied magic ?" > > Almost certainly, I expect. There's nothing to stop us *both* summarizing the parro

RE: set vs. assign, continued: 'add' vs. 'add!'

2003-08-14 Thread Brent Dax
TOGoS: # When I say in IMCC: # # $P0 = $P1 + $P2 # # , I expect it to create a new value and store it in # $P0, not give me a segfault because I didn't say # # $P0 = new # # first. Then your expectations are wrong. I think you may be losing sight of the fact that most users will *never*

Re: packfile and EXEC

2003-08-14 Thread Daniel Grunblatt
On Wednesday 13 August 2003 05:07, Leopold Toetsch wrote: > I started extending the packfile functions towards multiple code > segments. First is still some cleanup, but I already have troubles with > the EXEC stuff :-( I could not reproduce the error here. > The debugger doesn't really like this

Re: call and return conventions

2003-08-14 Thread Leopold Toetsch
Togos <[EMAIL PROTECTED]> wrote: > I0 Prototyped return? > I1 Number of overflow return values > I2 Number of return values in PMC registers > P3 Overflow return values in an array PMC > so as to make call/return symmetrical Makes a lot of sense. When the return is prototyped the current inf

Re: Approaching m4

2003-08-14 Thread Leon Brocard
Bernhard Schmalhofer sent the following bits through the ether: > Is there already a testing framework in PIR or PASM? For now I've just > tweaked the Makefile from bf. This looks excellent. First, may I be the first to say that I'm happy that BF is the inspiration for so many Parrot projects ;

Re: [perl #23276] Prefixing #define names

2003-08-14 Thread Leopold Toetsch
Vladimir Lipskiy <[EMAIL PROTECTED]> wrote: > This patch touches ten files and deals with > HAS_POSIX_MEMALIGN [ ... ] Thanks, applied. leo

Re: Packfile stuff

2003-08-14 Thread Leopold Toetsch
Luke Palmer <[EMAIL PROTECTED]> wrote: > Leopold Toetsch writes: >> This is obsoleted by Daniel's exec patches. > Sadly. I mean, the exec patches are great, but I found no faster way to > run parrot bytecode than to run it through pbc2c.pl and compile it with > gcc -O3. pbc2c.pl does unroll the

Re: io_win32.c warnings

2003-08-14 Thread Juergen Boemmels
"Vladimir Lipskiy" <[EMAIL PROTECTED]> writes: > The attached patch removes these warnings: > > io/io_win32.c(312) : warning C4028: formal parameter 4 different from > declaration > io/io_win32.c(312) : warning C4029: declared formal parameter list different > from definition > io/io_win32.c(358)

Re: [perl #23276] Prefixing #define names

2003-08-14 Thread Simon Glover
On Mon, 11 Aug 2003, Vladimir Lipskiy wrote: > > OK. I'm starting out a prefixing story and here is > CHAPTER I. The HAS_HEADER_ defines. > Thanks, applied. Simon

struct Parrot_Lexicals; ArrayHash

2003-08-14 Thread Leopold Toetsch
The current implementation of find_lex (by_name) is suboptimal. A linear scan over the list of lexical names is performed (s. sub.c:lexicals_get_position()). A better way would be to provide a list of lexicals plus a name hash, where hash values are indices into the list. As such a functionality

Re: Packfile stuff

2003-08-14 Thread Leopold Toetsch
Juergen Boemmels <[EMAIL PROTECTED]> wrote: > read S0 > compreg P1, "PASM1" > compile P0, P1, S0 > write P0 Done. $ cat pasm.pasm read S0, 100 compreg P1, "PASM" compile P0, P1, S0 write P0 end $ parrot pasm.pasm < pasm.pasm > pasm.pbc $ cat hello.pasm print "Hello

  1   2   3   >