small pasm Code that crashes Parrot

2002-05-23 Thread Jens Rieks
Hi Folks! I've attached a small pasm file that crashes Parrot. Seems to be a GC issue, it workes fine if "sweepoff" is added. Might be useful for debugging? cya, Jens Rieks # # small example that crashes parrot # set I1, 1 main: bsr print inc I1 le

Re: small pasm Code that crashes Parrot

2002-05-23 Thread Jens Rieks
> Theoretically this shouldn't be done, In practice you can't assume something like that (at least when using callee-save calling convention), or do I miss the point? > but I put in a patch to the GC to double check, just in case. Fine, tanks :) cya, Jens Rieks

crash problem with PerlInt

2002-05-24 Thread Jens Rieks
time until the bug occurs) An example is attached. cya, Jens Rieks # # create some globals # new P1, PerlInt set P1, 1 store_global "g1", P1 new P1, PerlInt set P1, 1 store_global "g2", P1

Tetris for Parrot

2002-05-26 Thread Jens Rieks
y not run unter Windows, maybe with ANSI.SYS or something like that (?). To play do the following: - unpack the attached tetris.tgz into your parrot-directory - cd into "tetris" - (../assemble tetris.pasm >tetris.pbc, but its also inside the tgz-file) - run perl ./tetris.pl

Re: Sketch of exceptions

2002-06-02 Thread Jens Rieks
I've written a small exception demo in C and tried to avoid macros as far as possible. > C code *may*, if it chooses, install a generic exception override, > and we'll have a routine for this. Something like: > > EXCEPTION_OVERRIDE(&exception_frame); > EXCEPTION_RELEASE(&exception_fra

Re: Portable way of finding libc, unbuffered reads

2003-06-20 Thread Jens Rieks
s = string_to_cstring(interpreter, ($2)); } p = Parrot_dlopen(s); With this hack, the following code will work: loadlib P1, "" dlfunc P0, P1, "system", "it" set I0, 1 set S5, "ls" invoke end cya, Jens Rieks

Re: Portable way of finding libc, unbuffered reads

2003-06-20 Thread Jens Rieks
put: Index: core.ops === RCS file: /cvs/public/parrot/core.ops,v retrieving revision 1.287 diff -r1.287 core.ops 4862c4862,4866 < const char * s = string_to_cstring(interpreter, ($2)); --- > const char * s = 0; > > if( $2->strlen != 0 ) { > s = string_to_cstring(interpreter, ($2)); > } cya, Jens Rieks

Re: Portable way of finding libc, unbuffered reads

2003-06-20 Thread Jens Rieks
can find > parrot's name (imcc.exe, parrot.exe, etc...) and pass *that* to loadlib it > should work fine. Maybe. More testing required. No, just use GetModuleHandle(0) instead of LoadLibraray if NULL is passed. > Thanks! No problem, thank you for your work! cya, Jens Rieks

Re: Alignment Issues with *ManagedStruct?

2004-02-05 Thread Jens Rieks
Am Donnerstag, 5. Februar 2004 09:45 schrieb Leopold Toetsch: > Uri Guttman <[EMAIL PROTECTED]> wrote: > > printf( "%d event.type\n", (char *)&kbevent.type ) - (char *)&kbevent ; > > offsetof(struct, item) > > is used inside parrot/jit/* > > > want me to hack up this little script and c gener

PIR version of Data::Dumper

2004-02-05 Thread Jens Rieks
subindent = "" concat subindent, indent print "PerlHash {" new iter, .Iterator, hash set iter, 0 unless iter, iter_end iter_loop: print "\n" shift key, iter set val, hash[key] _do_dumper_named( key, val, subi

Re: PIR version of Data::Dumper

2004-02-05 Thread Jens Rieks
Am Donnerstag, 5. Februar 2004 14:35 schrieb Leopold Toetsch: > Jens Rieks <[EMAIL PROTECTED]> wrote: > > Here is a first version of a "Data::Dumper" i've written to be able to > > dump the AST of my C parser. > > Wow, fine. > > > A dumpertes

Re: PIR version of Data::Dumper

2004-02-05 Thread Jens Rieks
Am Donnerstag, 5. Februar 2004 16:25 schrieb Jens Rieks: > Am Donnerstag, 5. Februar 2004 14:35 schrieb Leopold Toetsch: > > Jens Rieks <[EMAIL PROTECTED]> wrote: > > > Here is a first version of a "Data::Dumper" i've written to be able to > > >

[NEW] library/sort.imc

2004-02-11 Thread Jens Rieks
f v > 0 goto SKIP DO: minval = tmp minpos = i SKIP: inc i if i < size goto LOOP if start > minpos goto SKIP2 tmp = array[start] array[start] = minval array[minpos] = tmp SKIP2: inc start branch REDO END: .pcc_begin_return .pcc_end_return .end =b

Re: [NEW] library/sort.imc

2004-02-11 Thread Jens Rieks
Am Mittwoch, 11. Februar 2004 13:11 schrieb Jens Rieks: > Here is a PIR implementation of a simple _sort() function. > A test is attached to my the next mail. Here is "sort.t", where should it go? jens #! perl -w use strict; use Parrot::Test tests => 6; output_is(<<

[NEW] library/dumper.imc - latest version

2004-02-11 Thread Jens Rieks
ing indent print val .pcc_begin_return .pcc_end_return .end # # Dumps a PerlUndef pmc # .sub _dump_PerlUndef .param pmc val .param string indent print "undef" .pcc_begin_return .pcc_end_return .end # # Dumps a Sub pmc # .sub _dump_Sub .param pmc val .param string indent print "sub { ... }" .pcc_begin_return .pcc_end_return .end =head1 AUTHOR Jens Rieks Eparrot at jensbeimsurfen dot deE is the author and maintainer. Please send patches and suggestions to the Perl 6 Internals mailing list. =head1 COPYRIGHT Copyright (c) 2004, the Perl Foundation. =cut

Re: [NEW] library/dumper.imc - latest version

2004-02-11 Thread Jens Rieks
Am Mittwoch, 11. Februar 2004 13:38 schrieb Jens Rieks: > Here is the latest version of the _dumper() function. > A test file is attached to my the next mail. Here is it :-) Again: I have no idea in what directory it should go. > Changes: > - PerlHash keys are now sorted > (It ma

Re: cvs commit: parrot/imcc/t/syn file.t

2004-02-12 Thread Jens Rieks
Am Donnerstag, 12. Februar 2004 08:18 schrieb Leopold Toetsch: [snip] > eval { local $ENV{LANG} = 'en'; }; [snip] The test has to be located inside the eval, this construct has no effect. Might it be better to set LANG to 'C', instead of 'en'? 'en' in not installed on my system, but 'C' is in eng

[PATCH] library/sdl_types.imc

2004-02-12 Thread Jens Rieks
Hi chromatic, here is a small pach for _SDL_loop that fixes a crashes that occurs if you press a key that has no entry in the key_events hash. jens diff -u -w -r1.5 sdl_types.imc --- library/sdl_types.imc 10 Feb 2004 19:31:49 - 1.5 +++ library/sdl_types.imc 12 Feb 2004 13:22:21 - @@ -409

[PATCH] library/sdl_constants.imc

2004-02-12 Thread Jens Rieks
Hi again, here is a patch that adds all SDLK_ values. The values are added to "sdl_keysyms", which is just an alias at the moment. The constants hash is know also stored as a global and is created only once. jens diff -u -w -r1.1 sdl_constants.imc --- library/sdl_constants.imc 10 Feb 2004 04:

[PATCH] library/sdl_types.imc #2

2004-02-13 Thread Jens Rieks
Hi, This patch fixes _SDL_WaitEvent a bit; SDL_WaitEvent returns an integer and not a SDL_Event. It also introduces _SDL_PollEvent which is mostly a copy of _SDL_WaitEvent. Finally, _SDL_loop is modified to allow an "idle" event entry that gets called if no events are pending. If such an event i

[NEW] library/sdl.imc

2004-02-13 Thread Jens Rieks
gin_return .return ret .pcc_end_return .end .sub _SDL_Quit .local pmc nci saveall nci = global "SDL::Quit" .pcc_begin prototyped .nci_call nci .pcc_end restoreall .pcc_begin_return .pcc_end_return .end =head1 AUTHOR Written and maintained by chromatic, Echromatic at wgz dot orgE, with help from Jens Rieks. Please send patches and suggestions to the Perl 6 Internals mailing list. =head1 COPYRIGHT Copyright (c) 2004, The Perl Foundation. =cut

[PATCH] library/sort.imc

2004-02-16 Thread Jens Rieks
Hi, The following patch adds parameter checking to _sort(). Wrong parameters are now reported (no exceptions are used yet). I've also added 3 more tests in t/pmc/sort.t (included in patchfile) jens Index: library/sort.imc === RCS fil

[PATCH] library/dumper.imc

2004-02-16 Thread Jens Rieks
Hi, The following patch adds parameter checking to _dumper(), as well as PMC property dumping. Wrong parameters are now reported (no exceptions are used yet). Tests are added to t/pmc/dumper.t, included in this patchfile. jens Index: t/pmc/dumper.t

[PATCH] library/dumper.imc: self-referential data structures

2004-02-17 Thread Jens Rieks
Hi all, again, here is a new patch for libraray/dumper.pmc. It implements: - support for self-referential data structures - support for PMC NULL values - print no comma after the last entry of a hash - 3 new tests covering the new functionality - some minor internal tweaks - initial support for Or

Re: [NEW] library/sdl.imc

2004-02-19 Thread Jens Rieks
Hi, Am Donnerstag, 19. Februar 2004 05:54 schrieb chromatic: > On Fri, 2004-02-13 at 09:57, Jens Rieks wrote: > > here is an easy to use (with PIR code) wrapper of the SDL library. > > It tries to hide all internals of the wrapper and makes the most > > important SDL functio

Re: [NEW] library/sdl.imc

2004-02-19 Thread Jens Rieks
Hi, Am Donnerstag, 19. Februar 2004 23:39 schrieb Leopold Toetsch: > Chromatic <[EMAIL PROTECTED]> wrote: > > Me too. There's supposed to be a magic initialization sub of some kind > > called on library load. I'm inclined to stick it in there, but it's not > > there yet. > > I'll have a look at

Re: [PATCH] library/sdl_types.imc #2

2004-02-19 Thread Jens Rieks
Hi, Am Donnerstag, 19. Februar 2004 05:45 schrieb chromatic: > On Fri, 2004-02-13 at 09:21, Jens Rieks wrote: > > This patch fixes _SDL_WaitEvent a bit; SDL_WaitEvent returns an integer > > and not a SDL_Event. > > It also introduces _SDL_PollEvent which is mostly a copy

Parrot Tetris with SDL bindings

2004-02-19 Thread Jens Rieks
Hi all, here is a first alpha version of my upcoming tetris example for parrot. It is a good demonstration that parrot is already very powerful. It uses a semi-object orientated style, I will modify it to use parrot objects as soon as they are working. Just unpack the attached tgz file into you

Tetris (was: Objects and time)

2004-02-23 Thread Jens Rieks
Hi, Am Montag, 23. Februar 2004 17:09 schrieb Leopold Toetsch: > WRT feature freeze: I'd say: Starting from Tue, 24th 8.00 GMT no more > feature patches *should* go in, *except* objects. can/should go the tetris example go in? I'am writing documentation at the moment. Converting the example to us

i386 JIT problem with set_i_n

2004-02-29 Thread Jens Rieks
Hi, the following test gives wrong results on i386/JIT. It looks like the set_i_n JIT op rounds the number, whereas the non JIT OP does not round the number. jens output_is(<<'CODE', <<'OUT', "set_i_n testing"); ##PIR## .sub _main .local num n .local int i n = 1.4 i = n prin

Re: Please no checkins

2004-02-29 Thread Jens Rieks
Hi leo, Am Sonntag, 29. Februar 2004 11:47 schrieb Leopold Toetsch: > I'm currently preparing 0.1.0, so please no changes to CVS until further > ntice. Here is the tetris example, include it if you want... > Thanks, > leo jens

Re: Please no checkins

2004-02-29 Thread Jens Rieks
tetris.tgz Description: application/tgz

Re: Tetris example (was: Please no checkins)

2004-03-02 Thread Jens Rieks
Hi, Am Dienstag, 2. März 2004 10:48 schrieb Leopold Toetsch: > Jens Rieks <[EMAIL PROTECTED]> wrote: > > Hi leo, > > > > Here is the tetris example, include it if you want... > > I've now tested it a bit. Looks really good and works - mostly :) > - it trie

Re: Tetris example

2004-03-02 Thread Jens Rieks
Hi, Am Dienstag, 2. März 2004 17:19 schrieb Dan Sugalski: > At 5:13 PM +0100 3/2/04, Leopold Toetsch wrote: > >>Parrot's object support is not yet good enough to be able to > >>convert the game to use ParrotObjects. > > > >What is missing? > > Constructors and destructors are my two big guesses he

subclassing bug

2004-03-02 Thread Jens Rieks
The following code results in a clone() not implemented in class 'ParrotClass' error: .sub _main .local pmc a .local pmc b .local pmc c newclass a, "A" subclass b, a, "B" subclass c, b, "C" end .end jens

Re: cvs commit: parrot parrotbug

2004-03-03 Thread Jens Rieks
On Wednesday 03 March 2004 20:03, Jerome Quelin wrote: > cvsuser     04/03/03 11:03:10 > >   Added:       .        parrotbug >   Log: >   Initial revision of parrotbug parrotbug is missing in MANIFEST which causes a make test error. http://tinderbox.perl.org/tinderbox/bdshowbuild.cgi?tree=parrot j

Re: [perl #27369] [PATCH] pretty-print for library/dumper.imc

2004-03-04 Thread Jens Rieks
On Thursday 04 March 2004 06:38, Will Coleda wrote: > When dumping a PMC type that isn't one dumper knows about, this small > patch changes it to print out a name in addition to the number, so we > get: > > (Honestly, I'd prefer just the name, but I presume the original author > wanted the number f

Re: [perl #27369] [PATCH] pretty-print for library/dumper.imc

2004-03-04 Thread Jens Rieks
On Thursday 04 March 2004 13:41, Bernhard Schmalhofer wrote: > Jens Rieks wrote: > > My next plan is to implement some optional parameters like a maximum > > recursion deep and an array of PMCs not to recursively dump, in order to > > ease the usesage with large data structur

[PATCH] library/dumper.imc t/pmc/dumper.t

2004-03-04 Thread Jens Rieks
Hi, this patch adds support for dumping of ParrotObjects. If an object "can __dump", this method is called on the object which then is responsible for dumping itself. A test that shows the new functionality in action is included. jens Index: library/dumper.imc

Re: [PATCH] library/dumper.imc t/pmc/dumper.t

2004-03-04 Thread Jens Rieks
Hi, On Thursday 04 March 2004 19:14, I wrote: > this patch adds support for dumping of ParrotObjects. > If an object "can __dump", this method is called on the object which then > is responsible for dumping itself. > A test that shows the new functionality in action is included. applied by Dan, th

MANIFEST problems (was: Re: cvs commit: parrot parrotbug)

2004-03-04 Thread Jens Rieks
Hi, On Thursday 04 March 2004 00:53, Robert Spier wrote: > > parrotbug is missing in MANIFEST which causes a make test error. Now lib/Parrot/Docs/HTMLPage.pm is missing in MANIFEST. > This kind of bug shouldn't happen if people actually read the messages > the cvs commit spits out. > > It will te

Re: [perl #27469] [PATCH] Use named constants in iterator.pod

2004-03-06 Thread Jens Rieks
Hi, On Saturday 06 March 2004 13:55, Bernhard Schmalhofer wrote: > # New Ticket Created by Bernhard Schmalhofer > # Please include the string: [perl #27469] > # in the subject line of all future correspondence about this issue. > # http://rt.perl.org:80/rt3/Ticket/Display.html?id=27469 > > > > H

Re: [perl #27504] find_method op problems

2004-03-08 Thread Jens Rieks
Hi, On Monday 08 March 2004 13:33, Ilya Martynov wrote: > # New Ticket Created by Ilya Martynov > # Please include the string: [perl #27504] > # in the subject line of all future correspondence about this issue. > # http://rt.perl.org:80/rt3/Ticket/Display.html?id=27504 > > > > > 1. find_method

Re: Parrot - testing

2004-03-08 Thread Jens Rieks
Hi, On Monday 08 March 2004 14:26, Morten Sickel wrote: > I don't know if it is of any interest, I just found HP-UX mentioned, but I > have just tested parrot 0.0.10 on HP-UX 10.20 / gcc 3.2 all tests passed > (I'll start testing 0.0.11 tomorrow) 0.1.0 is the latest version. Please look at the new

Re: [perl #27504] find_method op problems

2004-03-08 Thread Jens Rieks
Hi again, (small note for little jens: first read _everything_, then write an answer, then read it and send it afterwards...) > On Monday 08 March 2004 13:33, Ilya Martynov wrote: > > # New Ticket Created by Ilya Martynov > > # Please include the string: [perl #27504] > > # in the subject lin

Re: [perl #27504] find_method op problems

2004-03-08 Thread Jens Rieks
Hi, On Monday 08 March 2004 16:40, Leopold Toetsch wrote: > Jens Rieks <[EMAIL PROTECTED]> wrote: > >> $P0 = new Foo > > > > This is wrong. Use $P0 = new "Foo" instead. > > No. There isn't even such an opcode. Above code is fine and work

Re: cvs commit: parrot/src interpreter.c

2004-03-08 Thread Jens Rieks
Hi, On Tuesday 09 March 2004 04:24, Josh Wilmes wrote: > cvsuser 04/03/08 19:24:12 > > Modified:src interpreter.c > Log: > Missing function/data casts. > > Revision ChangesPath > 1.279 +3 -3 parrot/src/interpreter.c > > Index: interpreter.c > ==

Re: [CVS ci] trace output change

2004-03-09 Thread Jens Rieks
Hi, On Tuesday 09 March 2004 15:55, Leopold Toetsch wrote: > I've rearranged the output of parrot -t a bit. It should be more > readable now e.g.: > > 0 set P16, P1 - P16=NULL, P1=NULL > 3 set P17, P5 - P17=SArray=PMC(0x40304908), > P5=SArray=PMC(0x40304908) > 6 set I16

Re: [CVS ci] trace output change

2004-03-09 Thread Jens Rieks
Hi again, I just found another problem related to bytecode switching: *** switching to BYTECODE_library/Data/Dumper/Base.imc PC=-4501; OP= The first shown OP after a switch is always wrong. jens

[NEW] library/objecthacks.imc

2004-03-09 Thread Jens Rieks
t; concat tmp, method # find the sub errorsoff 1 find_global sub, tmp errorson 1 # check the type typeof I0, sub if I0 != .PerlUndef goto END ERROR: null sub if nonfatal goto END print " *\n * fatal error in __lookup_method: class '"

Re: [NEW] library/objecthacks.imc

2004-03-10 Thread Jens Rieks
Hi, On Tuesday 09 March 2004 21:17, Leopold Toetsch wrote: > Jens Rieks <[EMAIL PROTECTED]> wrote: > > The attached file has some helper functions to make object usage > > easier. It is used by the new object orientated Data::Dumper > > implementation as well as m

Re: [NEW] library/objecthacks.imc

2004-03-10 Thread Jens Rieks
Hi, On Wednesday 10 March 2004 12:54, Leopold Toetsch wrote: > Jens Rieks <[EMAIL PROTECTED]> wrote: > > ... It is usefull for constructor calling, to make sure that > > all base classes are initialized in the proper order. > > I've checked in a small change to obj

Data::Dumper test version

2004-03-10 Thread Jens Rieks
Hi all, attached is an object orientated version of library/dumper.imc. (it needs libraray/objecthacks.imc from yesterday) I made the following changes: - the third (optional) parameter of _dumper ('indent)' behaves a little bit different. The string is now repeated for each indention level. - U

[BUG] load_bytecode can print hello world

2004-03-10 Thread Jens Rieks
Hi, this time a funny bug :-) 1. create a file main.imc with the following content: .sub _main print "A\n" load_bytecode "hello.imc" print "B\n" end .end 2. create a file hello.imc with the following content: .emit .pcc_sub @LOAD _onload: print "foo\n" end .eom .sub _hel

[BUG] can not call methods with "self"

2004-03-11 Thread Jens Rieks
Hi, attached is a patch to t/pmc/object-meths.t that adds a test that is currently failing because IMCC rejects code like self."blah"() jens Index: t/pmc/object-meths.t === RCS file: /cvs/public/parrot/t/pmc/object-meths.t,v retriev

Re: Data::Dumper test version

2004-03-11 Thread Jens Rieks
Hi, On Thursday 11 March 2004 16:31, Leopold Toetsch wrote: > Jens Rieks <[EMAIL PROTECTED]> wrote: > > Hi all, > > > > attached is an object orientated version of library/dumper.imc. > > (it needs libraray/objecthacks.imc from yesterday) > > Should that

Re: [BUG] can not call methods with "self"

2004-03-11 Thread Jens Rieks
Hi, On Thursday 11 March 2004 16:41, Dan Sugalski wrote: > At 4:34 PM +0100 3/11/04, Jens Rieks wrote: > >Hi, > > > >attached is a patch to t/pmc/object-meths.t that adds a test that is > > currently failing because IMCC rejects code like self."blah"() >

[BUG] assertion failed in src/packfile.c:2783

2004-03-11 Thread Jens Rieks
Hi, $ tar xzf err.tgz $ cd err $ ../parrot dumper_1.imc parrot: src/packfile.c:2783: store_sub_in_namespace: Assertion `ns < pf->const_table->const_count' failed. aborted. It seems to be trigger by the empty __register sub in err/library/Data/Dumper/Default.imc The bug vanishes if one line of t

[offtopic] Fwd: ScanMail Message: To Sender virus found or matched file blocking setting.

2004-03-11 Thread Jens Rieks
Hi, Am I the only one who receives this annoying message each time I send an .tgz attachment to the list? jens --- Begin Message --- ScanMail for Microsoft Exchange has taken action on the message, please refer to the contents of this message for further details. Sender = [EMAIL PROTECTED] Reci

[perl #27590] @LOAD with IMCC not always working correctly

2004-03-11 Thread Jens Rieks
Hi, the following patch adds 4 more tests to t/pmc/sub.t One of the new tests ('load_bytecode @LOAD second sub - imc') is currently failing. (The patch also removes a redundant assignment of $temp) jens Index: t/pmc/sub.t === RCS fi

[BUG] src/hash.c:256: promote_hash_key: Assertion `key' failed.

2004-03-11 Thread Jens Rieks
Hi, $ tar xzf err2.tgz $ cd err2 $ ../parrot t/pmc/dumper_1.imc parrot: src/hash.c:256: promote_hash_key: Assertion `key' failed. aborted It is caused by 'callmethod "dumper"' (err2/library/dumper.imc:82) jens err2.tgz Description: application/tgz

Re: [BUG] assertion failed in src/packfile.c:2783

2004-03-12 Thread Jens Rieks
Hi, On Friday 12 March 2004 08:57, Leopold Toetsch wrote: > Jens Rieks <[EMAIL PROTECTED]> wrote: > > $ ../parrot dumper_1.imc > > parrot: src/packfile.c:2783: store_sub_in_namespace: Assertion `ns < > > pf->const_table->const_count' failed

[BUG] can not use op names as sub/method name

2004-03-12 Thread Jens Rieks
Hi, .namespace ["Source"] .sub open method .pcc_begin_return .pcc_end_return .end fails with error:imcc:parse error, unexpected PARROT_OP, expecting IDENTIFIER jens

[BUG] method calling problem

2004-03-12 Thread Jens Rieks
Hi, another day, another bug... :-) $ tar xzf err4.tgz $ cd err4 $ ../parrot main.imc main.imc: calling method readFile... get_string() not implemented in class 'SArray' I can not see whats wrong with it. It works only if the called method does not use ".param"... jens err4.tgz Description: a

Re: [BUG] can not use op names as sub/method name

2004-03-13 Thread Jens Rieks
Hi, On Saturday 13 March 2004 07:28, Leopold Toetsch wrote: > Jens Rieks <[EMAIL PROTECTED]> wrote: > > Hi, > > > > .namespace ["Source"] > > .sub open method > > .pcc_begin_return > > .pcc_end_return > > .end > > > &g

[BUG] problem with non existing methods (Was: Re: [BUG] method calling problem)

2004-03-13 Thread Jens Rieks
Hi, On Saturday 13 March 2004 09:41, Leopold Toetsch wrote: > Jens Rieks <[EMAIL PROTECTED]> wrote: > > get_string() not implemented in class 'SArray' > > I've gone through err3 and err4 and found a couple of flaws, which should > mostly be fixed now

Re: PDD15: per-class attribute offsets

2004-03-13 Thread Jens Rieks
Hi, On Saturday 13 March 2004 21:44, Dan Sugalski wrote: > At 9:06 PM +0100 3/13/04, Oli wrote: > >Dan Sugalski wrote: > >>>As well as involving much finding of instances, and moving of > >>>their attribute > >>>values, this isn't thread safe (please excuse my lack of PASM syntax > >>>knowledge):

OO version of Data::Dumper, library/onload.imc, library/objects.imc

2004-03-14 Thread Jens Rieks
Hi all, here is ready-for-commit version of Data::Dumper. Not everything is documented yet, but the original interface is still functional. Most of the code is now loaded with load_bytecode, which reduces memory usage if several loaded modules are using the dumper. New/modified things: - the co

Re: OO version of Data::Dumper, library/onload.imc, library/objects.imc

2004-03-14 Thread Jens Rieks
Hi, On Sunday 14 March 2004 18:55, Leopold Toetsch wrote: > Jens Rieks <[EMAIL PROTECTED]> wrote: > > here is ready-for-commit version of Data::Dumper. > > Committed (forgot description and credits - sorry). > > Two tests are failing here > t/pmc/dumper.t2

[BUG] GC problem

2004-03-15 Thread Jens Rieks
Hi, the attached program aborts if run without without -G... $ tar xzf err6.tgz $ cd err6 $ ../parrot languages/EBNF/main.imc a.ebnf 'h' = code=1 'e' = code=1 'l' = code=1 'l' = code=1 'o' = code=1 '=' = code=4 a.ebnf:1:5 end of terminal 'hello' a.ebnf:1:6 defining meta-identifier 'hello'... '(*'

[PATCH] fix Data::Dumper null PMC dumping

2004-03-15 Thread Jens Rieks
Hi, the attached patch fixes null PMC dumping and adds a test for it. jens Index: t/pmc/dumper.t === RCS file: /cvs/public/parrot/t/pmc/dumper.t,v retrieving revision 1.8 diff -u -r1.8 dumper.t --- t/pmc/dumper.t 15 Mar 2004 08:03:25

timer.t problems

2004-03-15 Thread Jens Rieks
Hi! Sometimes, timer.t failes on tinderbox "colon (FreeBSD)". Has anyone an idea what might be wrong? On example: t/pmc/timer.# Failed test (t/pmc/timer.t at line 152) # got: 'ok 1 # ok 2 # ok 2 # ok 3 # ' # expected: 'ok 1 # ok 2 # ok 2 # ok 2 # ok 3 # ' # Looks like y

Re: How do I....

2004-03-16 Thread Jens Rieks
Hi, On Tuesday 16 March 2004 08:49, Will Coleda wrote: > On Tuesday, March 16, 2004, at 02:01 AM, Leopold Toetsch wrote: > > Well just use the global ops. > > > > global "tcl_globals" = the_hash # store > > .. > > pref = global "tcl_globals" # fetch > > [snip] > > > > Why not just u

[BUG] exceptions and different runloops

2004-03-16 Thread Jens Rieks
Hi, the attached test fails. It raises an exception in __init; if it is resumed parrot exists after leaving __init. jens use strict; use Parrot::Test tests => 1; output_is(<<'CODE', <<'OUTPUT', "exceptions and different runloops"); _main: newsub P0, .Exception_Handler, _eh set_eh P0

Re: How do I....

2004-03-16 Thread Jens Rieks
On Tuesday 16 March 2004 16:00, Gay, Jerry wrote: > On Tuesday, March 16, 2004 7:32 AM, Jens Rieks wrote: > > You can also use another namespace: > > store_global "TCL::InternalData", "globals", the_hash > > ... > > find_global the_hash

[PATCH] fix typo in imcc/docs/calling_conventions.pod

2004-03-18 Thread Jens Rieks
Hi, the attached patch fixes a small typo in alling_conventions.pod jens Index: imcc/docs/calling_conventions.pod === RCS file: /cvs/public/parrot/imcc/docs/calling_conventions.pod,v retrieving revision 1.19 diff -u -w -r1.19 calling

Continuation usage

2004-03-18 Thread Jens Rieks
Hi, does the attached test use the Continuation in a correct way? The test failes, what am I doing wrong? jens use strict; use Parrot::Test tests => 1; output_is(<<'CODE', <<'OUTPUT', "use a continuation to go down the callchain"); ##PIR## .sub _main .local int a .local int b .local

[BUG] imcc: no newline at end of file

2004-03-18 Thread Jens Rieks
Hi, the attached test fails. There is no newline at the end of the file. I think that imcc is causing a memory leak due to this, I got error messages like: "store_sub_in_namespace: sub '__new_class' namespace #1082752832 too big.namespace" in a large program due to this bug. Please note the .n

Re: Optimizations for Objects

2004-03-18 Thread Jens Rieks
Hi, On Thursday 18 March 2004 22:38, Leopold Toetsch wrote: > Dan Sugalski <[EMAIL PROTECTED]> wrote: > > At 4:10 PM -0500 3/18/04, Mitchell N Charity wrote: > >>It seemed nontrivial to reduce the number return continuation pmc's > >>used in oofib.imc. So I instead added an _extra_, unused one, t

Re: Optimizations for Objects

2004-03-18 Thread Jens Rieks
oops, I renamed the wrong file... This is the correct example. jens .pcc_sub _main: newsub P0, .Sub, _foo newsub P1, .RetContinuation, _ret invoke _ret: print "returned!\n" set P0, P2 invokecc print "after 2nd invoke\n" end .pcc_sub _foo: print "foo start\n"

Re: [CVS ci] OpsFile hints - 1

2004-03-19 Thread Jens Rieks
Hi, On Friday 19 March 2004 12:07, Leopold Toetsch wrote: > Some weeks ago I posted a proposal for additional hints in ops files. We > need additionally (at least): > > 1) a per argument flag, if this argument is indicating a branch offset > or address: > >inline op bsr (label INT) > > "label"

[Patch] fix tests failing due to recent PerlNum modifications

2004-03-19 Thread Jens Rieks
jens Index: t/pmc/pmc.t === RCS file: /cvs/public/parrot/t/pmc/pmc.t,v retrieving revision 1.84 diff -u -r1.84 pmc.t --- t/pmc/pmc.t 14 Mar 2004 08:49:16 - 1.84 +++ t/pmc/pmc.t 19 Mar 2004 12:20:49 - @@ -774,7 +774,7 @@

Re: [Patch] fix tests failing due to recent PerlNum modifications

2004-03-19 Thread Jens Rieks
Hi, On Friday 19 March 2004 16:23, Leopold Toetsch wrote: > I'm currently fixing the code. > So thanks - not needed. new P0, .PerlNum set P0, 0.0 print P0 should IMO print "0.00" rather than "0", because its a floating point number and not an integer. What are the arguments for printi

Re: New Dumper, can only run from top level

2004-03-20 Thread Jens Rieks
Hi, On Saturday 20 March 2004 20:09, Will Coleda wrote: > I am having trouble running a .pbc that includes a call to _dumper > unless I run it from the top level parrot directory. > > bash-2.05a$ cat ./foo.imc > .sub main >_dumper($P1) >end > .end > > .include "library/dumper.imc" > bash-2

Re: Variadic functions questions

2004-03-22 Thread Jens Rieks
Hi, On Monday 22 March 2004 10:44, Ilya Martynov wrote: > Hello all, > > 1) First question is how to tell if variadic function recieved 11 or >12 or more params (for simplicity let's suppose that we use only >pmc parameters). > > According calling conventions (pdd03) first 11 params end up

Re: Variadic functions questions

2004-03-22 Thread Jens Rieks
Hi, On Monday 22 March 2004 13:54, Leopold Toetsch wrote: > Jens Rieks <[EMAIL PROTECTED]> wrote: > > First a note: P3 is now cleared, if P15 is reached. So havin 11 args can > be distinguished from having more then 11 arguments. > > > Leo, is it easy to alias them a

Re: [PATCH] OpsFile hits: ops/cmp.ops ops/object.ops

2004-03-22 Thread Jens Rieks
Hi, On Monday 22 March 2004 15:46, Leopold Toetsch wrote: > > Ist rx.ops noch aktuell? Wenn ja schaue ich da auch mal durch. > > Ob es so verwendet wird weiß ich nicht. Es sind aber etliche branch ops > dabei. Done. Hab bei diff nur -w genommen um den Patch klein zu halten. jens Index: rx.ops ===

Re: [PATCH] OpsFile hits: ops/cmp.ops ops/object.ops

2004-03-22 Thread Jens Rieks
Sorry, this mail was meant to go directly to Leo. On Monday 22 March 2004 17:05, Jens Rieks wrote: > Hi, > > On Monday 22 March 2004 15:46, Leopold Toetsch wrote: > > > Ist rx.ops noch aktuell? Wenn ja schaue ich da auch mal durch. > > > > Ob es so verwendet wir

Re: opsfile.tgz

2004-03-23 Thread Jens Rieks
Hi, On Tuesday 23 March 2004 14:49, Gay, Jerry wrote: > > - do we expect to have more then 32 different classes? > > i see 13 operator classes currently, though my tree may be out of date I think we should limit the number of unique IDs available at runtime to 32. We can assign the same number to

Re: opsfile.tgz

2004-03-23 Thread Jens Rieks
On Tuesday 23 March 2004 17:11, Dan Sugalski wrote: > At 3:43 PM +0100 3/23/04, Jens Rieks wrote: > >On Tuesday 23 March 2004 14:49, Gay, Jerry wrote: > >> > - do we expect to have more then 32 different classes? > >> > >> i see 13 operator classes curre

[BUG] another GC-related bug

2004-03-29 Thread Jens Rieks
Hi, tar xzf err13.tgz cd err13 ../parrot languages/EBNF/main.imc ebnf/precedence1.ebnf chrashes, running parrot with -G works. jens (gdb) r --gc-debug languages/EBNF/main.imc ebnf/precedence1.ebnf Starting program: /home/jrieks/projekte/parrot/parrot --gc-debug languages/EBNF/main.imc ebnf/pr

Re: New SDL Parrot Bindings Underway

2004-03-30 Thread Jens Rieks
Hi, On Tuesday 30 March 2004 09:33, chromatic wrote: > Hi all, > > With the improved object system in place, I've been porting the existing > SDL Parrot bindings. Here's a sample program that draws the friendly > blue rectangle again: > > .pcc_sub _main non_prototyped, @MAIN > load_bytecode

Re: [BUG] another GC-related bug

2004-03-30 Thread Jens Rieks
Hi, On Tuesday 30 March 2004 17:03, Leopold Toetsch wrote: > Jens Rieks <[EMAIL PROTECTED]> wrote: > > tar xzf err13.tgz > > cd err13 > >=2E./parrot languages/EBNF/main.imc ebnf/precedence1.ebnf > > > > chrashes, running parrot with -G works. > > Can y

Re: Some new classes (dumper patch)

2004-03-30 Thread Jens Rieks
Hi, On Tuesday 30 March 2004 18:57, Dan Sugalski wrote: > I just checked in stub code for the PMCArray and StringArray classes. I've attached a patch for the data dumper. > Ultimately they should be auto-resizeable, PMC or String only arrays, > though right now they aren't. (They wrap PerlArray r

Re: Points of focus

2004-03-31 Thread Jens Rieks
Hi, On Wednesday 31 March 2004 23:27, Tim Bunce wrote: > Is IMCC method call syntax spec'd, implemented, and reasonably stable? I think yes. But the method (and sub) declaration stuff needs a bit work. For example, you can not declare a "new" or "end" method at the moment. > Tim. jens

Re: Points of focus

2004-03-31 Thread Jens Rieks
Hi, On Wednesday 31 March 2004 20:42, Dan Sugalski wrote: > *) Get continuations all nailed down. There seems to be some > lingering problems in the system I'd like identified with tests and > fixed > *) Get lexical pad operations spec'd out and possibly working > *) Fix hash.c. (Though it may not

[RFC] IMCC reimplementation roadmap

2004-03-31 Thread Jens Rieks
Hi all! I propose the following because the current IMCC reimplementation seems to make no progress. ## first part ## Create a (bytecode) class "PIR" that can be used (by compilers written in bytecode) as an standardized interface to IMCC. A first implementation of that class can just create a

coroutine together with load_bytecode not working

2004-03-31 Thread Jens Rieks
Hi, has the attached code any errors? It does not work if I split the code into two files (at ## coro.imc ##) and uncomment the load_bytecode. jens

Re: coroutine together with load_bytecode not working

2004-04-01 Thread Jens Rieks
Hi, On Thursday 01 April 2004 10:50, Leopold Toetsch wrote: > Jens Rieks <[EMAIL PROTECTED]> wrote: > > has the attached code any errors? > > It's too short to have any errors ;) > > > jens > > > > --Boundary-00=_Cx2aABtKF1Y0Bud-- > > <

Re: [RFC] IMCC reimplementation roadmap

2004-04-01 Thread Jens Rieks
Hi, On Thursday 01 April 2004 10:49, Leopold Toetsch wrote: > Jens Rieks <[EMAIL PROTECTED]> wrote: > > Hi all! > > > > I propose the following because the current IMCC reimplementation seems > > to make no progress. > > I've a different roadmap: &g

  1   2   3   >