Re: wxParrot -- linking problems

2005-10-24 Thread Mattia Barbon \[EMAIL PROTECTED]
  Hi!

 I like the idea of leveraging the wxPerl XS files. Any comments on why
 you introduced xsubppp (on top of xsubpp) for some XS files?

XS++ is much less verbose than plain XS when writing
C++ code [1], and it allows me to handle some C++ features
(like passing/returning references) without
having to use CODE: blocks.

  Note that since xsubppp is just a XS++ - XS translator,
it should be possible to just ignore its existence when writing
an XS - Parrot translator.

Regards
Mattia

[1] just compare any .xsp file with the output of running
xsubppp.pl options xsp file




Re: wxParrot -- linking problems

2005-10-22 Thread Mattia Barbon
On Sat, 22 Oct 2005 09:33:50 +0200 Christian Renz [EMAIL PROTECTED] wrote:

   Hello,

 How do I find the right symbol name for a function? For example, the
 void wxBell(void) function can be found in the library as __Z6wxBellv
 (found using otool -vT /usr/lib/libwx.dylib), but I guess on Windows
 it bould be something like _wxBellA. And of course it gets harder in
 the case of overloaded methods/constructors/destructors with different
 parameter signatures. So how would I go about finding the symbol I
 need (short of compiling a small C++ program and find out which
 symbols it imports...)?

  I do not think this is going to work: In general C++ ABI has not been
standardized between compilers: name mangling is different, how 'this'
is passed is different, how exceptions are handled is different and so on...
It might even vary between compiler versions (GCC certainly did change its
C++ ABI several times).  I think the best approach would be the one used
by Perl XS: creating a C function that calls the C++ one. You might use XS
(rewriting xsubpp for Parrot and maybe reusing wxPerl's XS) or you might use
the C++-to-C bindings that have been created for wx.NET and/or wxEiffel.

HTH
Mattia

P.S.: I am interested wxParrot, too



Re[2]: [perl #31379] [PATCH] Implement Parrot_call_method

2004-08-29 Thread Mattia Barbon
On Sun, 29 Aug 2004 11:09:46 +0200 Leopold Toetsch [EMAIL PROTECTED] wrote:

 Mattia Barbon [EMAIL PROTECTED] wrote:
 
Hello,
  this patch implements Parrot_call_method (with test).
 
 This code seems to duplicate functions from Fsrc/inter_run.c and
 returning results from the call is missing.

  No, AFAICS the functions in Fsrc/inter_run.c are for prototyped calls
with a single return value, while the ones in Fsrc/extend.c are for
unprototyped calls with any return value (as Parrot_call already does);
the callee might return multiple return values. I could move the functions to
Fsrc/inter_run.c for consistency, however.

 If should be easy to wrap Parrot_run_meth* and use existing code.

  I could share some implementation with Fsrc/inter_run.c, yes, but wrapping
it is not possible (prototyped vs. unprototyped).

Regards
Mattia



Add functions in dynext to the extending interface?

2004-08-27 Thread Mattia Barbon
  Hello,
should they be? I think they are covered by the statemente in
pdd11 (... about the same level of access to Parrot 
that bytecode programs ...).

Regards
Mattia



Re[2]: Extending interface: PMC flags and marking

2004-08-22 Thread Mattia Barbon
On Sat, 21 Aug 2004 19:36:43 -0400 Dan Sugalski [EMAIL PROTECTED] wrote:

 At 6:44 PM +0200 8/21/04, Mattia Barbon wrote:
Hello,
 I think extenders should have access to at least some of the
 flags in PObj_enum. Should we have a different function for
 each flag (say: Parrot_PObj_set_custom_mark(INTERP, PMC, value),
 Parrot_PObj_set_is_class(INTERP, PMC, value) or a single
 Parrot_PObj_set_flag(INTERP, PMC, flag, value) where flag
 is an enumerated value declared in extend.h, NOT the values of
 PObj_enum.
 
 Nope. Flags are for internal PMC use or engine use, not for 
 extenders, at least not for now.
 
Extenders also need Parrot_PObj_mark(INTERP, PMC).
 
 Nope. That's for internal use, either by the DOD or the the PMC class 
 functions.
 
 We should get the APIs better delineated, though, with the reasons 
 for this stuff being where it is.

  I am writing Perl5PVAV PMC. I need to mark its contents. I need the custom
mark flag (or a way to tell the GC to call my custom mark method) and I will
need a custom destroy for other PMC types. How do I achieve this?

Regards
Mattia



Calling conventions for unprototyped subroutines?

2004-08-21 Thread Mattia Barbon
  Hello,
crrently argument count is passed in I3. A comment in untils.c
near foldup says that:

TODO - IMCC and PDD 3 aren't yet in conformance. This uses the current
IMCC setup, but should be changed as soon as IMCC modified to the
correct calling conventions.

while pdd03 says:

...

0 if all the parameters are jammed in P registers and the overflow
array, with a count of parameters passed in PMC registers

so: where is the argument count passed? Please note that I3 is also
mentioned in compiler FAQ.

Thanks!
Mattia



Extending interface: PMC flags and marking

2004-08-21 Thread Mattia Barbon
  Hello,
I think extenders should have access to at least some of the
flags in PObj_enum. Should we have a different function for
each flag (say: Parrot_PObj_set_custom_mark(INTERP, PMC, value),
Parrot_PObj_set_is_class(INTERP, PMC, value) or a single
Parrot_PObj_set_flag(INTERP, PMC, flag, value) where flag
is an enumerated value declared in extend.h, NOT the values of
PObj_enum.

  Extenders also need Parrot_PObj_mark(INTERP, PMC).

Comments?
Mattia



Re[2]: [perl #31114] [PATCH] Dynext functions

2004-08-15 Thread Mattia Barbon
[got a failure, sorry if this is a duplicate]

On 15 Aug 2004 10:11:11 - Leopold Toetsch via RT [EMAIL PROTECTED] wrote:

 Mattia Barbon [EMAIL PROTECTED] wrote:
 
Hello,
  I am not sure about this patch. It splits part of Parrot_load_lib
  into a Parrot_init_lib(Interp, load_func_ptr, init_func_ptr)
  where load/init_func_ptr are pointers to the function loadlib calls. The
  objective is allowing dynamic PMCs linked inside a larger library
  or maybe an executable. For example Ponie might have Perl5IV,
  Perl5PVCV, etc. PMCs linked inside libponie,
 
 For PMC libraries I'd rather have that done in the PMCs init code.
 This could be automated for a bunch of PMC files of one language. E.g. a
 utility concats the .c files generated from .pmc and chains the init
 functions, so that one init call registers all PMCs.

  Maybe something like this (exact syntax up in the air):

pmc2c2.pl ... --dump pmc1.pmc
pmc2c2.pl ... --dump pmc2.pmc
pmc2c2.pl ... --dump pmc3.pmc
pmc2c2.pl ... --c --library-name baz pmc1.pmc pmc2.pmc pmc3.pmc
# outputs the PMC code in pmc1.c, pmc2.c, pmc3.c
# puts a merged class_init and Parrot_lib_baz_load in baz.c

  This will also allow solving the problem in the patch to Pmc2c.pm
(can't have two dynpmc A and B, A declaring an MMD function with B
and B declaring one for A).

Will work on it.

 But your solution seems to be just a generalization of this.

  It is not. Yet. But this patch (or something like this) is needed to
implement PMCs linked into an executable (statically linked ponie), or
into a shared library that also contains other runtime functions
(a shared libponie.so(.

Regards
Mattia



Re[2]: Embedding vs. extending interface types

2004-01-25 Thread Mattia Barbon
Il Sat, 24 Jan 2004 19:42:20 -0500 Gordon Henriksen [EMAIL PROTECTED] ha scritto:

 On Saturday, January 24, 2004, at 11:28 , Mattia Barbon wrote:
 
  I feel I'm becoming annoying, but: the embedding and extending 
  interfaces are still using different names for 
  Parrot_Interp/Parrot_INTERP. Which one is correct?
 
 Mattia,
 
 Both are correct. Sort of. :) Parrot_INTERP is an opaque type,
 which is 
 a technique for improving binary compatibility. In the core, which
 is 
  I know that. The problem, as you note in your next mail, is:
Parrot_Interp already has opacity guards, and _is used as an opaque
type in embedding interface_. Now having two parts of the _external_
interface use differently-named opaque types for the same thing
seems pointless, if not confusing.
  I personally prefer the internal and externalidentifier having the
same name, but I don't care, as long as the external interface is coherent.

 always compiled as a unit, the fields of the interpreter structure
 can 
 be accessed directly. But to preserve binary compatibility if the
 struct 
 layout is modified, embedders and extensions (which are built
  
  Currently, embedders use Parrot_Interp, while extenders use
Parrot_INTERP...

Regards
Mattia



Embedding vs. extending interface types

2004-01-24 Thread Mattia Barbon
  Hello,
I feel I'm becoming annoying, but: the embedding and extending
interfaces are still using different names for Parrot_Interp/Parrot_INTERP.
  Which one is correct?

Thanks!
Mattia




Re[2]: [perl #24817] [PATCH] various extending interface changes

2004-01-06 Thread Mattia Barbon
Il Tue, 6 Jan 2004 16:43:42 +0100 Leopold Toetsch [EMAIL PROTECTED] ha scritto:

 Mattia Barbon [EMAIL PROTECTED] wrote:
Hello,
  this patch
 
  * renames Parrot_INTERP and Parrot_STRING to Parrot_Interp and
 Parrot_String,
which matches the rest of Parrot types, as well as the
 embedding interface
 
 AFAIK are the types in extend.c opaque types which are different to
 the
 internals.
  Sure. But: embed.h and extend.h do not use the same types. They should,
whichever the type names are (I am not to decide[1], but somebody ought to...).
In addition the patch leaves the types opaque, it just changes their names.

Regards
Mattia



Extendiers interface

2004-01-04 Thread Mattia Barbon
  Hello,
I have some questions about which part of the actual headers are
internal, which ones are for embedders and which ones are for
extenders.

  AFAIR nothing but Parrot sources should #include parrot/parrot.h.
The public interface is available through parrot/embed.h and
parrot/extend.h. Correct?

* types
  parrot/embed.h uses Parrot_Interp, Parrot_String, ...
  parrot/extend.h uses Parrot_INTERP, Parrot_STRING. I like the
  former more (metched Parrot_Int, Parrot_Float), but the two
  interfaces must at least agree on type names, whatever they
  are.

* ParrotIO
  It is currently not available. I think that API functions
  (PIO_open, PIO_read, ...) should be available for embedders
  (maybe not all af them, but at least some ought to), while
  the layer stuff should be available to extenders. Correct?
  Should they be available as PIO_* or as Parrot_io_*/Parrot_IO_*?

* custom PMC and vtables
  I assume custom PMC are for extenders. If this is correct,
  the vtable structure needs to be available to extenders,
  together with APIs for accessing PMCs flags, data pointer, etc
  (shoud that use macros as in Parrot-provided PMCs (PMC_data),
  or function calls?)

* Various functions:
  accessing globals, Parrot_runops_fromc*, mem_sys_*, Parrot_load_bytecode and
  registering IMCC compilers are some examples of functions that (I think)
  ought to be available in one form or the other, but aren't. Should they
  be?

Thanks!
Mattia



Re[2]: [RFC] Dynamic PMC Classes

2003-08-14 Thread Mattia Barbon
On Tue, 5 Aug 2003 17:59:36 +0200 Leopold Toetsch [EMAIL PROTECTED] wrote:

 Dan Sugalski [EMAIL PROTECTED] wrote:
  At 11:10 +0200 7/31/03, Leopold Toetsch wrote:
*) Determine the init and setup routine names
 
 - Parrot_classname_class_setup
 - Parrot_classname_class_init
 
 The class_setup also sets the class_enum i.e vtable-base_type.
 
  Well... there are versioning issues there. We ought to be able to
  have multiple versions of a class loaded, in which case this may not
  work. I'm pretty sure that there are some platforms that require
  unique names in libraries across the entire process.
 
 What about the following (also considering, that we might not like one
 handle/mmap... per PMC, as stated in one f'up):
 
 A dynamic PMC library has one init function returning a dyn_pmc_info
 structure:
  Why not do it (more or less) the way Perl5 does it? Have a
load_and_init operation which loads a dynamic library and calls some
predefined function in it (just pick a name). That function can then
register new PMCs, opcodes, events, whatever you like using normal Parrot_*
API functions. This can be made to be exactly as efficient as your
proposal, and I think it is more flexible.

Regards
Mattia




[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


Re: set_p_p

2002-08-28 Thread Mattia Barbon

On Fri, 23 Aug 2002 16:56:54 +0200 Aldo Calpini [EMAIL PROTECTED] wrote:

  I stumbled upon this because I'm trying to implement an
 Iterator PMC (almost done), and the most obvious way I've
 found to bind the iterator to what it should iterate is this
 one:
 
 new P0, .PerlHash
 new P1, .Iterator
 set P1, P0 # tells P1 that he's going to iterate P0

This looks like a kludge. IMHO the correct way of getting an iterator
is having the aggregate return it (say, using find_method/invoke);
and the iterator does not need to be of class Iterator, it just needs
to behave like one. Otherwise your Iterator needs to know all the
types it has to iterate over, which is bad.

Regards
Mattia




Re[2]: [perl #16114] [PATCH] faster assembler

2002-08-11 Thread Mattia Barbon

On Sat, 10 Aug 2002 16:56:20 -0700 (PDT) Sean O'Rourke [EMAIL PROTECTED] wrote:

 A few more tweaks:
 
 - inline and remove _to_keyed and _to_keyed_integer.
 - inline pack_op
 - reorder the big elsif to test for /^\[/ once at the top, then only
 match
   against keyed/non-keyed.
 
 At this point, startup time dominates for anything as small as our test
 programs, so for testing purposes we may want to look at some sort of
 batch mode.
I had a patch to move things to
lib/Parrot/Assembler.pm # front-end
lib/Parrot/Assembler/Macro.pm
 Assembler.pm

and to modify Parrot::Test to use Parrot::Assembler instead of calling
assemble.pl;
make test speedup
Win32, PIII 700, 392MB: from ~6m10 to ~1m10
Linux, P200 MMX, 64MB: 
  from:
real14m46.652s
user13m37.560s
sys 1m4.760s
  to:
real3m24.666s
user3m7.730s
sys 0m14.790s

I was about to submit, but recent commits means it is outdated...
The patch is a trivial cut'n'paste work, so if you don't want
to wait until august the 24th (going in vacation), it is trivial to do
that.

Regards
Mattia

   




Re[2]: [perl #15904] Configure broken on windows 9x

2002-08-01 Thread Mattia Barbon

On Thu, 1 Aug 2002 16:50:25 +0200 Aldo Calpini [EMAIL PROTECTED] wrote:

 Mr. Nobody wrote:
  The windows 9x command.com shell dosen't recognize
  21 so it ends up passing 2 as an argument to the
  compiler, which fails because there's no such file.
 
 this is no news. you can't even build Perl on 9x.
 IMHO, *build* platform targets should not include 9x.
 build it on NT/2000/XP and then feel free to use the
 binary on 9x (as Perl actually does).
Perl 5.8.0 almost builds on Win95, command.com, MinGW, dmake.
(almost means that you need a small patch because MM autputs
 some spaces instead of tabs in makefiles, other than that it builds,
 but hangs in the test suite (it would probably work, too,
 but I use Win95 just to play RayMan, so I don't know...)

Regards
Mattia




[PATCH] Stop win32 popping up dialogs on segfault

2002-02-08 Thread Mattia Barbon

The following patch adds a Parrot_nosegfault() function
to win32.c; after it is called, a segmentation fault will print
This process received a segmentation violation exception
instead of popping up a dialog. I think it might be useful
for tinderbox clients.

Regards
Mattia



Index: platforms/win32.c
===
RCS file: /home/perlcvs/parrot/platforms/win32.c,v
retrieving revision 1.5
diff -u -2 -r1.5 win32.c
--- platforms/win32.c   14 Jan 2002 20:04:32 -  1.5
+++ platforms/win32.c   8 Feb 2002 18:15:16 -
@@ -7,4 +7,25 @@
 #include parrot/parrot.h
 
+/*
+ * Parrot_nosegfault()
+ */
+
+LONG CALLBACK Parrot_win32_filter ( EXCEPTION_POINTERS* exceptionInfo )
+{
+  /* only trap segmentation violations */
+  if( exceptionInfo-ExceptionRecord-ExceptionCode ==
+  EXCEPTION_ACCESS_VIOLATION )
+  {
+printf(This process received a segmentation violation exception\n);
+exit(1);
+  }
+
+  return EXCEPTION_CONTINUE_SEARCH;
+}
+
+void Parrot_nosegfault ()
+{
+  SetUnhandledExceptionFilter( Parrot_win32_filter );
+}
 
 /*
Index: platforms/win32.h
===
RCS file: /home/perlcvs/parrot/platforms/win32.h,v
retrieving revision 1.6
diff -u -2 -r1.6 win32.h
--- platforms/win32.h   29 Jan 2002 18:39:20 -  1.6
+++ platforms/win32.h   8 Feb 2002 18:15:16 -
@@ -26,5 +26,5 @@
 FLOATVAL Parrot_floatval_time (void);
 void Parrot_setenv(const char * name, const char * value);
-
+void Parrot_nosegfault();
 
 /*



RE: [PATCH] Stop win32 popping up dialogs on segfault

2002-02-08 Thread Mattia Barbon

  The following patch adds a Parrot_nosegfault() function
  to win32.c; after it is called, a segmentation fault will print
  This process received a segmentation violation exception
  instead of popping up a dialog. I think it might be useful
  for tinderbox clients.
 
 Please notice, stdio is not signal/exception safe, you can not
Ok, will resubmit ( I was printing to stdoud, anyway, so it was
wrong twice... )

snip

 By the way, the SIGINT and SIGQUIT on win32 is running in its own thread,
 so the restriction is less.

Regards
Mattia



RE: [PATCH] Stop win32 popping up dialogs on segfault

2002-02-08 Thread Mattia Barbon

 FYI: On interp init I already grab the standard handles (io_win32.c) so you
 could reuse the value for stderr. It might make sense to make the low level
 handle values extern so other modules can use them. Let me know and
 I'll put a patch in for it.
I don't know if it is a good idea to expose the low-level handles to other modules. 
BTW, is -win32-nosegfault-popup ok
for the command-line option ?

Regards
Mattia



Re: [Patch] A few fixes.

2002-02-06 Thread Mattia Barbon

   misc.c, line 541: Error:
 [ISO 6.1.4]: End of line in string literal.
 
 Here's a patch.  That last one is particularly odd, as it is in a #if 0.  
 I'm leaving it for now, as I think this is a case of the compiler being on 
 crack.
Probably not: IIRC the standard requires the parts inside
#if 0/#endif to be tokenizable.

Regards
Mattia





386 JIT broken

2002-02-02 Thread Mattia Barbon

I'm sorry if this is a known bug.
my.pasm ( useless, just a contrived example ):
set I1, 12
FOO:
if I1, FOO
BAR:
if I1, BAR
if I1, FOO
end

assembly:
0x816bda8:  push   %ebp
0x816bda9:  mov%esp,%ebp
0x816bdab:  int3
0x816bdac:  movl   $0xc,0x815150c
0x816bdb6:  mov%esi,%esi
0x816bdb8:  mov0x815150c,%eax
0x816bdbd:  cmp$0x0,%eax
0x816bdc0:  jne0x816bdb7== wrong
0x816bdc6:  nop
0x816bdc7:  mov0x815150c,%eax
0x816bdcc:  cmp$0x0,%eax
0x816bdcf:  jne0x816bdc6== correct
0x816bdd5:  nop
0x816bdd6:  mov0x815150c,%eax
0x816bddb:  cmp$0x0,%eax
0x816bdde:  jne0x816bdb7   == wrong
0x816bde4:  nop
0x816bde5:  leave
0x816bde6:  ret

If I move the set I1, 12 after the foo label,
both jumps are correct.

Regards
Mattia



[PATCH] io_win32.c

2002-01-13 Thread Mattia Barbon

io/io_win32.c:
  according to my MSVC docs, you should use _tcslen only after
  #including tchar.h



Index: io/io_win32.c
===
RCS file: /home/perlcvs/parrot/io/io_win32.c,v
retrieving revision 1.2
diff -u -2 -r1.2 io_win32.c
--- io/io_win32.c   12 Jan 2002 15:14:56 -  1.2
+++ io/io_win32.c   13 Jan 2002 18:40:12 -
@@ -16,4 +16,6 @@
 #ifdef WIN32
 
+#include tchar.h
+
 /* Defined at bottom */
 extern ParrotIOLayerAPIpio_win32_layer_api;



[PATCH] Makefile tweaks

2002-01-13 Thread Mattia Barbon

Makefile.in:
  (Re)add ld_debug flags to LDFLAGS, so that Configure.pl --debugging
  works with MSVC

classes/Makefile.in
  make easier to add pmb2c.pl flags to all pmc2c calls





Index: Makefile.in
===
RCS file: /home/perlcvs/parrot/Makefile.in,v
retrieving revision 1.115
diff -u -2 -r1.115 Makefile.in
--- Makefile.in 13 Jan 2002 17:45:31 -  1.115
+++ Makefile.in 13 Jan 2002 18:40:10 -
@@ -97,5 +97,5 @@
 
 CFLAGS = ${ccflags} ${cc_warn} ${cc_debug} ${cc_inc} ${cc_hasjit}
-LDFLAGS = ${ldflags}
+LDFLAGS = ${ldflags} ${ld_debug}
 
 C_LIBS = ${libs}
Index: classes/Makefile.in
===
RCS file: /home/perlcvs/parrot/classes/Makefile.in,v
retrieving revision 1.16
diff -u -2 -r1.16 Makefile.in
--- classes/Makefile.in 13 Jan 2002 17:45:58 -  1.16
+++ classes/Makefile.in 13 Jan 2002 18:40:11 -
@@ -20,4 +20,5 @@
 PERL = ${perl}
 MAKE_F=${make}
+PMC2C=$(PERL) pmc2c.pl
 
 .c$(O):
@@ -27,40 +28,40 @@
 
 default.c default.h: default.pmc
-   $(PERL) pmc2c.pl default.pmc
+   $(PMC2C) default.pmc
 
 default$(O): $(H_FILES)
 
 perlint.c perlint.h: perlint.pmc 
-   $(PERL) pmc2c.pl perlint.pmc
+   $(PMC2C) perlint.pmc
 
 perlint$(O): $(H_FILES)
 
 perlnum.c perlnum.h: perlnum.pmc 
-   $(PERL) pmc2c.pl perlnum.pmc
+   $(PMC2C) perlnum.pmc
 
 perlnum$(O): $(H_FILES)
 
 perlstring.c perlstring.h: perlstring.pmc 
-   $(PERL) pmc2c.pl perlstring.pmc
+   $(PMC2C) perlstring.pmc
 
 perlstring$(O): $(H_FILES)
 
 perlarray.c perlarray.h: perlarray.pmc 
-   $(PERL) pmc2c.pl perlarray.pmc
+   $(PMC2C) perlarray.pmc
 
 perlarray$(O): $(H_FILES)
 
 perlhash.c perlhash.h: perlhash.pmc 
-   $(PERL) pmc2c.pl perlhash.pmc
+   $(PMC2C) perlhash.pmc
 
 perlhash$(O): $(H_FILES)
 
 perlundef.c perlundef.h: perlundef.pmc 
-   $(PERL) pmc2c.pl perlundef.pmc
+   $(PMC2C) perlundef.pmc
 
 perlundef$(O): $(H_FILES)
 
 parrotpointer.c: parrotpointer.pmc
-   $(PERL) pmc2c.pl parrotpointer.pmc
+   $(PMC2C) parrotpointer.pmc
 
 parrotpointer$(O): $(H_FILES)



[PATCH] fix perlarray.pmc, perlhash.pmc

2002-01-13 Thread Mattia Barbon

key.c:
  intialize KEY.keys

classes/perlarray.c:
 * get_string: is casting SELF-cache.struct_val to a STRING*,
   while all other methods are using it as a KEY*; don't know
   what a perlarray stringifies to, so replacing with NULL
 * get_bool: the default behaviour does not look right to me

after the patch

All tests successful (1 subtest UNEXPECTEDLY SUCCEEDED), 3 subtests skipped.
Files=17, Tests=292, 206 wallclock secs ( 0.00 cusr +  0.00 csys =  0.00 CPU)

Win2k, MSVC5, Configure.pl --debugging --defaults

Regards
Mattia



Index: key.c
===
RCS file: /home/perlcvs/parrot/key.c,v
retrieving revision 1.14
diff -u -2 -r1.14 key.c
--- key.c   12 Jan 2002 15:33:08 -  1.14
+++ key.c   13 Jan 2002 18:40:11 -
@@ -122,4 +122,6 @@
 
   key-size = 0;
+  key-keys = 0;
+
   return key;
 }
Index: classes/perlarray.pmc
===
RCS file: /home/perlcvs/parrot/classes/perlarray.pmc,v
retrieving revision 1.5
diff -u -2 -r1.5 perlarray.pmc
--- classes/perlarray.pmc   10 Jan 2002 22:30:13 -  1.5
+++ classes/perlarray.pmc   13 Jan 2002 18:40:12 -
@@ -78,5 +78,5 @@
 
 STRING* get_string () {
-   return (STRING*)SELF-cache.struct_val;
+   return NULL;
 }
 
@@ -87,5 +87,9 @@
 }
 
-BOOLVAL get_bool () = default;
+BOOLVAL get_bool () {
+   KEY* key = SELF-cache.struct_val;
+   INTVAL size = key_size(INTERP,key);
+   return (size != 0);
+}
 
 void* get_value () {



RE: Windows compile problems

2001-10-25 Thread Mattia Barbon

On Wed, 24 Oct 2001, Brent Dax wrote:

Unfortunately, I can't figure out how to utilize it.  Including
windows.h causes a conflict with Parrot's definition of BOOL, including
winbase.h gives me a ton of syntax errors, and putting the declaration
It is not supported to #include a win* file unless you have already
included windows.h . 

Regards
Mattia




Re: My first parrot install - make test

2001-10-20 Thread Mattia Barbon

 On Wed, Oct 17, 2001 at 12:45:49PM +0100, Simon Cozens wrote:
  On Tue, Oct 16, 2001 at 03:43:57PM -0400, Gregor N. Purdy wrote:
   I just fixed the dependancy. Hopefully, this problem goes away now.
  
  Nope.
 
 Fixed it up, and also fixed some problems with the clean target.
 Any volunteers to hack in distclean?
What does it exactly do? Delete everything not in MANIFEST?

Mattia



Parrot::Smoke 0.02

2001-10-05 Thread Mattia Barbon

I just uploaded a new version of Parrot::Smoke to CPAN.

Changes:

0.02  Fri Oct 05 06:57:20 2001
- support for sending mail through Net::SMTP
- autonfiguration through Makefile.PL should work
  on Win32
- eliminated --define/--defaults from output

Regards
Mattia

P.S.: sending mail through Net::SMTP is enabled only if
  none of mail/mailx/sendmail is found, so is
  used on Win32 only



(Fwd) Parrot Smoke Oct 4 07:00:01 2001 UTC dec_osf 4.0

2001-10-04 Thread Mattia Barbon

Automated smoke report for patch Oct  4 07:00:01 2001 UTC
  v0.01 on dec_osf using gcc version 2.8.1
O = OK
F = Failure(s), extended report at the bottom
? = still running or test results not (yet) available
Build failures during:   - = unknown
c = Configure, m = make, t = make test-prep

 Configuration
---  
O O  
O O  nv=double
F F  iv=int
F F  iv=int --define nv=double
O O  iv=long
O O  iv=long --define nv=double
O O  iv=\long long\
O O  iv=\long long\ --define nv=double
| |
| +- --debugging
+--- normal

Failures:

dec_osf  iv=int
dec_osf  --debugging iv=int
dec_osf  iv=int --define nv=double
dec_osf  --debugging iv=int --define nv=double
t/op/basic..dubious DIED. FAILED tests 2-5
t/op/bitwisedubious DIED. FAILED tests 1-4
t/op/integerdubious DIED. FAILED tests 1-26
t/op/number.dubious DIED. FAILED tests 1-25
t/op/stacks.dubious DIED. FAILED tests 1, 3, 5, 7-9
t/op/string.dubious DIED. FAILED tests 1-10
t/op/time...dubious DIED. FAILED tests 1-2
t/op/trans..dubious DIED. FAILED tests 1-18


--- End of forwarded message ---



Parrot Smoke Oct 2 01:00:02 2001 UTC dec_osf 4.0 (fwd)

2001-10-02 Thread Mattia Barbon

-- Forwarded message --
Date: Tue, 2 Oct 2001 09:34:17 +0200
From: Barbon Mattia [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Parrot Smoke Oct  2 01:00:02 2001 UTC dec_osf 4.0

Automated smoke report for patch Oct  2 01:00:02 2001 UTC
  v0.01 on dec_osf using gcc version 2.8.1
O = OK
F = Failure(s), extended report at the bottom
? = still running or test results not (yet) available
Build failures during:   - = unknown
c = Configure, m = make, t = make test-prep

 Configuration
---  
O O  
O O  nv=double
- -  iv=int
- -  iv=int --define nv=double
O O  iv=long
O O  iv=long --define nv=double
- -  iv=\long long\
- ?  iv=\long long\ --define nv=double
| |
| +- --debugging
+--- normal




Re: new assemble.pl

2001-09-26 Thread Mattia Barbon

On Wed, 26 Sep 2001, Gibbs Tanton - tgibbs wrote:

Attached is a new assemble.pl.  No, it doesn't change anything, it only
breaks the code up into easier to follow functions (which are commented).  I
After looking at the old assembler code: Thanks!

am going to test it on a few more platforms and then apply it tomorrow if no
one has any objections.  Having it broken up into functions should make it
easier to change (e.g. adding NV to the constants table).
Current assembler ( Wed Sep 26 01:00:02 2001 UTC ) does not handle
binary ( 0b0101010 ) constants ( that's why bitwise tests were
failing for me ).
If you could have a quick look at it it would be great
( of course I can do it too, but since you are working on the assembler,
  probably is easier for you )
 
Regards
Mattia




Re: Updated Platforms Status

2001-09-26 Thread Mattia Barbon

On Wed, 26 Sep 2001, Buggs wrote:

===
 Win32
make ok / test ok
(with caveats: nmake doesn't do 'test' correctly, and 'clean' doesn't
work because of the 'rm' command)
use namke -a [1]; for the rm problem I posted a patch some time ago,
and Andy Dougherty posted anoter one about the same time, IIRC
 
Regards
Mattia

[1]
nmake does not support .PHONY; alternatively having
a dummy: target and makeing test depend on dummy should work




RE: new assemble.pl

2001-09-26 Thread Mattia Barbon

On Wed, 26 Sep 2001, Gibbs Tanton - tgibbs wrote:

It works for me and looks to be ok, can you tell me why you think binary
numbers are broken?
Sorry: I was unclear. 
I meant: the current assembly is broken here ( I have perl 5.005 BTW )
( debugging shows that the register is set to zero instead of say 12,
and if I change the assembly from 0b1100 to 12, the test passes )

I din't try the new assembler.

Mattia
-Original Message-
From: Mattia Barbon
To: Gibbs Tanton - tgibbs
Cc: '[EMAIL PROTECTED] '
Sent: 9/26/2001 2:44 AM
Subject: Re: new assemble.pl

On Wed, 26 Sep 2001, Gibbs Tanton - tgibbs wrote:

Attached is a new assemble.pl.  No, it doesn't change anything, it only
breaks the code up into easier to follow functions (which are
commented).  I
After looking at the old assembler code: Thanks!

am going to test it on a few more platforms and then apply it tomorrow
if no
one has any objections.  Having it broken up into functions should make
it
easier to change (e.g. adding NV to the constants table).
Current assembler ( Wed Sep 26 01:00:02 2001 UTC ) does not handle
binary ( 0b0101010 ) constants ( that's why bitwise tests were
failing for me ).
If you could have a quick look at it it would be great
( of course I can do it too, but since you are working on the assembler,
  probably is easier for you )
 
Regards
Mattia





[PATCH] rm -f in Win32

2001-09-26 Thread Mattia Barbon

Makes Win32 use ExtUtils::Command::rm_f as a rm -f replacemnt.

Regards
Mattia



Index: Configure.pl
===
RCS file: /home/perlcvs/parrot/Configure.pl,v
retrieving revision 1.19
diff -u -2 -r1.19 Configure.pl
--- Configure.pl2001/09/23 14:50:48 1.19
+++ Configure.pl2001/09/26 21:04:30
@@ -85,4 +85,5 @@
perl = $^X,
debugging =$opt_debugging,
+   rm_f = 'rm -f',
 );
 
Index: Makefile.in
===
RCS file: /home/perlcvs/parrot/Makefile.in,v
retrieving revision 1.14
diff -u -2 -r1.14 Makefile.in
--- Makefile.in 2001/09/26 18:13:50 1.14
+++ Makefile.in 2001/09/26 21:04:30
@@ -1,3 +1,4 @@
 O = ${o}
+RM_F = ${rm_f}
 
 INC=include/parrot
@@ -19,5 +20,5 @@
 PDUMP = pdump${exe}
 
-.c.o:
+.c$(O):
$(CC) $(CFLAGS) -o $@ -c $
 
@@ -64,9 +65,9 @@
$(PERL) make_op_header.pl opcode_table  $(INC)/op.h
 
-config.h: Configure.pl config_h.in
+$(INC)/config.h: Configure.pl config_h.in
$(PERL) Configure.pl
 
 clean:
-   rm -f *$(O) *.s basic_opcodes.c $(INC)/interp_guts.h $(INC)/op.h $(TEST_PROG)
+   $(RM_F) *$(O) *.s basic_opcodes.c $(INC)/interp_guts.h $(INC)/op.h $(TEST_PROG)
 
 test:
@@ -75,3 +76,2 @@
 update:
cvs -q update -dP
-
Index: hints/mswin32.pl
===
RCS file: /home/perlcvs/parrot/hints/mswin32.pl,v
retrieving revision 1.1
diff -u -2 -r1.1 mswin32.pl
--- hints/mswin32.pl2001/09/16 22:06:45 1.1
+++ hints/mswin32.pl2001/09/26 21:04:30
@@ -3,4 +3,5 @@
my $is_mingw = grep { $c{cc} eq $_ } ( qw(gcc gcc.exe) );
 
+$c{rm_f} = '$(PERL) -MExtUtils::Command -e rm_f';
if( $is_msvc ) {
$c{o} = '.obj';
@@ -15,3 +16,3 @@
$c{libs} = ' ' if $c{libs} =~ m/\.lib\s/i;
}
-}
\ No newline at end of file
+}



[PATCH] Parrot::Test

2001-09-26 Thread Mattia Barbon

Some cleanup, plus:
* detects assembler errors
* better output when tests are run manually
  and tests fail

Suggestions for the new output format are welcome

C:\Developement\perl6\parrotperl t/op/basic.t
1..5
not ok 1 - noop, end
# Failed test (t/op/basic.t at line 6)
### Got:
#=. non è riconosciuto come comando interno o esterno,
#= un programma eseguibile o un file batch.
### Expected:
#=
not ok 2 - print 1
# Failed test (t/op/basic.t at line 11)
### Got:
#=. non è riconosciuto come comando interno o esterno,
#= un programma eseguibile o un file batch.
### Expected:
#=1
not ok 3 - print string
# Failed test (t/op/basic.t at line 16)
### Got:

Regards
Mattia



Index: Parrot/Test.pm
===
RCS file: /home/perlcvs/parrot/Parrot/Test.pm,v
retrieving revision 1.4
diff -u -2 -r1.4 Test.pm
--- Parrot/Test.pm  2001/09/24 17:19:48 1.4
+++ Parrot/Test.pm  2001/09/26 21:17:57
@@ -10,7 +10,10 @@
 require Test::More;
 
-@EXPORT = ( qw(output_is output_like output_isnt), @Test::More::EXPORT );
+@EXPORT = ( qw(output_is skip) );
 @ISA = qw(Exporter Test::More);
 
+*TESTERR = *Test::More::TESTERR;
+*TESTOUT = *Test::More::TESTOUT;
+
 sub import {
   my( $class, $plan, @args ) = @_;
@@ -38,45 +41,78 @@
   }
 
-  system $^X -e \$redir_string;system q{$command};\;
+  system $^X -e \$redir_string;exit( ( system q{$command} )  8 );\;
 }
 
 my $count;
 
-foreach my $i ( qw(is isnt like) ) {
-  no strict 'refs';
+sub _print_lines {
+  my( $fh, $text ) = @_;
 
-  *{Parrot::Test::output_$i} = sub ($$;$) {
-++$count;
-my( $assembly, $output, $desc ) = @_;
-local( *ASSEMBLY, *OUTPUT );
-my( $as_f, $by_f, $out_f ) = map {
-  my $t = $0; $t =~ s/\.t$/$count\.$_/; $t
-} ( qw(pasm pbc out) );
-
-open ASSEMBLY,  $as_f or die Unable to open '$as_f';
-binmode ASSEMBLY;
-print ASSEMBLY $assembly;
-close ASSEMBLY;
-
-_run_command( $PConfig{perl} assemble.pl $as_f --output $by_f );
-_run_command( ./test_prog $by_f, 'STDOUT' = $out_f, 'STDERR' = $out_f);
-
-my $prog_output;
-open OUTPUT,  $out_f;
-{
-  local $/ = undef;
-  $prog_output = OUTPUT;
-}
-close OUTPUT;
-
-@_ = ( $prog_output, $output, $desc );
-#goto {Test::More::$i};
-my $ok = {Test::More::$i}( @_ );
-if( $ok ) { foreach my $i ( $as_f, $by_f, $out_f ) { unlink $i } }
-  }
+  $text =~ s/^/#=/mg;
+  $text =~ s/\n$//;
+  $text .= \n;
+
+  print $fh $text;
 }
 
-1;
+sub output_is($$;$) {
+  ++$count;
+  my( $assembly, $output, $desc ) = @_;
+  local( *ASSEMBLY, *OUTPUT );
+  my( $as_f, $by_f, $out_f ) = map {
+my $t = $0; $t =~ s/\.t$/$count\.$_/; $t
+  } ( qw(pasm pbc out) );
+
+  # remove leftover from previous tests
+  foreach my $i ( $as_f, $by_f, $out_f ) { unlink $i };
+
+  open ASSEMBLY,  $as_f or die Unable to open '$as_f';
+  binmode ASSEMBLY;
+  print ASSEMBLY $assembly;
+  close ASSEMBLY;
+
+  _run_command( $PConfig{perl} assemble.pl $as_f --output $by_f );
+  if( $?  8 ) {
+my $ok = ok( 0, $desc );
+print EOT;
+# assembler returned a non zero status
+EOT
+return $ok;
+  }
+  unless( -f $by_f ) {
+my $ok = ok( 0, $desc );
+print EOT;
+# bytecode file missing
+EOT
+return $ok;
+  }
+  _run_command( ./test_prog $by_f, 'STDOUT' = $out_f, 'STDERR' = $out_f);
 
+  my $prog_output;
+  open OUTPUT,  $out_f;
+  {
+local $/ = undef;
+$prog_output = OUTPUT;
+  }
+  close OUTPUT;
+
+  if( $prog_output eq $output ) {
+foreach my $i ( $as_f, $by_f, $out_f ) { unlink $i };
+@_ = ( 1, $desc );
+goto ok;
+  }
 
+  my $ok = ok( 0, $desc );
+  print TESTERR EOT;
+### Got:
+EOT
+  _print_lines *TESTERR, $prog_output;
+  print TESTERR EOT;
+### Expected:
+EOT
+  _print_lines *TESTERR, $output;
 
+  return $ok;
+}
+
+1;



RE: [COMMIT] Preparation for putting NVs in const_table.

2001-09-26 Thread Mattia Barbon

 with CygWin everything works ok...however I get a ton of warnings for
 packfile.c that look like they need to be addressed...I'll look at them
 soon.  Also, when I type make test it tells me that test doesn't need to do
 anything; this was happening before these changes, but I was wondering if
 anyone knew what was wrong.
Case insensitivity: we have a Test directory, but in Win32/Cygwin,
it matches test, so there is a test file, and it does not need
remaking.

test: dummy
dummy:

will work ( not all makes support .PHONY:, sigh! )

Regards
Mattia



Re: Quick Test hack for someone

2001-09-25 Thread Mattia Barbon

On Mon, 24 Sep 2001, Simon Cozens wrote:

When tests fail for Really Bad reasons, they tend to do something like this:

Got: '
'
Expected: '
ok 1
...
'

It'd be really nice if we could intercept that and give more detail on why
the test failed. Did the assembler compile to a PBC ok? Did the interpreter
segfault? (This is what usually happens.) Or did something else happen?
Planning that for post 0.02. do you want that in before?
I can do it sooner.

Would make debugging a lot quicker.

Regards
Mattia




(Fwd) Parrot Smoke Sep 25 19:00:04 2001 UTC MSWin32 4.0

2001-09-25 Thread Mattia Barbon


--- Forwarded message follows ---
To: [EMAIL PROTECTED]
From:   [EMAIL PROTECTED]
Subject:Parrot Smoke Sep 25 19:00:04 2001 UTC MSWin32 4.0
Date sent:  Tue, 25 Sep 2001 22:00:03 +0200

Automated smoke report for patch Sep 25 19:00:04 2001 UTC
  v0.01 on MSWin32 using cl version 
O = OK
F = Failure(s), extended report at the bottom
? = still running or test results not (yet) available
Build failures during:   - = unknown
c = Configure, m = make, t = make test-prep

 Configuration
---  
O O  
O O  nv=double
O O  nv=\long double\
O O  iv=int
O O  iv=int nv=double
O O  iv=int nv=\long double\
O O  iv=long
O O  iv=long nv=double
O O  iv=long nv=\long double\
| |
| +- --debugging
+--- normal
--- End of forwarded message ---



RE: Strings db

2001-09-24 Thread Mattia Barbon

  GNU does offer the gettext tools library for just such a purpose. I don't
  know how it will translate to the various platforms however, and it likely
  is a major overkill for what we are trying to do.
  http://www.gnu.org/manual/gettext/html_mono/gettext.html#SEC2 - Purpose
  It might make sense to implement something like this now, rather than create
  our own system and find out it is insufficient down the road.
  Just a thought,
  Grant M.
 
 But wouldn't that make parrot GPL'd?
You could use the gettext tools to generate the catalogs,
and reimplement the part that reads the strings from the catalog.
wxWindows does just that.

Regards
Mattia



(Fwd) Parrot Smoke Sep 23 07:00:00 2001 UTC dec_osf 4.0

2001-09-23 Thread Mattia Barbon

:(
I just tried and the Sun Sep 23 13:00:00 2001 UTC
segfaults all the way in t/op/number.t and t/op/trans.t,
( IV = long, NV = double )
( other tests are 100% OK ), so there are problems
with floats. Tomorrow at the university
I can debug the problem
( debugging over a dialup is a pain... )

Regards
Mattia
--- Forwarded message follows ---
Date sent:  Sun, 23 Sep 2001 12:13:19 +0200
From:   Barbon Mattia [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject:Parrot Smoke Sep 23 07:00:00 2001 UTC dec_osf 4.0

Automated smoke report for patch Sep 23 07:00:00 2001 UTC
  v0.01 on dec_osf using gcc version 2.8.1
O = OK
F = Failure(s), extended report at the bottom
? = still running or test results not (yet) available
Build failures during:   - = unknown
c = Configure, m = make, t = make test-prep

 Configuration
---  
F F  --defaults --define cc=gcc --define ccflags='-O3 -Iinclude' --define iv=int 
--define nv=double
F F  --defaults --define cc=gcc --define ccflags='-O3 -Iinclude' --define iv=int 
--define nv=\long double\
F F  --defaults --define cc=gcc --define ccflags='-O3 -Iinclude' --define iv=long 
--define nv=double
F F  --defaults --define cc=gcc --define ccflags='-O3 -Iinclude' --define iv=long 
--define nv=\long double\
F F  --defaults --define cc=gcc --define ccflags='-O3 -Iinclude' --define iv=\long 
long\ --define nv=double
F F  --defaults --define cc=gcc --define ccflags='-O3 -Iinclude' --define iv=\long 
long\ --define nv=\long double\
| |
| +- --debugging
+--- normal

Failures:

dec_osf  --defaults --define cc=gcc --define ccflags='-O3 -Iinclude' --define 
iv=int --define nv=double
dec_osf  --debugging --defaults --define cc=gcc --define ccflags='-O3 -Iinclude' 
--define iv=int --define nv=double
dec_osf  --defaults --define cc=gcc --define ccflags='-O3 -Iinclude' --define 
iv=int --define nv=\long double\
dec_osf  --debugging --defaults --define cc=gcc --define ccflags='-O3 -Iinclude' 
--define iv=int --define nv=\long double\
t/op/basic..dubious DIED. FAILED test 1
t/op/string.dubious DIED. FAILED tests 1-3, 5
t/op/trans..dubious DIED. FAILED tests 1-18

dec_osf  --defaults --define cc=gcc --define ccflags='-O3 -Iinclude' --define 
iv=long --define nv=double
dec_osf  --debugging --defaults --define cc=gcc --define ccflags='-O3 -Iinclude' 
--define iv=long --define nv=double
dec_osf  --defaults --define cc=gcc --define ccflags='-O3 -Iinclude' --define 
iv=long --define nv=\long double\
dec_osf  --debugging --defaults --define cc=gcc --define ccflags='-O3 -Iinclude' 
--define iv=long --define nv=\long double\
dec_osf  --defaults --define cc=gcc --define ccflags='-O3 -Iinclude' --define 
iv=\long long\ --define nv=double
dec_osf  --debugging --defaults --define cc=gcc --define ccflags='-O3 -Iinclude' 
--define iv=\long long\ --define nv=double
dec_osf  --defaults --define cc=gcc --define ccflags='-O3 -Iinclude' --define 
iv=\long long\ --define nv=\long double\
dec_osf  --debugging --defaults --define cc=gcc --define ccflags='-O3 -Iinclude' 
--define iv=\long long\ --define nv=\long double\
t/op/trans..dubious DIED. FAILED tests 1-18


--- End of forwarded message ---



Re: (Fwd) Parrot Smoke Sep 23 07:00:00 2001 UTC dec_osf 4.0

2001-09-23 Thread Mattia Barbon

 Cool; thanks for this. Can you add a row to your smoke configuration
 which does *not* change the default type sizes?
Sure. WRT segfaults, I think I found the cause for the problems:
The files inf cvs.perl.org/snapshots seem out of date.

$ diff -u parrot/assemble.pl ../parrot.cvs/assemble.pl | head -n 20
--- parrot/assemble.pl  Fri Sep 21 09:00:00 2001
+++ ../parrot.cvs/assemble.pl   Sat Sep 22 23:45:32 2001
@@ -7,6 +7,8 @@
 use strict;
 use Getopt::Long;
 use Parrot::Opcode;
+use Parrot::Types;
+use Parrot::PackFile::ConstTable;
 use Parrot::Config;
 use Symbol;

parrot/assemble.pl ( Fri Sep 21 09:00:00 2001 ) is from
parrot-latest.tar.gz ( 23-Sep-2001 06:00 ), while
../parrot.cvs/assemble.pl  ( Sat Sep 22 23:45:32 2001 )
if from a fresh CVS checkout: notice that the file from CVS
is a day newer than the one in parrot-latest.tar.gz ( either
the tgz and the rsync ). 

Sorry for the false alarm.
Mattia



(Fwd) Parrot Smoke Sep 22 07:00:00 2001 UTC linux 2.2.15pre14

2001-09-22 Thread Mattia Barbon

This looks really nice...

Regards
Mattia
--- Forwarded message follows ---
Automated smoke report for patch Sep 22 07:00:00 2001 UTC
  v0.01 on linux using cc version 2.95.2 2313 (Debian GNU/Linux)
O = OK
F = Failure(s), extended report at the bottom
? = still running or test results not (yet) available
Build failures during:   - = unknown
c = Configure, m = make, t = make test-prep

 Configuration
---  
O O  libs=-lm iv=int nv=double
O O  libs=-lm iv=long nv=double
| |
| +- --debugging
+--- normal

--- End of forwarded message ---



(Fwd) Parrot Smoke Sep 22 07:00:00 2001 UTC MSWin32 4.0

2001-09-22 Thread Mattia Barbon

t/op/number.t is basically testing that
the rounding behaviour is the same across all
platforms. This is ***wrong***.

Regards
Mattia
--- Forwarded message follows ---
To: [EMAIL PROTECTED]
From:   [EMAIL PROTECTED]
Subject:Parrot Smoke Sep 22 07:00:00 2001 UTC MSWin32 4.0
Date sent:  Sat, 22 Sep 2001 11:51:13 +0200

Automated smoke report for patch Sep 22 07:00:00 2001 UTC
  v0.01 on MSWin32 using cl version 
O = OK
F = Failure(s), extended report at the bottom
? = still running or test results not (yet) available
Build failures during:   - = unknown
c = Configure, m = make, t = make test-prep

 Configuration
---  
F F  iv=int nv=double
F F  iv=int nv=\long double\
F F  iv=long nv=double
F F  iv=long nv=\long double\
| |
| +- --debugging
+--- normal

Failures:

MSWin32  iv=int nv=double
MSWin32  --debugging iv=int nv=double
MSWin32  iv=int nv=\long double\
MSWin32  --debugging iv=int nv=\long double\
MSWin32  iv=long nv=double
MSWin32  --debugging iv=long nv=double
MSWin32  iv=long nv=\long double\
MSWin32  --debugging iv=long nv=\long double\
t/op/number.dubious DIED. FAILED test 1

--- End of forwarded message ---



New list for smoke reports?

2001-09-22 Thread Mattia Barbon

I'd be sending 3 smoke reports ( Win2k/MSVC, x86/Linux,
Alphs/Tru64/GCC ) per snapshot, and maybe I will
start on cygwin and Win2k/MinGW, too.
Before I spam everyone with this,
is someone interested in it, and if so,
should I continue sending it to perl6-internals,
or is is preferable a different ML?

Regards
Mattia




(Fwd) Parrot Smoke Sep 22 13:00:00 2001 UTC dec_osf 4.0

2001-09-22 Thread Mattia Barbon


--- Forwarded message follows ---
Automated smoke report for patch Sep 22 13:00:00 2001 UTC
  v0.01 on dec_osf using gcc version 2.95.2
O = OK
F = Failure(s), extended report at the bottom
? = still running or test results not (yet) available
Build failures during:   - = unknown
c = Configure, m = make, t = make test-prep

 Configuration
---  
F F  cc=gcc ccflags=\-O3 -Iinclude\ iv=int nv=double
F F  cc=gcc ccflags=\-O3 -Iinclude\ iv=int nv=\long double\
F F  cc=gcc ccflags=\-O3 -Iinclude\ iv=long nv=double
F F  cc=gcc ccflags=\-O3 -Iinclude\ iv=long nv=\long double\
F F  cc=gcc ccflags=\-O3 -Iinclude\ iv=\long long\ nv=double
F F  cc=gcc ccflags=\-O3 -Iinclude\ iv=\long long\ nv=\long double\
| |
| +- --debugging
+--- normal

Failures:

dec_osf  --defaults --define cc=gcc --define ccflags=\-O3 -Iinclude\ --define 
iv=int --define nv=double
dec_osf  --debugging --defaults --define cc=gcc --define ccflags=\-O3 -Iinclude\ 
--define iv=int --define nv=double
dec_osf  --defaults --define cc=gcc --define ccflags=\-O3 -Iinclude\ --define 
iv=int --define nv=\long double\
dec_osf  --debugging --defaults --define cc=gcc --define ccflags=\-O3 -Iinclude\ 
--define iv=int --define nv=\long double\
t/op/basic..dubious DIED. FAILED test 1
t/op/string.dubious DIED. FAILED tests 1-3, 5
t/op/trans..dubious DIED. FAILED tests 1-18

dec_osf  --defaults --define cc=gcc --define ccflags=\-O3 -Iinclude\ --define 
iv=long --define nv=double
dec_osf  --debugging --defaults --define cc=gcc --define ccflags=\-O3 -Iinclude\ 
--define iv=long --define nv=double
dec_osf  --defaults --define cc=gcc --define ccflags=\-O3 -Iinclude\ --define 
iv=long --define nv=\long double\
dec_osf  --debugging --defaults --define cc=gcc --define ccflags=\-O3 -Iinclude\ 
--define iv=long --define nv=\long double\
dec_osf  --defaults --define cc=gcc --define ccflags=\-O3 -Iinclude\ --define 
iv=\long long\ --define nv=double
dec_osf  --debugging --defaults --define cc=gcc --define ccflags=\-O3 -Iinclude\ 
--define iv=\long long\ --define nv=double
dec_osf  --defaults --define cc=gcc --define ccflags=\-O3 -Iinclude\ --define 
iv=\long long\ --define nv=\long double\
dec_osf  --debugging --defaults --define cc=gcc --define ccflags=\-O3 -Iinclude\ 
--define iv=\long long\ --define nv=\long double\
t/op/trans..dubious DIED. FAILED tests 1-18


--- End of forwarded message ---



(Fwd) Re: Tru64 Numeric bug exposed!

2001-09-22 Thread Mattia Barbon

GRRR... always use reply yo all...

--- Forwarded message follows ---
From:   Mattia Barbon [EMAIL PROTECTED]
To: Simon Cozens [EMAIL PROTECTED]
Subject:Re: Tru64 Numeric bug exposed!
Copies to:  [EMAIL PROTECTED], [EMAIL PROTECTED]
Send reply to:  [EMAIL PROTECTED]
Date sent:  Sat, 22 Sep 2001 23:55:52 +0200

 On Sat, Sep 22, 2001 at 05:31:50PM +0100, Simon Cozens wrote:
  Unfortunately, I do not have the slightest idea why that is failing...
 
 That's failing because the test is way bogus. Mattia, consider yourself
 slapped - 4.61168601842739e+18 is only 4611686018427389952.00 
If that is a bad thing, I must say that the test did not came from
me, and it is 2 days that I complain for that...
If that is a good thing, then thanks... :)
( sorry, but I only studied french at school, and the vucabulary
  is somewhere in my sister's room... )

 platforms like x86. :) Fixing up the test to be less rigorous is a bit
Oh, not really: it is 4611686018427389952.00 on broken Linux/x86,
but it is (*put something terminating with 000.0--don't have
the log at hand--) on x86/Win32... ( FYI the Linux box is a
Pentium ( w/o FDIV bug, with F00F bug ), and the Win2k one
is a PIII, but I don't think that makes a difference )

 of a hack, but I'm not sure I agree with the idea behind the test in the
 first place.
Nor am I

Regards
Mattia
--- End of forwarded message ---



Re: cvs commit: parrot/Test More.pm Simple.pm Utils.pm

2001-09-22 Thread Mattia Barbon

 cvsuser 01/09/22 10:20:59
 
   Modified:.Makefile.in
   Added:   Test More.pm Simple.pm Utils.pm
   Log:
   I'm sick of having to install Test::More everywhere. Temporary measure
   until we remove this silly dependency.
I promise I'll do it after 0.02 is out.

Mattia




Re: (Fwd) Parrot Smoke Sep 22 19:00:00 2001 UTC dec_osf 4.0

2001-09-22 Thread Mattia Barbon

 On Sun, Sep 23, 2001 at 12:27:53AM +0200, Mattia Barbon wrote:
  [parrpt]$ perl Configure.pl --defaults --define cc=gcc --define 
  ccflags=-O3 -Iinclude --define iv=long --define nv=double
  [parrot]$ make
  [parrot]$ for i in t/op/number*.pbc ; do ./test_prog $i; done
 
 Whoa - did you re-assemble the .pasm files since updating?

 I've had this working perfectly on Tru64 Alpha today.
Maybe the last fixes are not in the snapshot ( I use them for
smoking )

I'll see the next one

Regards
Mattia



t/op/number.t output confuses Test::Harnss

2001-09-21 Thread Mattia Barbon

not ok 15 - gt_nc_ic
# Failed test (Parrot/Test.pm at line 74)
#  got: undef
# expected: 'ok 1
ok 2
ok 3
'

So Test::Harenss keeps whining about test 2 answrd ( yes, the PC
with the brokn keyboard again ) after test 9, and such.

Could output be changed to anyting else?

Thanks
Mattia




Parrot Smoke Sep 21 07:00:01 2001 UTC dec_osf 4.0 (fwd)

2001-09-21 Thread Mattia Barbon

It is gcc 2.95.2, not 2.8.1
*SMACK* to anyone kept the perl scripts
compatible with perl 5.004_04

Regards
Mattia

P.S.: Suggstions about how to make report lins shorter
  *VERY* welcome
-- Forwarded message --
Automated smoke report for patch Sep 21 07:00:01 2001 UTC
  v0.01 on dec_osf using gcc version 2.8.1
O = OK
F = Failure(s), extended report at the bottom
? = still running or test results not (yet) available
Build failures during:   - = unknown
c = Configure, m = make, t = make test-prep

 Configuration
---  
F F  --defaults --define cc=gcc --define ccflags=\-O3 -Iinclude\ --define iv=int 
--define nv=double
F F  --defaults --define cc=gcc --define ccflags=\-O3 -Iinclude\ --define iv=int 
--define nv=\long double\
F F  --defaults --define cc=gcc --define ccflags=\-O3 -Iinclude\ --define iv=long 
--define nv=double
F F  --defaults --define cc=gcc --define ccflags=\-O3 -Iinclude\ --define iv=long 
--define nv=\long double\
F F  --defaults --define cc=gcc --define ccflags=\-O3 -Iinclude\ --define iv=\long 
long\ --define nv=double
F F  --defaults --define cc=gcc --define ccflags=\-O3 -Iinclude\ --define iv=\long 
long\ --define nv=\long double\
| |
| +- --debugging
+--- normal

Failures:

dec_osf  --defaults --define cc=gcc --define ccflags=\-O3 -Iinclude\ --define 
iv=int --define nv=double
dec_osf  --debugging --defaults --define cc=gcc --define ccflags=\-O3 -Iinclude\ 
--define iv=int --define nv=double
dec_osf  --defaults --define cc=gcc --define ccflags=\-O3 -Iinclude\ --define 
iv=int --define nv=\long double\
dec_osf  --debugging --defaults --define cc=gcc --define ccflags=\-O3 -Iinclude\ 
--define iv=int --define nv=\long double\
t/op/basic..dubious DIED. FAILED test 1
t/op/integerdubious DIED. FAILED tests 1-26
t/op/number.dubious DIED. FAILED tests 1-19, 21, 23
t/op/string.dubious DIED. FAILED tests 1-3, 5
t/op/trans..dubious DIED. FAILED tests 1-18

dec_osf  --defaults --define cc=gcc --define ccflags=\-O3 -Iinclude\ --define 
iv=long --define nv=double
dec_osf  --debugging --defaults --define cc=gcc --define ccflags=\-O3 -Iinclude\ 
--define iv=long --define nv=double
dec_osf  --defaults --define cc=gcc --define ccflags=\-O3 -Iinclude\ --define 
iv=long --define nv=\long double\
dec_osf  --debugging --defaults --define cc=gcc --define ccflags=\-O3 -Iinclude\ 
--define iv=long --define nv=\long double\
dec_osf  --defaults --define cc=gcc --define ccflags=\-O3 -Iinclude\ --define 
iv=\long long\ --define nv=double
dec_osf  --debugging --defaults --define cc=gcc --define ccflags=\-O3 -Iinclude\ 
--define iv=\long long\ --define nv=double
dec_osf  --defaults --define cc=gcc --define ccflags=\-O3 -Iinclude\ --define 
iv=\long long\ --define nv=\long double\
dec_osf  --debugging --defaults --define cc=gcc --define ccflags=\-O3 -Iinclude\ 
--define iv=\long long\ --define nv=\long double\
t/op/number.dubious DIED. FAILED tests 1, 3-17





RE: Parrot Smoke Sep 20 00:00:02 2001 MSWin32 4.0

2001-09-21 Thread Mattia Barbon

   'C:Perinperl.exe' is not recognized as an internal or external command,
 operable program or batch file.
Apply this for the C:Perinperl.exe problem

Sorry for the inconvenience.
Mattia

Index: Parrot/Test.pm
===
RCS file: /home/perlcvs/parrot/Parrot/Test.pm,v
retrieving revision 1.2
diff -u -2 -r1.2 Test.pm
--- Parrot/Test.pm  2001/09/20 14:39:17 1.2
+++ Parrot/Test.pm  2001/09/21 12:31:15
@@ -38,5 +38,5 @@
   }

-  system $^X -e \$redir_string;system qq{$command};\;
+  system $^X -e \$redir_string;system q{$command};\;
 }




[PATCH] Minimal changes required for smoking

2001-09-20 Thread Mattia Barbon

These are the minimal fixes for smoking to take effect.
After these are in, I'll release Parrot::Smoke

* Makefile.in
* it is $(INC)/config.h, not config.h
* .o = $(O)
* test_main.c
* _read was ok when it was inside
  ifdef WIN32
  now it must be read ( or it fails in
  non-win32 pre-5.6.0 systems )
* t/op/integer.t
* you *can't* test 0x == -1
  ( and the whole first test looks
very suspicious )

Regards
Mattia



--- parrot.cvs/Makefile.in  Thu Sep 20 00:54:46 2001
+++ parrot/Makefile.in  Thu Sep 20 15:35:14 2001
@@ -19,5 +19,5 @@
 PDUMP = pdump${exe}
 
-.c.o:
+.c$(O):
$(CC) $(CFLAGS) -o $@ -c $
 
@@ -66,5 +66,5 @@
$(PERL) make_op_header.pl opcode_table  $(INC)/op.h
 
-config.h: Configure.pl config_h.in
+$(INC)/config.h: Configure.pl config_h.in
$(PERL) Configure.pl
 
--- parrot.cvs/test_main.c  Thu Sep 20 15:27:42 2001
+++ parrot/test_main.c  Thu Sep 20 15:27:18 2001
@@ -95,5 +95,5 @@
 #ifndef HAS_HEADER_SYSMMAN
 program_code = (opcode_t*)mem_sys_allocate(program_size);
-_read(fd, (void*)program_code, program_size);
+read(fd, (void*)program_code, program_size);
 #else
 program_code = (opcode_t*)mmap(0, program_size, PROT_READ, MAP_SHARED, fd, 0);
--- parrot.cvs/t/op/integer.t   Thu Sep 20 15:25:46 2001
+++ parrot/t/op/integer.t   Thu Sep 20 15:25:04 2001
@@ -19,7 +19,4 @@
print   I2
print   \\n
-   set I3, 4294967295
-   print   I3
-   print   \\n
end
 CODE
@@ -28,5 +25,4 @@
 2147483647
 -2147483648
--1
 OUTPUT
 



Parrot Smoke Sep 20 00:00:02 2001 MSWin32 4.0

2001-09-20 Thread Mattia Barbon

Automated smoke report for patch Sep 20 00:00:02 2001
  v0.01 on MSWin32 using cl version 
O = OK
F = Failure(s), extended report at the bottom
? = still running or test results not (yet) available
Build failures during:   - = unknown
c = Configure, m = make, t = make test-prep

 Configuration
---  
F F  --defaults --define iv=int --define nv=float
F F  --defaults --define iv=int --define nv=double
F F  --defaults --define iv=int --define nv=\long double\
F F  --defaults --define iv=long --define nv=float
F F  --defaults --define iv=long --define nv=double
F F  --defaults --define iv=long --define nv=\long double\
| |
| +- --debugging
+--- normal

Failures:

MSWin32  --defaults --define iv=int --define nv=float
MSWin32  --debugging --defaults --define iv=int --define nv=float
t/op/integerdubious DIED. FAILED test 25
t/op/number.dubious DIED. FAILED tests 1-5, 9-18, 23
t/op/trans..dubious DIED. FAILED tests 1-18

MSWin32  --defaults --define iv=int --define nv=double
MSWin32  --debugging --defaults --define iv=int --define nv=double
MSWin32  --defaults --define iv=int --define nv=\long double\
MSWin32  --debugging --defaults --define iv=int --define nv=\long double\
t/op/number.dubious DIED. FAILED test 1

MSWin32  --defaults --define iv=long --define nv=float
MSWin32  --debugging --defaults --define iv=long --define nv=float
t/op/integerdubious DIED. FAILED test 25
t/op/number.dubious DIED. FAILED tests 1-5, 9-18, 23
t/op/trans..dubious DIED. FAILED tests 1-18

MSWin32  --defaults --define iv=long --define nv=double
MSWin32  --debugging --defaults --define iv=long --define nv=double
MSWin32  --defaults --define iv=long --define nv=\long double\
MSWin32  --debugging --defaults --define iv=long --define nv=\long double\
t/op/number.dubious DIED. FAILED test 1




Re: cvs snapshots

2001-09-19 Thread Mattia Barbon

 On Tue, 18 Sep 2001, H.Merijn Brand wrote:
 
  On Mon 17 Sep 2001 23:08, Ask Bjoern Hansen [EMAIL PROTECTED] wrote:
   
   oops, I forgot to tell anyone.  I made CVS export and tar up a
   snapshot every 6 hours. It is available at
   http://cvs.perl.org/snapshots/parrot/
  
  Any chance on rsync? If so, I might set up another smoke suite to bother you
  with reports :)
 
 rsync -av cvs.perl.org::parrot-HEAD parrot
For smoking it'll be nice to hace some file with a timestamp of the
checkout, i.e. in the script do something like

cvs update -D some_date
echo some_date  .timestamp

or something like this, to make the checkout reproducible.
In perl5 there is the .patch; since cvs does not have
aniything like that, I need something to identificate
the snapshot the smoke was run against.

Thanks!
Mattia



Not yet automated Smoke report

2001-09-19 Thread Mattia Barbon

here it is.
I'll release Parrot::Smoke 0.01 tomorrow,
promise.

*PLEASE* - change _read to read in test_main.c
 - correct integer.t, test 1
   not to test 0x == -1
   ( that's why we have got all F... )
Regards
Mattia



Automated smoke report for patch ?
  v1.08 on linux using cc version 2.95.2 2313 (Debian GNU/Linux)
O = OK
F = Failure(s), extended report at the bottom
? = still running or test results not (yet) available
Build failures during:   - = unknown
c = Configure, m = make, t = make test-prep

 Configuration
---  
F F  --defaults --define libs=-lm --define iv=int --define nv=double
F F  --defaults --define libs=-lm --define iv=long --define nv=double
| |
| +- --debugging
+--- normal

Failures:

linux--defaults --define libs=-lm --define iv=int --define nv=double
linux--debugging --defaults --define libs=-lm --define iv=int --define 
nv=double
linux--defaults --define libs=-lm --define iv=long --define nv=double
linux--debugging --defaults --define libs=-lm --define iv=long --define 
nv=double
t/op/integerdubious DIED. FAILED test 1




[PATCH] Win32/perl 5.004/other

2001-09-18 Thread Mattia Barbon

This patch contains different things.
If you prefer three smaller patches,
just speak, I'll resend.

* Configure.pl
  * 5.004_04 does not have $Config{_o}, $Config{_exe},
use obj_ext, and exe_ext
  * Use ExtUtils::Manifest for manifest parsing
( now you can put blank lines/comments/
  file descriptions in MANIFEST )
  * add rm_f configuration variable
( WIndows, as usual, is different )
* MANIFEST, MANIFEST.SKIP
  * updates, skip CVS-related files
in fullcheck
* Makefile.in
  * some cleanup
  * new targets:
distclean, to remove configure-generated files
fullcheck, to do a ExtUtils::Manifest::fullcheck
* hints/mswin32.pl
  * added rm_f
* test_main.c
  * renamed _read to read

Regards
Mattia



diff -r -u -2 -N -xCVS -x.#* -xop.h -x*.orig -x*.rej -x*~ parrot.cvs/Configure.pl 
parrot/Configure.pl
--- parrot.cvs/Configure.pl Tue Sep 18 21:45:08 2001
+++ parrot/Configure.pl Tue Sep 18 21:43:04 2001
@@ -7,4 +7,5 @@
 use Config;
 use Getopt::Long;
+use ExtUtils::Manifest;
  
 my( $opt_debugging, $opt_defaults, $opt_version, $opt_help ) = ( 0, 0, 0, 0 );
@@ -69,10 +70,11 @@
perl = $^X,
cc_debug = '-g',
-   o ='.o',   # object files extension
-   exe =  $Config{_exe},
+   o =$Config{obj_ext}, # object files extension
+   exe =  $Config{exe_ext},
ld =   $Config{ld},
ld_out =   '-o ',  # ld output file
ld_debug = '', # include debug info in executable
debugging =$opt_debugging,
+   rm_f = 'rm -f',# remove files
 );
 
@@ -211,11 +213,10 @@
 
 sub check_manifest {
+   my $files = ExtUtils::Manifest::maniread( 'MANIFEST' );
my $not_ok;
-   open(MANIFEST, MANIFEST);
 
-   while(MANIFEST) {
-   chomp;
-   unless(-e $_) {
-   print File $_ is missing!\n;
+   foreach my $i ( keys %$files ) {
+   unless( -e $i) {
+   print File $i is missing!\n;
$not_ok=1;
}
diff -r -u -2 -N -xCVS -x.#* -xop.h -x*.orig -x*.rej -x*~ parrot.cvs/MANIFEST 
parrot/MANIFEST
--- parrot.cvs/MANIFEST Tue Sep 18 14:53:20 2001
+++ parrot/MANIFEST Tue Sep 18 15:53:06 2001
@@ -3,5 +3,7 @@
 Makefile.in
 MANIFEST
+MANIFEST.SKIP
 Parrot/Opcode.pm
+Parrot/Test.pm
 Parrot/PackFile.pm
 Parrot/PackFile/Constant.pm
@@ -23,4 +25,6 @@
 docs/strings.pod
 docs/vtables.pod
+docs/parrot_assembly.pod
+hints/mswin32.pl
 include/parrot/events.h
 include/parrot/exceptions.h
@@ -50,4 +54,9 @@
 t/euclid.pasm
 t/jump.pasm
+t/local_label.pasm
+t/Makefile
+t/harness
+t/op/basic.t
+t/op/string.t
 test_main.c
 little_languages/euclid.jako
diff -r -u -2 -N -xCVS -x.#* -xop.h -x*.orig -x*.rej -x*~ parrot.cvs/MANIFEST.SKIP 
parrot/MANIFEST.SKIP
--- parrot.cvs/MANIFEST.SKIPThu Jan  1 01:00:00 1970
+++ parrot/MANIFEST.SKIPTue Sep 18 15:42:04 2001
@@ -0,0 +1,3 @@
+[Cc][Vv][Ss]/
+\.\#.*[\d\.]+
+\.cvsignore
diff -r -u -2 -N -xCVS -x.#* -xop.h -x*.orig -x*.rej -x*~ parrot.cvs/Makefile.in 
parrot/Makefile.in
--- parrot.cvs/Makefile.in  Tue Sep 18 21:45:08 2001
+++ parrot/Makefile.in  Tue Sep 18 21:43:04 2001
@@ -1,3 +1,4 @@
 O = ${o}
+RM_F = ${rm_f}
 
 INC=include/parrot
@@ -18,5 +19,5 @@
 TEST_PROG = test_prog${exe}
 
-.c.o:
+.c$(O):
$(CC) $(CFLAGS) -o $@ -c $
 
@@ -60,11 +61,17 @@
$(PERL) make_op_header.pl opcode_table  $(INC)/op.h
 
-config.h: Configure.pl config_h.in
+$(INC)/config.h: Configure.pl config_h.in
$(PERL) Configure.pl
 
 clean:
-   rm -f *$(O) *.s basic_opcodes.c $(INC)/interp_guts.h $(INC)/op.h $(TEST_PROG)
+   $(RM_F) *$(O) *.s basic_opcodes.c $(INC)/interp_guts.h $(INC)/op.h $(TEST_PROG)
 
-test:
+distclean: clean
+   $(RM_F) Parrot/Config.pm include/parrot/config.h
+
+fullcheck:
+   $(PERL) -MExtUtils::Manifest=fullcheck -e fullcheck
+
+test: $(TEST_PROG)
$(PERL) t/harness
 
diff -r -u -2 -N -xCVS -x.#* -xop.h -x*.orig -x*.rej -x*~ parrot.cvs/hints/mswin32.pl 
parrot/hints/mswin32.pl
--- parrot.cvs/hints/mswin32.pl Mon Sep 17 00:06:44 2001
+++ parrot/hints/mswin32.pl Tue Sep 18 22:05:58 2001
@@ -3,4 +3,6 @@
my $is_mingw = grep { $c{cc} eq $_ } ( qw(gcc gcc.exe) );
 
+$c{rm_f} = '$(PERL) -MExtUtils::Command -e rm_f';
+
if( $is_msvc ) {
$c{o} = '.obj';
@@ -10,4 +12,6 @@
}
elsif( $is_mingw ) {
+$c{o} = '.o';
+$c{perl} =~ tr{\\}{/}; # GNU make hates \
$c{ld} = 'gcc';
# if your perl is ActivePerl, then libs are .lib files,
@@ -15,3 +19,3 @@
$c{libs} = ' ' if $c{libs} =~ m/\.lib\s/i;
}
-}
\ No newline at end of file
+}
diff -r -u -2 -N -xCVS -x.#* -xop.h -x*.orig -x*.rej -x*~ parrot.cvs/process_opfunc.pl 
parrot/process_opfunc.pl
--- 

Re: [PATCH Makefile.in] RE: [doughera@lafayette.edu: Re: bytecode and sizeof(IV)]

2001-09-18 Thread Mattia Barbon

 Easy Makefile.in patch.  I was worried that Win32 might need the linker
 (the change to $(LD) was submitted as part of a Win32 compatibility
 patch) but that doesn't seem to be the case.  I don't have a MinGW
Fine here

Regards
Mattia




t/op/integer.t is IMHO wrong

2001-09-18 Thread Mattia Barbon

set I2, -2147483648
print   I2
print   \\n
set I3, 4294967295
print   I3
print   \\n
end
CODE
305419896
-1698898191
2147483647
-2147483648
-1
OUTPUT

I think that especting 4294967295 == -1 because they have the same 
bit pattern ( on two's complement 32 bit machines ) is wrong

Regards
Mattia




substr ( or assembler ) oddness

2001-09-17 Thread Mattia Barbon

there is something wrong with, uh, something...
Currently substr is named substr_s_s_i.
if I write substr_s_s_i S9, S1, I0, I1, all is good.
if I write substr S9, S1, I0, I1, I get an assembler error.

Questions:
* All opcodes include the destination register type in the name
  why substr is diffeent?
* if I rename substr_s_s_i to substr_s_i_i, then the assembler
  parses substr S9, S1, I0, I1 correctly, is the assembler wrong?
* if I rename substr_s_s_i to substr_s_s_i_i then the parser
  does not parse substr S9, S1, I0, I1 correctly, is the assembler
  wrong?

Regards
Mattia



[PATCH] testsuite ( resubmit )

2001-09-16 Thread Mattia Barbon

Changes from the last one:
* some tidying in the assembly 
  ( now uses set I4, 4 instead of set_i_ic I4, 4 )
* moved lib/Test/Parrot.pm to Parrot/Test.pm
* now run with perl t/harness

Regards
Mattia




diff -r -b -u -2 -N parrot.cvs/Parrot/Test.pm parrot/Parrot/Test.pm
--- parrot.cvs/Parrot/Test.pm   Thu Jan  1 01:00:00 1970
+++ parrot/Parrot/Test.pm   Sun Sep 16 12:18:34 2001
@@ -0,0 +1,79 @@
+#
+
+package Parrot::Test;
+
+use strict;
+use vars qw(@EXPORT @ISA);
+
+require Exporter;
+require Test::More;
+
+@EXPORT = ( qw(output_is), @Test::More::EXPORT );
+@ISA = qw(Exporter Test::More);
+
+sub import {
+  my( $class, $plan, @args ) = @_;
+
+  Test::More-import( $plan, @args );
+
+  __PACKAGE__-_export_to_level( 2, __PACKAGE__ );
+}
+
+# this kludge is an hopefully portable way of having
+# redirections ( tested on Linux and Win2k )
+sub _run_command {
+  my( $command, %redir ) = @_;
+  my( $redir_string ) = '';
+
+  while( my @dup = each %redir ) {
+my( $from, $to ) = @dup;
+if( $to eq 'STDERR' ) { $to = qq{STDERR} }
+elsif( $to eq 'STDOUT' ) { $to = qq{STDOUT} }
+elsif( $to eq '/dev/null' ) { $to = ( $^O eq 'MSWin32' ) ?
+  'qq{ NUL:}' : qq{ $to} }
+else { $to = qq{ $to} }
+
+$redir_string .= open $from, $to;
+  }
+
+  system $^X -e \$redir_string;system qq{$command};\;
+}
+
+my $count;
+
+foreach my $i ( qw(is isnt like) ) {
+  no strict 'refs';
+
+  *{Parrot::Test::output_$i} = sub ($$;$) {
+++$count;
+my( $assembly, $output, $desc ) = @_;
+local( *ASSEMBLY, *OUTPUT );
+my( $as_f, $by_f, $out_f ) = map {
+  my $t = $0; $t =~ s/\.t$/$count\.$_/; $t
+} ( qw(pasm pbc out) );
+
+open ASSEMBLY,  $as_f or die Unable to open '$as_f';
+binmode ASSEMBLY;
+print ASSEMBLY $assembly;
+close ASSEMBLY;
+
+_run_command( perl assemble.pl $as_f --output $by_f );
+_run_command( ./test_prog $by_f, 'STDOUT' = $out_f );
+
+my $prog_output;
+open OUTPUT,  $out_f;
+{
+  local $/ = undef;
+  $prog_output = OUTPUT;
+}
+close OUTPUT;
+
+@_ = ( $prog_output, $output, $desc );
+#goto {Test::More::$i};
+my $ok = {Test::More::$i}( @_ );
+if( $ok ) { foreach my $i ( $as_f, $by_f, $out_f ) { unlink $i } }
+  }
+}
+
+1;
+
diff -r -b -u -2 -N parrot.cvs/t/harness parrot/t/harness
--- parrot.cvs/t/harnessThu Jan  1 01:00:00 1970
+++ parrot/t/harnessThu Sep 13 17:36:08 2001
@@ -0,0 +1,7 @@
+#! perl -w
+
+use strict;
+use Test::Harness qw(runtests);
+
+my @tests = map { glob( t/$_/*.t ) } ( qw(op misc) );
+runtests( @tests );
diff -r -b -u -2 -N parrot.cvs/t/op/basic.t parrot/t/op/basic.t
--- parrot.cvs/t/op/basic.t Thu Jan  1 01:00:00 1970
+++ parrot/t/op/basic.t Sun Sep 16 12:18:26 2001
@@ -0,0 +1,27 @@
+#! perl -w
+
+use Parrot::Test tests = 2;
+
+output_is( 'CODE', '42', branch_ic );
+   set I4, 42
+   branch  HERE
+   set I4, 1234
+HERE:
+   print   I4
+   end
+CODE
+
+SKIP: {
+skip( label constants unimplemented in assembler, 1 );
+output_is( 'CODE', OUTPUT, jump );
+   set I4, 42
+   set I5, HERE
+   jumpI5
+   set I4, 1234
+HERE:
+   print   I4
+   end
+CODE
+I reg 4 is 42
+OUTPUT
+}
diff -r -b -u -2 -N parrot.cvs/t/op/string.t parrot/t/op/string.t
--- parrot.cvs/t/op/string.tThu Jan  1 01:00:00 1970
+++ parrot/t/op/string.tSun Sep 16 11:33:06 2001
@@ -0,0 +1,48 @@
+#! perl -w
+
+use Parrot::Test tests = 4;
+
+output_is( 'CODE', OUTPUT, set_s_sc );
+   set S4, JAPH\n
+   print   S4
+   end
+CODE
+JAPH
+OUTPUT
+
+output_is( 'CODE', '4', length_i_s );
+   set I4, 0
+   set S4, JAPH
+   length  I4, S4
+   print   I4
+   end
+CODE
+
+output_is( 'CODE', OUTPUT, chopn_s_ic );
+   set S4, JAPHxyzw
+   set S5, japhXYZW
+   set S3, \n
+   chopn   S4, 3
+   chopn   S4, 1
+   chopn   S5, 4
+   print   S4
+   print   S3
+   print   S5
+   print   S3
+   end
+CODE
+JAPH
+japh
+OUTPUT
+
+SKIP: {
+skip I'm unable to write it!, 1;
+output_is( 'CODE', 'JAPH', substr_s_s_i_i );
+   set S4, 12345JAPH01
+   set I4, 5
+   set I5, 4
+   substr  S5, S4, I4, I5
+   print   S5
+   end
+CODE
+}



RE: [PATCH] testsuite and Win32 compilation

2001-09-15 Thread Mattia Barbon

 ## +#if defined(WIN32)
 ## +program_code = malloc( file_stat.st_size );
 ## +#else
 
 #Should we be using malloc, or are we supposed to use our own allocator?
 #(I haven't been munging in the C, so I don't really know--it just looks
 #a little suspicious.)
 
 In memory.{h,c} there is a mem_sys_allocate(IV) that I would suggest.
Of course you're right.
New patch Attached

The attached patch replaces things.diff ( testsuite.diff should be
OK )

Regards
Mattia


The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any another MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.

    File information ---
 File:  win32.diff
 Date:  15 Sep 2001, 10:35
 Size:  5043 bytes.
 Type:  Unknown

 win32.diff


[PATCH] testsuite

2001-09-14 Thread Mattia Barbon

Run with
perl -Mlib=lib t/harness

Tests live in t/*/*.t .
In case of failure the assembler, bytecode and output
are available as t/dir/testnnn.pasm/pbc/out

tested under Linux and Win32

Regards
Mattia

--patch--
diff -r -b -u -2 -N parrot.cvs/lib/Test/Parrot.pm 
parrot/lib/Test/Parrot.pm
--- parrot.cvs/lib/Test/Parrot.pm   Thu Jan 01 01:00:00 1970
+++ parrot/lib/Test/Parrot.pm   Thu Sep 13 19:01:16 2001
@@ -0,0 +1,79 @@
+#
+
+package Test::Parrot;
+
+use strict;
+use vars qw(@EXPORT @ISA);
+
+require Exporter;
+require Test::More;
+
+@EXPORT = ( qw(output_is), @Test::More::EXPORT );
+@ISA = qw(Exporter Test::More);
+
+sub import {
+  my( $class, $plan, @args ) = @_;
+
+  Test::More-import( $plan, @args );
+
+  __PACKAGE__-_export_to_level( 2, __PACKAGE__ );
+}
+
+# this kludge is an hopefully portable way of having
+# redirections ( tested on Linux and Win2k )
+sub _run_command {
+  my( $command, %redir ) = @_;
+  my( $redir_string );
+
+  while( my @dup = each %redir ) {
+my( $from, $to ) = @dup;
+if( $to eq 'STDERR' ) { $to = qq{STDERR} }
+elsif( $to eq 'STDOUT' ) { $to = qq{STDOUT} }
+elsif( $to eq '/dev/null' ) { $to = ( $^O eq 'MSWin32' ) ?
+  'qq{ NUL:}' : qq{ $to} }
+else { $to = qq{ $to} }
+
+$redir_string .= open $from, $to;
+  }
+
+  system $^X -e \$redir_string;system qq{$command};\;
+}
+
+my $count;
+
+foreach my $i ( qw(is isnt like) ) {
+  no strict 'refs';
+
+  *{Test::Parrot::output_$i} = sub ($$;$) {
+++$count;
+my( $assembly, $output, $desc ) = @_;
+local( *ASSEMBLY, *OUTPUT );
+my( $as_f, $by_f, $out_f ) = map {
+  my $t = $0; $t =~ s/\.t$/$count\.$_/; $t
+} ( qw(pasm pbc out) );
+
+open ASSEMBLY,  $as_f or die Unable to open '$as_f';
+binmode ASSEMBLY;
+print ASSEMBLY $assembly;
+close ASSEMBLY;
+
+_run_command( perl assemble.pl $as_f, 'STDOUT' = $by_f );
+_run_command( ./test_prog $by_f, 'STDOUT' = $out_f );
+
+my $prog_output;
+open OUTPUT,  $out_f;
+{
+  local $/ = undef;
+  $prog_output = OUTPUT;
+}
+close OUTPUT;
+
+@_ = ( $prog_output, $output, $desc );
+#goto {Test::More::$i};
+my $ok = {Test::More::$i}( @_ );
+unlink( $by_f, $out_f ) if $ok;
+  }
+}
+
+1;
+
diff -r -b -u -2 -N parrot.cvs/t/harness parrot/t/harness
--- parrot.cvs/t/harnessThu Jan 01 01:00:00 1970
+++ parrot/t/harnessThu Sep 13 17:36:08 2001
@@ -0,0 +1,7 @@
+#! perl -w
+
+use strict;
+use Test::Harness qw(runtests);
+
+my @tests = map { glob( t/$_/*.t ) } ( qw(op misc) );
+runtests( @tests );
diff -r -b -u -2 -N parrot.cvs/t/op/basic.t parrot/t/op/basic.t
--- parrot.cvs/t/op/basic.t Thu Jan 01 01:00:00 1970
+++ parrot/t/op/basic.t Fri Sep 14 01:42:44 2001
@@ -0,0 +1,32 @@
+#! perl -w
+
+use Test::Parrot tests = 1;
+
+ok( 1 );
+exit 0;
+
+output_is( CODE, OUTPUT, branch_ic );
+   set_i_icI4, 42
+   branch_ic   HERE
+   set_i_icI4, 1234
+HERE:
+   print_i I4
+   end
+CODE
+I reg 4 is 42
+OUTPUT
+
+SKIP: {
+skip( label constants unimplemented in assembler, 1 );
+output_is( CODE, OUTPUT, jump );
+   set_i_icI4, 42
+   set_i_icI5, HERE
+   jump_i  I5
+   set_i_icI4, 1234
+HERE:
+   print_i I4
+   end
+CODE
+I reg 4 is 42
+OUTPUT
+}
diff -r -b -u -2 -N parrot.cvs/t/op/string.t parrot/t/op/string.t
--- parrot.cvs/t/op/string.tThu Jan 01 01:00:00 1970
+++ parrot/t/op/string.tFri Sep 14 01:58:28 2001
@@ -0,0 +1,56 @@
+#! perl -w
+
+use Test::Parrot tests = 4;
+
+output_is( 'CODE', OUTPUT, set_s_sc );
+   set S4, JAPH\n
+   print   S4
+   end
+CODE
+JAPH
+OUTPUT
+
+output_is( 'CODE', OUTPUT, length_i_s );
+   set I4, 0
+   set S4, JAPH
+   length  I4, S4
+   print   I4
+   set S3, \n
+   print   S3
+   end
+CODE
+4
+OUTPUT
+
+output_is( 'CODE', OUTPUT, chopn_s_ic );
+   set S4, JAPHxyzw
+   set S5, japhXYZW
+   set S3, \n
+   chopn   S4, 3
+   chopn   S4, 1
+   chopn   S5, 4
+   print   S4
+   print   S3
+   print   S5
+   print   S3
+   end
+CODE
+JAPH
+japh
+OUTPUT
+
+SKIP: {
+skip I'm unable to write it!, 1;
+output_is( 'CODE', OUTPUT, substr_s_s_i_i );
+   set S4, 12345JAPH01
+   set I4, 5
+   set I5, 4
+   substr  S5, S4, I4, I5
+   print   S5
+   set S3, \n
+   print   S3
+   end
+CODE
+JAPH
+OUTPUT
+}
--end patch--
--- End of forwarded message ---
--- End of forwarded message ---



Re: #include config.h or #include parrot/config.h

2001-09-14 Thread Mattia Barbon

 On Thu, Sep 13, 2001 at 11:07:00AM -0600, Nathan Torkington wrote:
  Isn't the correct solution to this problem to say
 #include parrot/config.h
  
  That is, include the subdirectory prefix in all #includes.  You -I the
  directory containing parrot/, and that avoids randomly located
  config.h files from buggering you up.
 
 Yes. What I'd like to see Parrot do is reference all its include files
 (not just config because one day we'll be embedding Parrot or linking
 it with other stuff and we want to avoid conflicts there too) as
 parrot/foo.h and add -I.. to the includes target in the Makefile.
The proble is that, this way, you can only build parrot
if the directory is called parrot; this excludes having directories
named parrot-1.0.3 in the distribution; one can live with it, but
it is *ugly*. I can send a patch to move all include files in
include/parrot ( or whatever ), if you say so.

Regards
Mattia




[PATCH] Win32 compilation

2001-09-14 Thread Mattia Barbon

This patch adds:
an hints directory ( files are named hints/lc($^O).pl )
therir contents are eval'd in Config.pl

it adds to Config.pl some flags
   --debugging  Enable debugging

adds -g or equivalento to compiler flags

   --defaults   Accept all default values

like -d option to perl5 Configure

   --define name=value  Defines value name as value

i.e --define cc=gcc --define ld=myld

   --help   This text
   --versionShow assembler version

Win32 does not have mmap() ( it has memory mapped files, but with
a different API, so I just read() the bytecode in a malloc()ed
buffer.

Compilation tested on Win32 (MSVC5 and MinGW ) and Linux

Regards
Mattia




The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any another MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.

    File information ---
 File:  things.diff
 Date:  14 Sep 2001, 18:32
 Size:  5076 bytes.
 Type:  Unknown

 things.diff


[PATCH] testsuite and Win32 compilation

2001-09-14 Thread Mattia Barbon

 PLEASE can someone rewrite the tests to actually *test* things
 and print ok 1\n and so on?
Here it is ( for the second time )

 Quick, or I'll call Schwern in.
Ah, I thought you missed my patches, then I was correct
both attached 

testsuite.diff:
-
Run with
perl -Mlib=lib t/harness
just as make test in perl5 

Tests live in t/*/*.t .
In case of failure the assembler, bytecode and output
are available as t/dir/testnnn.pasm/pbc/out
---

things.diff
-
This patch adds:
an hints directory ( files are named hints/lc($^O).pl )
therir contents are eval'd in Config.pl

it adds to Config.pl some flags
   --debugging  Enable debugging

adds -g or equivalento to compiler flags

   --defaults   Accept all default values

like -d option to perl5 Configure

   --define name=value  Defines value name as value

i.e --define cc=gcc --define ld=myld

   --help   This text
   --versionShow assembler version

Win32 does not have mmap() ( it has memory mapped files, but with
a different API, so I just read() the bytecode in a malloc()ed
buffer.

Compilation tested on Win32 (MSVC5 and MinGW ) and Linux


Best regards
Mattia

P.S.: what should I do to make patches stand out better
  in the mailing list?


The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any another MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.

    File information ---
 File:  things.diff
 Date:  14 Sep 2001, 18:32
 Size:  5076 bytes.
 Type:  Unknown

 things.diff

diff -r -b -u -2 -N parrot.cvs/lib/Test/Parrot.pm parrot/lib/Test/Parrot.pm
--- parrot.cvs/lib/Test/Parrot.pm   Thu Jan 01 01:00:00 1970
+++ parrot/lib/Test/Parrot.pm   Thu Sep 13 19:01:16 2001
@@ -0,0 +1,79 @@
+#
+
+package Test::Parrot;
+
+use strict;
+use vars qw(@EXPORT @ISA);
+
+require Exporter;
+require Test::More;
+
+@EXPORT = ( qw(output_is), @Test::More::EXPORT );
+@ISA = qw(Exporter Test::More);
+
+sub import {
+  my( $class, $plan, @args ) = @_;
+
+  Test::More-import( $plan, @args );
+
+  __PACKAGE__-_export_to_level( 2, __PACKAGE__ );
+}
+
+# this kludge is an hopefully portable way of having
+# redirections ( tested on Linux and Win2k )
+sub _run_command {
+  my( $command, %redir ) = @_;
+  my( $redir_string );
+
+  while( my @dup = each %redir ) {
+my( $from, $to ) = @dup;
+if( $to eq 'STDERR' ) { $to = qq{STDERR} }
+elsif( $to eq 'STDOUT' ) { $to = qq{STDOUT} }
+elsif( $to eq '/dev/null' ) { $to = ( $^O eq 'MSWin32' ) ?
+  'qq{ NUL:}' : qq{ $to} }
+else { $to = qq{ $to} }
+
+$redir_string .= open $from, $to;
+  }
+
+  system $^X -e \$redir_string;system qq{$command};\;
+}
+
+my $count;
+
+foreach my $i ( qw(is isnt like) ) {
+  no strict 'refs';
+
+  *{Test::Parrot::output_$i} = sub ($$;$) {
+++$count;
+my( $assembly, $output, $desc ) = @_;
+local( *ASSEMBLY, *OUTPUT );
+my( $as_f, $by_f, $out_f ) = map {
+  my $t = $0; $t =~ s/\.t$/$count\.$_/; $t
+} ( qw(pasm pbc out) );
+
+open ASSEMBLY,  $as_f or die Unable to open '$as_f';
+binmode ASSEMBLY;
+print ASSEMBLY $assembly;
+close ASSEMBLY;
+
+_run_command( perl assemble.pl $as_f, 'STDOUT' = $by_f );
+_run_command( ./test_prog $by_f, 'STDOUT' = $out_f );
+
+my $prog_output;
+open OUTPUT,  $out_f;
+{
+  local $/ = undef;
+  $prog_output = OUTPUT;
+}
+close OUTPUT;
+
+@_ = ( $prog_output, $output, $desc );
+#goto {Test::More::$i};
+my $ok = {Test::More::$i}( @_ );
+unlink( $by_f, $out_f ) if $ok;
+  }
+}
+
+1;
+
diff -r -b -u -2 -N parrot.cvs/t/harness parrot/t/harness
--- parrot.cvs/t/harnessThu Jan 01 01:00:00 1970
+++ parrot/t/harnessThu Sep 13 17:36:08 2001
@@ -0,0 +1,7 @@
+#! perl -w
+
+use strict;
+use Test::Harness qw(runtests);
+
+my @tests = map { glob( t/$_/*.t ) } ( qw(op misc) );
+runtests( @tests );
diff -r -b -u -2 -N parrot.cvs/t/op/basic.t parrot/t/op/basic.t
--- parrot.cvs/t/op/basic.t Thu Jan 01 01:00:00 1970
+++ parrot/t/op/basic.t Fri Sep 14 01:42:44 2001
@@ -0,0 +1,32 @@
+#! perl -w
+
+use Test::Parrot tests = 1;
+
+ok( 1 );
+exit 0;
+
+output_is( CODE, OUTPUT, branch_ic );
+   set_i_icI4, 42
+   branch_ic   HERE
+   set_i_icI4, 1234
+HERE:
+   print_i I4
+   end
+CODE
+I reg 4 is 42
+OUTPUT
+
+SKIP: {
+skip( label constants unimplemented in assembler, 1 );
+output_is( CODE, OUTPUT, jump );
+   set_i_icI4, 42
+   set_i_icI5, HERE
+   jump_i  I5
+   set_i_icI4, 1234
+HERE:
+   print_i I4
+   end
+CODE
+I reg 4 is 42

Test ( was: Re: Things we need to do. )

2001-09-13 Thread Mattia Barbon

 If you're looking for something to do, we *always* have good
 little jobs for people. :)
Great!

 6) A test suite! My kingdom for a test suite!
I had a first stab at it; attached module + sample script,
for discussion only, because it is a kludge; I'll tidy it up
this evening.

Questions: 
* what other functions are required?
* where should tests reside? ( t/op/*.t, t/misc/*.t, etc? )
* where should helper perl5 modules go?
  ( lib/Test/Parrot.pm ? )

To Schwern:
* Test::Parrot ( or whatever ), needs to be special cased
  in Test::Simple::ok ( as Test::More is ), to report test
  line correctly.

Regards
Mattia




use strict;

use lib 'lib';
use Test::Parrot;

Test::Parrot::output_is( TEST, OUTPUT );
set_s_sc S1, Hello World
print_s S1
print_s S1
TEST
S reg 1 is Hello World
S reg 1 is Hello World
OUTPUT


#

package Test::Parrot;

require File::Spec;
use Test::More qw(no_plan);

use strict;

# this kludge is an hopefully portable way of having
# redirections ( tested on Linux and Win2k )
sub _run_command {
  my( $command, %redir ) = @_;
  my( $redir_string );

  while( my @dup = each %redir ) {
my( $from, $to ) = @dup;
if( $to eq 'STDERR' ) { $to = qq{STDERR} }
elsif( $to eq 'STDOUT' ) { $to = qq{STDOUT} }
elsif( $to eq '/dev/null' ) { $to = ( $^O eq 'MSWin32' ) ?
  'qq{ NUL:}' : qq{ $to} }
else { $to = qq{ $to} }

$redir_string .= open $from, $to;
  }

  system perl -e \$redir_string;system qq{$command};\;
}

sub output_is($$) {
  my( $assembly, $output ) = @_;
  local( *ASSEMBLY, *OUTPUT );
  my( $as_f, $by_f, $out_f ) = qw(test.pasm test.pbc test.out);

  open ASSEMBLY,  $as_f or die Unable to open '$as_f';
  binmode ASSEMBLY;
  print ASSEMBLY $assembly;
  close ASSEMBLY;

  _run_command( perl assemble.pl $as_f, 'STDOUT' = $by_f );
  _run_command( ./test_prog $by_f, 'STDOUT' = $out_f );

  my $prog_output;
  open OUTPUT,  $out_f;
  {
local $/ = undef;
$prog_output = OUTPUT;
  }
  close OUTPUT;

  Test::More::is( $prog_output, $output );
}

1;




Re: Test ( was: Re: Things we need to do. )

2001-09-13 Thread Mattia Barbon

 To Schwern:
 * Test::Parrot ( or whatever ), needs to be special cased
   in Test::Simple::ok ( as Test::More is ), to report test
   line correctly.

A Test::Simple function to know the actual test number would
be nice, too.

Regards
Mattia