Re: [perl #51756] [BUG]: config/auto/crypto.pm causes build failure on Darwin

2008-03-17 Thread Francois PERRAD

Andy Dougherty wrote:

On Sat, 15 Mar 2008, James Keenan via RT wrote:


On Sat Mar 15 10:50:04 2008, doughera wrote:


Ah, I think this one is easy:  If I recall correctly, the SHA256_CTX
stuff was added in openssl version 0.9.8; I'll bet your system has
0.9.7.


Yes.

OpenSSL version
OpenSSL 0.9.7l 28 Sep 2006




Two reasonable fixes:

1.  (Easy)  Change the test program that Configure.pl runs to use
SHA256_CTX.  That way, the test program will actually test what parrot
will be using.

2.  (Hard)  Have parts of the crypto support conditionally included,
depending on whether or not the user has that specific functionality
available.



with r26441, I add conditional compilation in mdx.pmc. So, all PMC (md2, 
md4, md5, ripemd160, sha, sha1, sha256, sha512) must compile even if not 
supported by old version of libssl.

I hope this commit allows to revert the r26405 one.

François.


While (1) is something that François, who wrote the step class, could
probably do, I suspect that (2) is a discussion the project will have to
have.


Why wait for someone else?  This trivial patch (untested, but it really 
should be this easy) ought to implement (1). This way you can proceed 
without waiting for any broader discussion.


diff -u -r parrot-svn/config/auto/crypto/crypto.in 
parrot-andy/config/auto/crypto/crypto.in
--- parrot-svn/config/auto/crypto/crypto.in Fri Mar 14 11:23:37 2008
+++ parrot-andy/config/auto/crypto/crypto.inSat Mar 15 18:43:58 2008
@@ -4,10 +4,12 @@
 #include stdio.h
 #include stdlib.h
 #include openssl/opensslv.h
+#include openssl/sha.h /* For SHA256_CTX */
 #include openssl/err.h
 
 int main(int argc, char *argv[])

 {
+SHA256_CTX c; /* Only available in 0.9.8 and later */
 unsigned long dummy = ERR_get_error();
 
 printf (%s\n, OPENSSL_VERSION_TEXT);







Re: pdd17pmc branch review

2008-03-17 Thread François Perrad

chromatic wrote:

On Monday 10 March 2008 07:24:44 François Perrad wrote:


chromatic wrote:



I fixed all of the compilation errors I could find as of r26285.  280
tests fail on the trunk for me and 308 fail on the branch, but they don't
look like compilation errors or PDD 17 porting errors.



I think the problem is in the wmlsbytecode.pmc (a singleton PMC with
only one method 'load'), because the following command has no output :
parrot wmlsd.pir t/examples_1.wmlsc
The script wmlsd.pir is a disassembler that loads a WMLScript bytecode
and dumps it. Other scripts make more complicated thinks after loading
the WMLScript bytecode, but all scripts start with this loading step.

Could you send me an output of the failure on the trunk on your platform ?


Here you are!



Thank you.

After some ppd17pmc fix (- r26440), I've only 9


-- c






Re: [perl #47978] [C99] [IMCC] double free

2008-03-17 Thread Klaas-Jan Stol
On Sun, Mar 16, 2008 at 11:04 PM, chromatic [EMAIL PROTECTED] wrote:
 On Saturday 23 February 2008 14:23:19 Klaas-Jan Stol wrote:

   On Sat, Feb 23, 2008 at 5:00 PM, Ron Blaschke [EMAIL PROTECTED] wrote:

   The issue seems to be caused by languages/c99/src/preamble, where:
   
.local $iter_loop:
   
Consider this test program.
   
$cat m.pir
.macro test
.local $iter_loop:
.endm
   
$ parrot -o m.pbc --output-pbc m.pir
compilers/imcc/imcc.l:992: failed assertion 'valp-s'
   
(Remove the colon and it parses again.)
  
   that makes sense, now i see this: .local is not valid anymore to declare
   labels, you should use .label.

  Can we somehow make this an error in IMCC?  I poked at the LOCAL and LABEL
  rules slightly, but didn't figure it out.

  -- c


I think that macro definitions are slurped, not parsed. In other
words, it gets tricky to check for that (Only macro expansions are
parsed.)

(FYI, the 3-phase PIR compiler pirc/new + pirc/macro separates the
macro stuff from pure PIR; the macro processor is really a parser
there, which would be able to do this in a nicer way. The future of
pirc is unclear, though; currently it's a lot of work to do a
replacement for imcc)

kjs


Re: [perl #31980] Factorial example gives incorrect result

2008-03-17 Thread Stephen Weeks
Not long ago, Allison Randal via RT proclaimed...
 On Mon Feb 20 16:23:46 2006, jhoblitt !-- x -- at hawaii.edu wrote:
  On Tue, Feb 21, 2006 at 01:03:59AM +0100, Leopold Toetsch wrote:
   
   On Feb 20, 2006, at 23:44, Joshua Hoblitt via RT wrote:
   
   What happened to the factorial PASM example?  It seems to have
   disappeared and it hasn't re-appeared as a PIR example either.
   
   It used bogus high numbers beyond int32 range and was just broken.
  
  Only because it was using integer registers.  Limiting it to low
  factorial values or using Integer pmcs would resolve the issue.  I'm
  going to add a PIR example using Integer pmcs unless there are any
  objections.
 
 Did you add the examples? I'd like to close the ticket.
 
 Allison

The examples aren't on the website, but examples/pasm/fact.pasm is fixed
as of r26432.


[perl #33962] readline returns one too many lines

2008-03-17 Thread Stephen Weeks via RT
This was never actually a bug, afaict.


[perl #51806] [PATCH] Fix test failures

2008-03-17 Thread via RT
# New Ticket Created by  Matt Kraai 
# Please include the string:  [perl #51806]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=51806 


Howdy,

t/examples/pasm.t fails because examples/pasm/fact.pasm now outputs 30
factorials, whereas the test case only expects it to output 6.
t/perl/Parrot_IO.t fails because it skips the Subversion-specific
tests only when run in a Subversion working copy.  The attached patch
fixes both problems.

-- 
Matt
diff --git a/t/examples/pasm.t b/t/examples/pasm.t
index 60ded1e..3e74d0f 100644
--- a/t/examples/pasm.t
+++ b/t/examples/pasm.t
@@ -42,6 +42,30 @@ fact of 3 is: 6
 fact of 4 is: 24
 fact of 5 is: 120
 fact of 6 is: 720
+fact of 7 is: 5040
+fact of 8 is: 40320
+fact of 9 is: 362880
+fact of 10 is: 3628800
+fact of 11 is: 39916800
+fact of 12 is: 479001600
+fact of 13 is: 6227020800
+fact of 14 is: 87178291200
+fact of 15 is: 1307674368000
+fact of 16 is: 20922789888000
+fact of 17 is: 355687428096000
+fact of 18 is: 6402373705728000
+fact of 19 is: 121645100408832000
+fact of 20 is: 243290200817664
+fact of 21 is: 5109094217170944
+fact of 22 is: 11240007260768
+fact of 23 is: 2585201673888497664
+fact of 24 is: 62044840173323943936
+fact of 25 is: 1551121004333098598400
+fact of 26 is: 40329146112660563558400
+fact of 27 is: 106945041835216076800
+fact of 28 is: 30488834461171386050150400
+fact of 29 is: 884176199373970195454361600
+fact of 30 is: 26525285981219105863630848000
 END_EXPECTED
 
 'hello.pasm' =  'END_EXPECTED',
diff --git a/t/perl/Parrot_IO.t b/t/perl/Parrot_IO.t
index 70f4ec6..5ae001a 100644
--- a/t/perl/Parrot_IO.t
+++ b/t/perl/Parrot_IO.t
@@ -165,7 +165,7 @@ SKIP: {
 my $nul = File::Spec-devnull;
 
 skip( 'git-svn does not expand keywords', 2 )
-if Parrot::Distribution-new-is_svn_co();
+if Parrot::Distribution-new-is_git_co();
 
 $f = Parrot::IO::File-new( catfile( 'lib', 'Parrot', 'IO', 'File.pm' ) );
 ok( $f-has_svn_id(), 'has_svn_id' );


[perl #37287] [TODO] pdb - don't die on exceptions

2008-03-17 Thread Mark Glines via RT
On Sun Mar 16 10:17:09 2008, [EMAIL PROTECTED] wrote:
 Friends,
 
 Doing cage cleaning today, I noticed that there has been no activity in
 this thread since last August.  Are the issues that were under
 discussion still live?  Should we still be considering the various
 patches?

The issue is still valid, but my patch from last year does not help much
to solve it.

You can reproduce the bug with the test.pir I attached last August, and
by running the following commands:

$ make pdb
$ ./pdb test.pir
(pdb) r

The issue is that pdb does not catch an exception.  Instead, the
exception crashes pdb.  Fixing pdb to catch exceptions cleanly would
make pdb significantly more useful as a debugger, I think.

Mark



[perl #51806] [PATCH] Fix test failures

2008-03-17 Thread James Keenan via RT
On Sun Mar 16 19:28:53 2008, kraai wrote:
 Howdy,
 
 t/examples/pasm.t fails because examples/pasm/fact.pasm now outputs 30
 factorials, whereas the test case only expects it to output 6.


I was just at the point of filing a separate bug report on the failure
in t/examples/pasm.t when I saw your post.  I applied your patch, but
got inconsistent results with it between Darwin and Linux.

On Darwin, test #4 (the factorial test) once again passed.  But on
Linux, this was my result:

$ prove -v t/examples/pasm.tt/examples/pasm..
1..6
ok 1 - examples/pasm/queens.pasm
ok 2 - examples/pasm/hello.pasm
ok 3 - examples/pasm/stack.pasm
not ok 4 - examples/pasm/fact.pasm

#   Failed test 'examples/pasm/fact.pasm'
#   at t/examples/pasm.t line 117.
# Exited with error code: 1
# Received:
# fact of 0 is: 1
# fact of 1 is: 1
# fact of 2 is: 2
# fact of 3 is: 6
# fact of 4 is: 24
# fact of 5 is: 120
# fact of 6 is: 720
# fact of 7 is: 5040
# fact of 8 is: 40320
# fact of 9 is: 362880
# fact of 10 is: 3628800
# fact of 11 is: 39916800
# fact of 12 is: 479001600
# fact of 13 is: no bigint lib loaded
# current instr.: '(null)' pc 42
(/home/jimk/work/parrot/t/examples/pasm_4.pasm:54)
# 
# Expected:
# fact of 0 is: 1
# fact of 1 is: 1
# fact of 2 is: 2
# fact of 3 is: 6
# fact of 4 is: 24
# fact of 5 is: 120
# fact of 6 is: 720
# fact of 7 is: 5040
# fact of 8 is: 40320
# fact of 9 is: 362880
# fact of 10 is: 3628800
# fact of 11 is: 39916800
# fact of 12 is: 479001600
# fact of 13 is: 6227020800
# fact of 14 is: 87178291200
# fact of 15 is: 1307674368000
# fact of 16 is: 20922789888000
# fact of 17 is: 355687428096000
# fact of 18 is: 6402373705728000
# fact of 19 is: 121645100408832000
# fact of 20 is: 243290200817664
# fact of 21 is: 5109094217170944
# fact of 22 is: 11240007260768
# fact of 23 is: 2585201673888497664
# fact of 24 is: 62044840173323943936
# fact of 25 is: 1551121004333098598400
# fact of 26 is: 40329146112660563558400
# fact of 27 is: 106945041835216076800
# fact of 28 is: 30488834461171386050150400
# fact of 29 is: 884176199373970195454361600
# fact of 30 is: 26525285981219105863630848000
# 
ok 5 - examples/pasm/xml_parser.pasm
not ok 6 - nanoforth2.pasm # TODO nanoforth2.pasm not testable yet

#   Failed (TODO) test 'nanoforth2.pasm'
#   at t/examples/pasm.t line 124.
# Looks like you failed 1 test of 6.
 Dubious, test returned 1 (wstat 256, 0x100)
 Failed 1/6 subtests 

Test Summary Report
---
t/examples/pasm.t (Wstat: 256 Tests: 6 Failed: 1)
  Failed test:  4
  Non-zero exit status: 1
Files=1, Tests=6,  3 wallclock secs ( 0.00 usr  0.00 sys +  0.35 cusr 
0.03 csys =  0.38 CPU)
Result: FAIL

To the best of my memory, I have never installed a bigint library on
this Linux box; I'm not quite sure what that is.  But, in any case,
shouldn't the test be smart enough to do the right thing in either case
(having or not having bigint)?


 t/perl/Parrot_IO.t fails because it skips the Subversion-specific
 tests only when run in a Subversion working copy.  The attached patch
 fixes both problems.
 

Perhaps because I'm usually working in a Subversion working copy, I
haven't experienced this error.  So I did not test out this patch.



Parrot Bug Summary

2008-03-17 Thread Parrot Bug Summary
Parrot Bug Summary

http://rt.perl.org/rt3/NoAuth/parrot/Overview.html
Generated at Mon Mar 17 13:00:02 2008 GMT
---

  * Numbers
  * New Issues
  * Overview of Open Issues
  * Ticket Status By Version
  * Requestors with most open tickets

---

Numbers

Ticket Counts: 74 new + 752 open = 826
Created this week: 22
Closed this week: 49

---

New Issues

New issues that have not been responded to yet

1 - 2 weeks old
51464 [TODO] [PDD] add date stamps to PDD's
51446 In rakudo it is impossible to subclass a pmc which has an extended
  method.
2 - 3 weeks old
51350 [PATCH] correction and extension of the pair implementation
51330 [TODO] dynext - dll versioning
51206 Tail call into PIR compiler broken?
3 - 4 weeks old
4 - 5 weeks old
50894 parrot -O Fails Tests
5 - 6 weeks old
50642 [CAGE] refactor init_class_from_hash  parrot_class_register
50596 [PATCH][PCT] Add basic tests
6 - 7 weeks old
50508 [PATCH] evaluate the first child of a PAST::Var :scope('attribute') as
  the object
50500 [PROPOSAL][PAST] add PAST::Var :scope('attribute')
50448 [Memory Leak] IMCC Can Leak Lexer Data on Exception
50424 [PROPOSAL][PCT] allow empty PAST::Stmts nodes
50400 [BUG] segfault in pdd17pmc branch
50360 Redesign Parrot NCI callback functionality
7 - 8 weeks old
50092 [TODO] pct - explicit transcode in PCT::Grammar::string_literal
50090 [TODO] pge - throw useful exception on non-quoted non-word characters
50068 Configure doesn't detect backtrace* on ubuntu gutsy
8 - 9 weeks old
49970 [BUG] -O1 and -O2 don't turn on -Ot as per docs
49968 [BUG] 'parrot -O2 oofib.pir' errors out, when -O1 succeeds
49966 [BUG] parrot -v -O2 segfaults, when -v and -O2 separately both work
9 - 10 weeks old
49718 JIT Core Needs to Handle Scheduler Tasks
10 - 11 weeks old
49328 [BUG] problem between PBC loading and garbage collection
49258 Parrot::Test with --run-exec assumes . is in $PATH
11 - 12 weeks old
49177 [TODO] pct - PAST::Val node should throw exception if :value attribute
  not set
12 - 13 weeks old
49001 [PROPOSAL][DOCS] Change word compilation_unit into something else (like
  sub)
48877 [TODO] Don't generate .constant declarations for vtable method names.
13 - 14 weeks old
48749 [BUG] t/examples/tutorial.t if_unless failure (Win32)
48645 [CAGE] Make PMCs depend on Parrot::Pmc2c::* Modules
48587 [BUG] pmc.num contains missing PMCs
48581 [DEPRECATED] vtable type_keyed_str
48549 [RFC][PIR] Let .namespace (no args) have empty brackets
48513 [TODO][PCT] Use of int registers in PCT.
48507 [BUG] oo - n_add, n_sub, etc. don't work with objects
48467 [BUG] assignment of objects creates Ref instead of copy
48445 [TODO] [NQP] - report undeclared variable usage
48439 [TODO] [configure] compiling Parrot with LLVM
14 - 15 weeks old
48367 intlist_get could be dereferencing NULL
48296 Implement get_namespace vtable from pdd17
48286 [TODO] [C] Warnings aren't emitted if a var isn't initialised and -w flag
  is on in propagate_need()
48282 [TODO] [C] Check that invoke is ok near the set_addr instruction in
  bb_findadd_edge()
48280 [TODO] [C] Check for a sub with more up-to-date unit-type lookup
48274 [TODO] [C] Stop ignoring the known errors in Parrot_dlopen()
48264 [TODO] [C] Write file-level documentation
48150 [DOCS] pdd23 doesn't document obtaining thrown exception object
15 - 16 weeks old
48034 [BUG] examples/streams/Bytes.pir runtime error
47992 [RFE] 'parrot foo' automatically finds and invokes foo.pbc
47974 [DOCS] What are valid characteristics for 'inspect_str' vtable
47966 [DOCS] pdd23 doesn't list exception;death as a standard exception
47940 [CAGE] mk_native_pbc stale
47930 [RFC] Remove comma separated keys [a,b]
47894 [BUG] Non-existent lexical throws exception
47888 [TODO] gc - possibly merge gmc branch back into trunk
16 - 17 weeks old
47764 [TODO] COW for one or all users of a modified string
17 - 18 weeks old
18 - 19 weeks old
19 - 20 weeks old
20 - 21 weeks old
46971 [DEPRECATED] newfrom sub/method in PGE
46925 [TODO] [C] Call pmc slicing functions from PackFiles thaw()
46923 [TODO] [C] Check flags of parrot_range object in elements() method Slice 
  PMC
46761 Dynpmcs and ParrotLibrary Global Destruction
46757 [BUG] Segfault in Parrot_TclString_nci_get_list
---

Overview of Open Issues

Platform   Severity   Tag  Lang
aix   0abandoned 05005threads   0  Amber0
All   1fatal 3bounce0  BASIC0
bsdos 0High  0Bug  80  bc   0
cygwin4low   0compiler  0  befunge  0
cygwin_nt 0medium0configure 2  bf

[perl #51794] Test in languages/urm try to call _export_to_level

2008-03-17 Thread Bernhard Schmalhofer via RT
Testing URM, that is
  cd languages/urm  make test
and
  cd languages   perl t/harness --languages=urm

should work again in r26422. 

Could somebody check with older versions of Test::More ?

Regards,
  Bernhard


-- 
/* [EMAIL PROTECTED] */


[perl #43507] [BUG] yet another gc bug exposed by perl6 on windows

2008-03-17 Thread Ronald Blaschke via RT
I don't see this with Windows XP, VC++ 8.0, VC++ 9.0 or MinGW GCC 3.4.2,
using Parrot r26446.  All three nmake/mingw32-make test in
languages/perl6 report:

All tests successful.
Files=27, Tests=223, 37 wallclock secs ( 0.13 usr +  0.00 sys =  0.13 CPU)
Result: PASS

The GC bug is either solved or well hidden again.  I'm closing this
ticket.  Please reopen if issue can be reproduced.

Thanks,
Ron


[perl #43515] Parrot will not build on Win32/MinGW

2008-03-17 Thread Ronald Blaschke via RT
Seems like there was a symbol missing.

src\io\io_win32.c: At top level:
src\io\io_win32.c:389: warning: no previous prototype for 'PIO_win32_isatty'
src\io\io_win32.c:389: error: conflicting types for 'PIO_win32_isatty'
src\io\io_win32.c:341: error: previous implicit declaration of
'PIO_win32_isatty' was here

Windows XP, MinGW GCC 3.4.2, Parrot r26446 builds fine for me.  Closing
this ticket.  Please reopen if still an issue for someone.

Thanks,
Ron


[perl #43234] [BUG][WIN32] Assertion failed: (PTR2UINTVAL(mmd_table[i].func_ptr) 3) == 0

2008-03-17 Thread Ronald Blaschke via RT
Fixed by guarding the assertion with PARROT_HAS_ALIGNED_FUNCPTR at r22453.


Re: [perl #41874] [PATCH] extended io_mmap implementation

2008-03-17 Thread Rubén Porras
I couldn't find the problem when I wrote it, I think you can resolve
the problem,  I can always resend it if I have time to find a
solution.

Thanks.

2008/3/16, James Keenan via RT [EMAIL PROTECTED]:
 chromatic, allison:

  Are the issues raised by this patch still relevant?  (No activity in 9
  months.)  If not, then we should resolve the ticket.

  Thank you very much.
  kid51



Re: [perl #51806] [PATCH] Fix test failures

2008-03-17 Thread Matt Kraai
On Mon, Mar 17, 2008 at 04:28:26AM -0700, James Keenan via RT wrote:
 On Sun Mar 16 19:28:53 2008, kraai wrote:
  Howdy,
  
  t/examples/pasm.t fails because examples/pasm/fact.pasm now outputs 30
  factorials, whereas the test case only expects it to output 6.
 
 
 I was just at the point of filing a separate bug report on the failure
 in t/examples/pasm.t when I saw your post.  I applied your patch, but
 got inconsistent results with it between Darwin and Linux.
 
 On Darwin, test #4 (the factorial test) once again passed.  But on
 Linux, this was my result:
 
 $ prove -v t/examples/pasm.tt/examples/pasm..
[snip test output]
 
 To the best of my memory, I have never installed a bigint library on
 this Linux box; I'm not quite sure what that is.  But, in any case,
 shouldn't the test be smart enough to do the right thing in either case
 (having or not having bigint)?

I had the development package for GMP installed (on Debian unstable,
it's libgmp3-dev).  Once I'd uninstalled it, the test failed for me
too in the same way as it failed for you.

The attached patch makes it skip the factorial test if GMP isn't
available.  There must be something wrong with the makefiles, though,
because I had to perform a make clean and rebuild everything before
the test would succeed after reinstalling GMP.

  t/perl/Parrot_IO.t fails because it skips the Subversion-specific
  tests only when run in a Subversion working copy.  The attached patch
  fixes both problems.
  
 
 Perhaps because I'm usually working in a Subversion working copy, I
 haven't experienced this error.  So I did not test out this patch.

Does this mean you will or won't check it in?

-- 
Matt
diff --git a/t/examples/pasm.t b/t/examples/pasm.t
index 3e74d0f..2b9e03b 100644
--- a/t/examples/pasm.t
+++ b/t/examples/pasm.t
@@ -34,40 +34,6 @@ Ft/examples/pir.t
 # Set up expected output for examples
 my %expected = (
 
-'fact.pasm' =  'END_EXPECTED',
-fact of 0 is: 1
-fact of 1 is: 1
-fact of 2 is: 2
-fact of 3 is: 6
-fact of 4 is: 24
-fact of 5 is: 120
-fact of 6 is: 720
-fact of 7 is: 5040
-fact of 8 is: 40320
-fact of 9 is: 362880
-fact of 10 is: 3628800
-fact of 11 is: 39916800
-fact of 12 is: 479001600
-fact of 13 is: 6227020800
-fact of 14 is: 87178291200
-fact of 15 is: 1307674368000
-fact of 16 is: 20922789888000
-fact of 17 is: 355687428096000
-fact of 18 is: 6402373705728000
-fact of 19 is: 121645100408832000
-fact of 20 is: 243290200817664
-fact of 21 is: 5109094217170944
-fact of 22 is: 11240007260768
-fact of 23 is: 2585201673888497664
-fact of 24 is: 62044840173323943936
-fact of 25 is: 1551121004333098598400
-fact of 26 is: 40329146112660563558400
-fact of 27 is: 106945041835216076800
-fact of 28 is: 30488834461171386050150400
-fact of 29 is: 884176199373970195454361600
-fact of 30 is: 26525285981219105863630848000
-END_EXPECTED
-
 'hello.pasm' =  'END_EXPECTED',
 Hello World
 END_EXPECTED
@@ -114,6 +80,44 @@ END_EXPECTED
 
 );
 
+SKIP: {
+skip( 'GMP is not available', 1 ) unless $PConfig{gmp};
+
+$expected{'fact.pasm'} =  'END_EXPECTED'
+fact of 0 is: 1
+fact of 1 is: 1
+fact of 2 is: 2
+fact of 3 is: 6
+fact of 4 is: 24
+fact of 5 is: 120
+fact of 6 is: 720
+fact of 7 is: 5040
+fact of 8 is: 40320
+fact of 9 is: 362880
+fact of 10 is: 3628800
+fact of 11 is: 39916800
+fact of 12 is: 479001600
+fact of 13 is: 6227020800
+fact of 14 is: 87178291200
+fact of 15 is: 1307674368000
+fact of 16 is: 20922789888000
+fact of 17 is: 355687428096000
+fact of 18 is: 6402373705728000
+fact of 19 is: 121645100408832000
+fact of 20 is: 243290200817664
+fact of 21 is: 5109094217170944
+fact of 22 is: 11240007260768
+fact of 23 is: 2585201673888497664
+fact of 24 is: 62044840173323943936
+fact of 25 is: 1551121004333098598400
+fact of 26 is: 40329146112660563558400
+fact of 27 is: 106945041835216076800
+fact of 28 is: 30488834461171386050150400
+fact of 29 is: 884176199373970195454361600
+fact of 30 is: 26525285981219105863630848000
+END_EXPECTED
+}
+
 while ( my ( $example, $expected ) = each %expected ) {
 example_output_is( examples/pasm/$example, $expected );
 }


[perl #51806] [PATCH] Fix test failures

2008-03-17 Thread James Keenan via RT
On Mon Mar 17 09:16:37 2008, kraai wrote:

 
   t/perl/Parrot_IO.t fails because it skips the Subversion-specific
   tests only when run in a Subversion working copy.  The attached patch
   fixes both problems.
   
  
  Perhaps because I'm usually working in a Subversion working copy, I
  haven't experienced this error.  So I did not test out this patch.
 
 Does this mean you will or won't check it in?
 

It means I didn't do anything with it one way or the other.  Since it
pertains to a different test, it probably would have been better off in
a separate RT.

If someone else can look at it prior to tomorrow's release, they can
handle it.  Otherwise, I'll look at it later in the week.

Thank you very much.
kid51




[perl #49758] [BUG] rakudo segfaults after No scope found for PAST::Var error

2008-03-17 Thread Will Coleda via RT
On Mon Mar 17 09:34:24 2008, cognominal wrote:
 $?SUB is not reset between two evals  so the outer to an undefined
 block. I am not sure this is
 the best  place to reset $?SUB.
 At least if seems to fix the bug.
 
 
 Index: /Users/stef/svn/parrot/compilers/pct/src/PAST/Compiler.pir
 =
 ==
 --- /Users/stef/svn/parrot/compilers/pct/src/PAST/Compiler.pir
 (revision 26447)
 +++ /Users/stef/svn/parrot/compilers/pct/src/PAST/Compiler.pir
 (working copy)
 @@ -71,7 +71,9 @@
  unless null blockpast goto have_blockpast
  blockpast = new 'ResizablePMCArray'
  set_global '@?BLOCK', blockpast
 -  have_blockpast:
 +have_blockpast:
 +null $P0
 +set_global '$?SUB', $P0
  .return self.'as_post'(past, 'rtype'='v')
  .end

This avoids the segfault, so +1.

This does make me notice, though, that PAST::Compiler is using several
perl6 variables, which confuses me.


[perl #47828] [TODO] Implement the 'copy' opcode

2008-03-17 Thread Will Coleda via RT
On Thu Dec 13 17:47:05 2007, [EMAIL PROTECTED] wrote:
 On Tuesday 11 December 2007 20:41:08 chromatic wrote:
 
  Here's a first step.  I added a stripped-down version of the code in RT
  #48467 as a second test, and it fails for me with:
 
  set_pmc() not implemented in class 'Num'
 
  I tried to debug it, but I have what they call Stupid Fingers tonight,
  and as such can't tell if I need to add assign_pmc() to Class,
Object, or
  PMCProxy, or just go take a nap.  Also holophoner lessons.
 
 This snail is just grumpy enough.
 
 -- c
 

compilers/pct/src/PAST/Compiler.pir says:

 Implement a 'copy' assignment (at least until we get the 'copy'
 opcode -- see RT#47828).

Now that the copy op is implemented, this should be implementable.




Parrot svn test results

2008-03-17 Thread Alberto Simões

Hi

I think this is not new to anyone, but as parrot 0.6.0 is preparing to 
exit the cage, here is some information about running make test on 
latest svn r26457.


Linux 2.6.24, x86:

 All tests successful.
 Files=559, Tests=11128, 327 wallclock secs ( 5.32 usr  1.21 sys + 
242.19 cusr 48.13 csys = 296.85 CPU)

 Result: PASS


Darwin 10.5.2:

Test Summary Report
---
t/src/io.t (Wstat: 256 Tests: 20 Failed: 1)
  Failed test:  19
  Non-zero exit status: 1
t/examples/library.t   (Wstat: 256 Tests: 4 Failed: 1)
  Failed test:  3
  Non-zero exit status: 1
Files=560, Tests=11234, 358 wallclock secs ( 3.69 usr  2.98 sys + 165.11 
cusr 69.67 csys = 241.45 CPU)

Result: FAIL
Failed 2/560 test programs. 2/11234 subtests failed.

--
Alberto Simões - Departamento de Informática - Universidade do Minho
 Campus de Gualtar - 4710-057 Braga - Portugal


Re: Parrot svn test results

2008-03-17 Thread chromatic
On Monday 17 March 2008 14:29:19 Alberto Simões wrote:

 I think this is not new to anyone, but as parrot 0.6.0 is preparing to
 exit the cage, here is some information about running make test on
 latest svn r26457.
 Darwin 10.5.2:

 Test Summary Report
 ---
 t/src/io.t (Wstat: 256 Tests: 20 Failed: 1)
Failed test:  19
Non-zero exit status: 1

I removed that test file in r26425.  Why is it running for you on Darwin?

 t/examples/library.t   (Wstat: 256 Tests: 4 Failed: 1)
Failed test:  3
Non-zero exit status: 1
 Files=560, Tests=11234, 358 wallclock secs ( 3.69 usr  2.98 sys + 165.11
 cusr 69.67 csys = 241.45 CPU)
 Result: FAIL
 Failed 2/560 test programs. 2/11234 subtests failed.

Can you show the full diagnostics of the failure?

-- c


Re: Parrot svn test results

2008-03-17 Thread Alberto Simões



chromatic wrote:

On Monday 17 March 2008 14:29:19 Alberto Simões wrote:


I think this is not new to anyone, but as parrot 0.6.0 is preparing to
exit the cage, here is some information about running make test on
latest svn r26457.
Darwin 10.5.2:

Test Summary Report
---
t/src/io.t (Wstat: 256 Tests: 20 Failed: 1)
   Failed test:  19
   Non-zero exit status: 1


I removed that test file in r26425.  Why is it running for you on Darwin?


No idea :)


t/examples/library.t   (Wstat: 256 Tests: 4 Failed: 1)
   Failed test:  3
   Non-zero exit status: 1
Files=560, Tests=11234, 358 wallclock secs ( 3.69 usr  2.98 sys + 165.11
cusr 69.67 csys = 241.45 CPU)
Result: FAIL
Failed 2/560 test programs. 2/11234 subtests failed.


Can you show the full diagnostics of the failure?


Hope this helps:

[EMAIL PROTECTED] parrot]$ prove -v t/examples/library.t
t/examples/library..
1..4
ok 1 - examples/library/getopt_demo.pir
ok 2 - examples/library/md5sum.pir
7.5
Null PMC access in invoke()
current instr.: 'parrot;PCRE;compile' pc 118 (library/pcre.pir:127)
called from Sub 'parrot;PCRE;main' pc 271 (examples/library/pcre.pir:56)
not ok 3 - examples/library/pcre.pir

#   Failed test 'examples/library/pcre.pir'
#   at t/examples/library.t line 67.
#  got: 'asdf =~ /as/
# '
# expected: 'asdf =~ /as/
# 1 match(es):
# as
# '
not ok 4 - ncurses_life.pir # TODO ncurses_life.pir not testable yet

#   Failed (TODO) test 'ncurses_life.pir'
#   at t/examples/library.t line 77.
# Looks like you failed 1 test of 4.
 Dubious, test returned 1 (wstat 256, 0x100)
 Failed 1/4 subtests

Test Summary Report
---
t/examples/library.t (Wstat: 256 Tests: 4 Failed: 1)
  Failed test:  3
  Non-zero exit status: 1
Files=1, Tests=4,  0 wallclock secs ( 0.01 usr  0.01 sys +  0.07 cusr 
0.04 csys =  0.13 CPU)

Result: FAIL


--
Alberto Simões - Departamento de Informática - Universidade do Minho
 Campus de Gualtar - 4710-057 Braga - Portugal


[perl #41874] [PATCH] extended io_mmap implementation

2008-03-17 Thread James Keenan via RT
On Mon Mar 17 08:21:14 2008, nahoo wrote:
 I couldn't find the problem when I wrote it, I think you can resolve
 the problem,  I can always resend it if I have time to find a
 solution.
 

Thanks, Rubén.  If I don't hear anything contrary from others, I'll
resolve the ticket after this week's release.

Hope you are keeping up with the Parrot project.
kid51




Re: Committer Reminder: Please Check RT

2008-03-17 Thread James E Keenan

chromatic wrote:
We have some 845 open tickets in RT, which is approximately 840 more than I'd 
like to see at any one time.  I closed a dozen or so today.  If every active 
committer could close one or two every week, we'd make real progress very 
shortly.




And if you *really* have tuits available, you can take a look at our 
TODO list:


http://rt.perl.org/rt3/NoAuth/parrot/List.html?Field=TagValue=Todo


Re: [perl #49758] [BUG] rakudo segfaults after No scope found for PAST::Var error

2008-03-17 Thread jerry gay
On Mon, Mar 17, 2008 at 10:21 AM, Will Coleda via RT
[EMAIL PROTECTED] wrote:
 On Mon Mar 17 09:34:24 2008, cognominal wrote:
   $?SUB is not reset between two evals  so the outer to an undefined
   block. I am not sure this is
   the best  place to reset $?SUB.
   At least if seems to fix the bug.
  
  
   Index: /Users/stef/svn/parrot/compilers/pct/src/PAST/Compiler.pir
   =
   ==
   --- /Users/stef/svn/parrot/compilers/pct/src/PAST/Compiler.pir
   (revision 26447)
   +++ /Users/stef/svn/parrot/compilers/pct/src/PAST/Compiler.pir
   (working copy)
   @@ -71,7 +71,9 @@
unless null blockpast goto have_blockpast
blockpast = new 'ResizablePMCArray'
set_global '@?BLOCK', blockpast
   -  have_blockpast:
   +have_blockpast:
   +null $P0
   +set_global '$?SUB', $P0
.return self.'as_post'(past, 'rtype'='v')
.end

  This avoids the segfault, so +1.

  This does make me notice, though, that PAST::Compiler is using several
  perl6 variables, which confuses me.

PAST::Compiler uses the Perl 6 naming convention for variables because
it's *way* better than hungarian notation, however it does assume
HLL writers know some Perl 6. i don't think this is too much of a
stretch, since parsers and action grammars are written in subsets of
Perl 6 already if using PCT and NQP.
~jerry


[perl #39043] [CAGE] Dynamic PMCs should not include 'parrot/parrot.h'

2008-03-17 Thread James Keenan via RT
On Mon May 01 06:47:17 2006, bernhard wrote:
 In 'include/parrot/parrot.h' it quite sensibly says:
 
 /* Only parrot core files should include this file.
Extensions should include parrot/extend.h.
Programs embedding parrot should include parrot/embed.h.
 */
 
 However all dynamic PMCs in src/dynpmc and most, if not all, language 
 PMCs are
 also including 'parrot/parrot.h'.
 
 So the dependencies on symbols not defined in 'extend.h' should go away.
 

Attached is a file which shows where we stand with respect to the
objectives of this ticket as of today.  This is the command I used in my
search:

find . -type f -a ! -path '*/.svn*' -a ! -path '*/src/pmc*' -a -name 
'*.pmc' | xargs grep -n 'parrot/parrot.h'

If someone could handle src/dynpmc/gdbmhash.pmc, then at least we would
have the non-language-specific files taken care of.

kid51




./src/dynpmc/gdbmhash.pmc:49:#include parrot/parrot.h
./languages/amber/lib/kernel/pmc/amber_character.pmc:8:#include 
parrot/parrot.h
./languages/amber/lib/kernel/pmc/amber_integer.pmc:8:#include parrot/parrot.h
./languages/amber/lib/kernel/pmc/amber_pathname.pmc:8:#include parrot/parrot.h
./languages/amber/lib/kernel/pmc/amber_array.pmc:8:#include parrot/parrot.h
./languages/amber/lib/kernel/pmc/amber_boolean.pmc:8:#include parrot/parrot.h
./languages/amber/lib/kernel/pmc/amber_default.pmc:8:#include parrot/parrot.h
./languages/amber/lib/kernel/pmc/amber_string.pmc:8:#include parrot/parrot.h
./languages/amber/lib/kernel/pmc/amber_table.pmc:8:#include parrot/parrot.h
./languages/regex/pmc/matchrange.pmc:34:#include parrot/parrot.h
./languages/regex/pmc/match.pmc:26:#include parrot/parrot.h
./languages/pugs/pmc/pugscapture.pmc:29:#include parrot/parrot.h
./languages/pugs/pmc/pugsmodule.pmc:21:#include parrot/parrot.h
./languages/pugs/pmc/pugsany.pmc:23:#include parrot/parrot.h
./languages/pugs/pmc/pugsstr.pmc:21:#include parrot/parrot.h
./languages/pugs/pmc/pugstuple.pmc:21:#include parrot/parrot.h
./languages/pugs/pmc/pugscode.pmc:21:#include parrot/parrot.h
./languages/pugs/pmc/pugsint.pmc:21:#include parrot/parrot.h
./languages/pugs/pmc/pugsbool.pmc:23:#include parrot/parrot.h
./languages/pugs/pmc/pugsmapping.pmc:21:#include parrot/parrot.h
./languages/pugs/pmc/pugsbit.pmc:21:#include parrot/parrot.h
./languages/pugs/pmc/pugsnum.pmc:21:#include parrot/parrot.h
./languages/pugs/pmc/pugsundef.pmc:21:#include parrot/parrot.h
./languages/WMLScript/pmc/wmlsbytecode.pmc:21:#include parrot/parrot.h
./languages/WMLScript/pmc/wmlsboolean.pmc:22:#include parrot/parrot.h
./languages/WMLScript/pmc/wmlsfloat.pmc:22:#include parrot/parrot.h
./languages/WMLScript/pmc/wmlsinvalid.pmc:22:#include parrot/parrot.h
./languages/WMLScript/pmc/wmlsstring.pmc:22:#include parrot/parrot.h
./languages/WMLScript/pmc/wmlsinteger.pmc:22:#include parrot/parrot.h
./languages/dotnet/pmc/dotnetfieldmetadata.pmc:9:#include parrot/parrot.h
./languages/dotnet/pmc/int64.pmc:8:#include parrot/parrot.h
./languages/dotnet/pmc/dotneteh.pmc:9:#include parrot/parrot.h
./languages/dotnet/pmc/dotnetbytecode.pmc:9:#include parrot/parrot.h
./languages/dotnet/pmc/dotnetsignature.pmc:9:#include parrot/parrot.h
./languages/dotnet/pmc/dotnetparammetadata.pmc:9:#include parrot/parrot.h
./languages/dotnet/pmc/dotnetmemberrefmetadata.pmc:9:#include parrot/parrot.h
./languages/dotnet/pmc/dotnetclassmetadata.pmc:9:#include parrot/parrot.h
./languages/dotnet/pmc/uint64.pmc:8:#include parrot/parrot.h
./languages/dotnet/pmc/dotnetassemblyref.pmc:9:#include parrot/parrot.h
./languages/dotnet/pmc/managedpointer.pmc:8:#include parrot/parrot.h
./languages/dotnet/pmc/dotnettyperefmetadata.pmc:9:#include parrot/parrot.h
./languages/dotnet/pmc/dotnetassembly.pmc:8:#include parrot/parrot.h
./languages/dotnet/pmc/dotnetmethodmetadata.pmc:9:#include parrot/parrot.h


[perl #37664] [TODO] create autogenerated files read-only

2008-03-17 Thread James Keenan via RT
On Sat Nov 12 09:22:47 2005, leo wrote:
 Not the first time I or somenone else ran into the problem of editing an 
 autogenerated file. Creating these files r/o would prevent from 
 accidental changes.
 

If someone could flesh out the intent of this ticket a bit more, I
suspect someone fluent in Perl 5 could take it, since most files are
written by Perl 5 processes.

Some guidance as to how to create read-only files on various OSes would
also be helpful.

Thank you very much.
kid51



[perl #38194] [TODO] build - optimize pmc2c.pl

2008-03-17 Thread James Keenan via RT
On Mon Jan 09 17:05:30 2006, [EMAIL PROTECTED] wrote:
 Simple profile suggests that pmc2c.pl is spending about 25% of it's
 total execution time loading FindBin.  The lib path use of FindBin::Bin
 can be replaced with 'use lib qw( . lib ../lib ../../lib );' while the
 other uses of FindBin::Bin will have be replaced by values that are
 interpolated by genfile().
 


Joshua,

Do you know if this profiling is still needed?

Here's where I find FindBin in files underlying tools/build/pmc2c.pl:

$ fnsa lib/Parrot/Pmc2c/ '*.pm' | xargs grep -in FindBin
lib/Parrot/Pmc2c/Pmc2cMain.pm:6:use FindBin;
lib/Parrot/Pmc2c/Pmc2cMain.pm:91:( ., $FindBin::Bin/../..,
$FindBin::Bin/../../src/pmc/ );
lib/Parrot/Pmc2c/Pmc2cMain.pm:103:   
$self-dump_vtable($FindBin::Bin/../../src/vtable.tbl);

If so, can you post your standard profiling command(s)?

Thank you very much.
kid51


[perl #37898] [TODO] build parrot includes

2008-03-17 Thread James Keenan via RT
As part of cage cleaning, I am attempting to determine whether the
issues raised in this long untouched RT are still pertinent.

Here are mentions of 'runtime/parrot/include' in the config/ hierarchy.

$ fns config | xargs grep -n   'runtime/parrot/include'
config/auto/signal.pm:70:my $signalpasm =
runtime/parrot/include/signal.pasm;
config/gen/makefiles/root.in:202:runtime/parrot/include/config.fpmc \
config/gen/makefiles/root.in:220:runtime/parrot/include/signal.pasm \
config/gen/makefiles/root.in:329:runtime/parrot/include/parrotlib.pbc \
config/gen/makefiles/root.in:581:runtime/parrot/include/parrotlib.pbc \
config/gen/makefiles/root.in:582:runtime/parrot/include/config.fpmc \
config/gen/makefiles/root.in:783:runtime/parrot/include/parrotlib.pbc:
runtime/parrot/library/parrotlib.pir $(PARROT)
config/gen/makefiles/root.in:786:runtime/parrot/include/config.fpmc :
myconfig config_lib.pasm $(MINIPARROT)
config/gen/makefiles/root.in:787:   @echo Invoking Parrot to
generate runtime/parrot/include/config.fpmc --cross your fingers
config/gen/makefiles/root.in:832:$(SRC_DIR)/parrot_config.c : 
runtime/parrot/include/config.fpmc \
config/gen/parrot_include.pm:10:Generates the Fruntime/parrot/include
files.
config/gen/parrot_include.pm:28:description  = q{Generating
runtime/parrot/include},
config/gen/parrot_include.pm:142:my $destdir = 'runtime/parrot/include';

Can anyone advise?  Thank you very much.
kid51




[perl #24922] [TODO] Need Ops file metadata/hints system

2008-03-17 Thread James Keenan via RT
On Mon Sep 26 21:09:20 2005, jhoblitt wrote:

 
 So would you like to merge this with 31554 or just close them both?
 


RT 31554 was marked Obsolete by Leo in October 2005.  Can anyone assess
the current pertinence of the issues raised in this ticket?

Thank you very much.
kid51




[perl #39142] [TODO] pmc2c.pl doesn't allow mixed case groups/pmc filenames.

2008-03-17 Thread James Keenan via RT
On Wed May 17 16:16:42 2006, coke wrote:
 I think that's a red herring. I'm not talking about being insensitive  
 to case, but being completely ignorant of it. pmc2c.pl is *changing  
 the case* and therefore breaking things. Especially on filesystems  
 that are case-insensitive (because it lowercases some things, and the  
 insensitive system is still able to find the file, but then those  
 files don't provide the expected interface.)
 
 I want to be able to create a group name like 'APL_group' instead of  
 'apl_group', or have a PMC file called 'APLVector.pmc' instead of  
 aplvector.pmc (which contains a PMC called 'APLVector', regardless of  
 the case of the filename.)
 


Coke:  Is this still a live issue?

kid51


Re: [perl #37664] [TODO] create autogenerated files read-only

2008-03-17 Thread chromatic
On Monday 17 March 2008 16:20:42 James Keenan via RT wrote:

 If someone could flesh out the intent of this ticket a bit more, I
 suspect someone fluent in Perl 5 could take it, since most files are
 written by Perl 5 processes.

 Some guidance as to how to create read-only files on various OSes would
 also be helpful.

I had to add set modeline to my .vimrc, but now generated files respect the 
line:

/* ex: set ro:

... when I edit them with Vim.

Making sure that all generated files have a proper modeline seems like an 
easier solution than trying to get cross-platform file permissions working.

-- c


[perl #39196] [TODO] tests - need to test addmethod

2008-03-17 Thread James Keenan via RT
I re-examined this patch tonight, cleaned it up a bit, and corrected two
spelling errors in test messages (s/verfiy/verify/g).  The file passes
all tests on both Linux and Darwin.

I'll apply the patch attached after the release if no one objects.



Thank you very much.
kid51
Index: t/pmc/objects.t
===
--- t/pmc/objects.t (revision 26458)
+++ t/pmc/objects.t (working copy)
@@ -6,7 +6,7 @@
 use warnings;
 use lib qw( . lib ../lib ../../lib );
 use Test::More;
-use Parrot::Test tests = 74;
+use Parrot::Test tests = 75;
 
 =head1 NAME
 
@@ -348,6 +348,41 @@
 ok 5
 OUTPUT
 
+pir_output_is( 'CODE', 'OUTPUT', addmethod );
+
+.sub main :main
+
+newclass $P0, 'Foo'
+$P2 = get_hll_global 'sayFoo'
+
+# add a method BEFORE creating a Foo object
+addmethod $P0, 'foo', $P2
+$P1 = new 'Foo'
+$P1.'foo'()
+
+# get a method from some other namespace
+$P2 = get_hll_global ['Bar'], 'sayBar'
+
+# add a method AFTER creating   the object
+addmethod $P0, 'bar', $P2
+$P1.'bar'()
+.end
+
+.sub sayFoo
+print foo\n
+.end
+
+.namespace ['Bar']
+
+.sub sayBar
+print bar\n
+.end
+
+CODE
+foo
+bar
+OUTPUT
+
 pasm_output_is( 'CODE', 'OUTPUT', addattribute );
 newclass P1, Foo
 # Check that addattribute doesn't blow up
@@ -629,11 +664,11 @@
 new P3, Bar
 
 # print I3  # don't assume anything about this offset
-# print \n   # ' for vim
+# print \n# ' for vim
 
-new P10, 'String'  # set attribute values
-set P10, i\n # attribute slots have reference semantics
-setattribute P3, .i, P10 # so always put new PMCs in
+new P10, 'String'   # set attribute values
+set P10, i\n  # attribute slots have reference semantics
+setattribute P3, .i, P10  # so always put new PMCs in
 # if you have unique values
 new P10, 'String'
 set P10, j\n
@@ -646,7 +681,7 @@
 set P10, l\n
 setattribute P3, .l, P10
 
-getattribute P11, P3, .i # retrieve attribs
+getattribute P11, P3, .i  # retrieve attribs
 print P11
 getattribute P11, P3, .j
 print P11
@@ -687,8 +722,8 @@
 new P13, Bar
 
 # Foo and Bar have attribute accessor methods
-new P5, 'String'   # set attribute values
-set P5, i\n  # attribute slots have reference semantics
+new P5, 'String'# set attribute values
+set P5, i\n   # attribute slots have reference semantics
 set_args 0,0, P5, i
 get_results 
 callmethodcc P13, Foo::set
@@ -715,7 +750,7 @@
 set_args 0,  i
 get_results 0, P5
 callmethodcc  P13,Foo::get
-print P5   # return result
+print P5# return result
 
 set_args 0,  j
 get_results 0, P5
@@ -725,7 +760,7 @@
 set_args 0,  k
 get_results 0, P5
 callmethodcc  P13,Bar::get
-print P5   # return result
+print P5# return result
 
 set_args 0,  l
 get_results 0, P5
@@ -739,7 +774,7 @@
 print in Foo::set\n
 .include interpinfo.pasm
 interpinfo P2, .INTERPINFO_CURRENT_OBJECT
-setattribute P2, S4, P5# so always put new PMCs in
+setattribute P2, S4, P5 # so always put new PMCs in
 set_returns 
 returncc
 
@@ -756,7 +791,7 @@
 get_params 0,0, P5, S4
 interpinfo P2, .INTERPINFO_CURRENT_OBJECT
 print in Bar::set\n
-setattribute P2, S4, P5# so always put new PMCs in
+setattribute P2, S4, P5 # so always put new PMCs in
 set_returns 
 returncc
 
@@ -808,8 +843,8 @@
 new P2, Bar
 
 # Foo and Bar have attribute accessor methods
-new P5, 'String'   # set attribute values
-set P5, i\n  # attribute slots have reference semantics
+new P5, 'String'# set attribute values
+set P5, i\n   # attribute slots have reference semantics
 set_args 0,0,0, P5, Foo, i
 get_results 
 callmethodcc P2, set
@@ -842,7 +877,7 @@
 set_args 0,0, Foo, i
 get_results 0, P5
 callmethodcc P2, get
-print P5   # return result
+print P5# return result
 
 set_args 0,0, Foo, j
 get_results 0, P5
@@ -1238,12 +1273,12 @@
   .local pmc i
   i = new MyInt
   print ok 3\n
-  i = 42   # set_integer is inherited from Integer
+  i = 42# set_integer is inherited from Integer
   print ok 4\n
-  $I0 = i  # get_integer is overridden below
+  $I0 = i   # get_integer is overridden below
   print $I0
   print \n
-  $S0 = i  # get_string is overridden below
+  $S0 = i   # get_string is overridden below
   print $S0
   print \n
 .end
@@ -1297,7 +1332,7 @@
   $I0 = k
   print $I0
   print \n
-  $S0 = k  # get_string is overridden below
+  $S0 = k   # get_string is overridden below
   print $S0
   print \n
 .end
@@ -1381,12 +1416,12 @@
   print $I0
   

Re: [perl #37664] [TODO] create autogenerated files read-only

2008-03-17 Thread Bob Rogers
   From: chromatic [EMAIL PROTECTED]
   Date: Mon, 17 Mar 2008 16:54:02 -0700

   I had to add set modeline to my .vimrc, but now generated files
   respect the line:

   /* ex: set ro:

   ... when I edit them with Vim.

And adding buffer-read-only: t to Local variables: at the end will
do the same for Emacs.

-- Bob Rogers
   http://rgrjr.dyndns.org/


Re: [perl #38194] [TODO] build - optimize pmc2c.pl

2008-03-17 Thread Joshua Hoblitt
James,

Profiling is generally done with Devel::Profile.

http://search.cpan.org/~jaw/Devel-Profile-1.05/Profile.pm

Since pmc2c.pl is invoked so many times in the build process improving
it's performance would sustainably speed up the overall build time.

Cheers,

-J

--
On Mon, Mar 17, 2008 at 04:31:17PM -0700, James Keenan via RT wrote:
 On Mon Jan 09 17:05:30 2006, [EMAIL PROTECTED] wrote:
  Simple profile suggests that pmc2c.pl is spending about 25% of it's
  total execution time loading FindBin.  The lib path use of FindBin::Bin
  can be replaced with 'use lib qw( . lib ../lib ../../lib );' while the
  other uses of FindBin::Bin will have be replaced by values that are
  interpolated by genfile().
  
 
 
 Joshua,
 
 Do you know if this profiling is still needed?
 
 Here's where I find FindBin in files underlying tools/build/pmc2c.pl:
 
 $ fnsa lib/Parrot/Pmc2c/ '*.pm' | xargs grep -in FindBin
 lib/Parrot/Pmc2c/Pmc2cMain.pm:6:use FindBin;
 lib/Parrot/Pmc2c/Pmc2cMain.pm:91:( ., $FindBin::Bin/../..,
 $FindBin::Bin/../../src/pmc/ );
 lib/Parrot/Pmc2c/Pmc2cMain.pm:103:   
 $self-dump_vtable($FindBin::Bin/../../src/vtable.tbl);
 
 If so, can you post your standard profiling command(s)?
 
 Thank you very much.
 kid51


pgpEx43QpmCm6.pgp
Description: PGP signature


[perl #35391] [TODO] filepath manipulations

2008-03-17 Thread James Keenan via RT
On Fri Nov 11 11:41:28 2005, particle wrote:
  [leo - Tue May 10 05:13:47 2005]:
 [above code snipped]
  As a starter an equivalent of File::Spec::catfile() would suffice to be 
  able to rewrite above code.
  
 File::Spec::catdir() has been implemented for win32. catfile() is coming
 soon. stay tuned for unix implementations, which should follow.
 

Can we get an update on the status of this ticket?

Thank you very much.

kid51


[perl #37542] [TODO] core - document behavior of multiple :load subpragmas in same compilation unit

2008-03-17 Thread James Keenan via RT
On Tue Feb 20 00:31:58 2007, kjs wrote:

 Fortunately, in this case it looks to me as though t/pmc/sub.t 
 does have tests that check for proper execution of multiple 
 :load subs.  So I think this ticket can be safely closed.
 

Jonathan, Patrick, kjs:  Can the ticket be closed?

Thank you very much.
kid51


[perl #38083] [TODO] adjust parrot test harness to fill I/N registers with garbage by default

2008-03-17 Thread James Keenan via RT
This ticket was apparently never closed when it should have been back in
Dec 2006.  Doing so now.

kid51


[perl #39711] [TODO] Make PIR-PBC reentrant

2008-03-17 Thread James Keenan via RT
On Wed Jul 05 00:24:34 2006, [EMAIL PROTECTED] wrote:

 
 Done, and I also added Vishal as a requestor on the relevant tickets.
 

The discussion appears to have been wrapped up, but the ticket was never
resolved.  Can we do so now?

Thank you very much.

kid51


[perl #39718] [TODO] Tcl - Add tests for untested, implemented commands

2008-03-17 Thread James Keenan via RT
On Tue Jul 04 23:25:37 2006, mdiep wrote:
 The following commands are implemented but have no tests:
 
 after
 binary
 close
 file
 gets
 lrange
 open
 

Since I don't know TCL, I can't evaluate how well these commands have
been tested.  But in languages/tcl/t, I see tests whose names refer to:

after
binary
file
gets
lrange

... but not for:

open
close

Can anyone give us a better idea how we're doing on these tests?

Thank you very much.

kid51


[perl #39719] [TODO] Tcl - Design a template syntax for subcommands

2008-03-17 Thread James Keenan via RT
On Fri Jul 07 18:39:17 2006, coke wrote:
 Proposed design: simply have multiple sections in the code that start
 with []. it's visually
 distinctive, and allows you to keep the code for each subcommand
 *near* that subcommand.

Cage cleaner wants to know:  Can we get an update on this ticket?

Thank you very much.

kid51


[perl #39852] [TODO] Tcl - Create the ::tcl namespace properly

2008-03-17 Thread James Keenan via RT
On Sun Jul 16 15:12:44 2006, mdiep wrote:
[snip]
 This is a temporary hack that creates the ::tcl namespace. The sub is  
 required to make Parrot actually create the namespace. This should be  
 replaced with code (elsewhere) that actually populates the ::tcl with  
 whatever it's supposed to contain.
 

Has anyone attempted this hack replacement?

Thank you very much.

kid51



[perl #39939] [TODO] exhaustively test new {set,get}*global and get*namespace opcodes

2008-03-17 Thread James Keenan via RT
This ticket hasn't been touched in going on two years, but it was
phrased very generally.

Can anyone provide a description of the opcodes that would need testing
and/or how far we've gotten?

Thank you very much.

kid51


Re: [perl #51790] Segfaults for GDBMHash in -C and -S runcores

2008-03-17 Thread chromatic
On Sunday 16 March 2008 06:57:32 Bernhard Schmalhofer wrote:

 running 'make fulltest' under Linux leaves me with segfaults for
 gdbmhast.t.

 t/dynpmc/foo.ok
 t/dynpmc/gdbmhash
 #   Failed test 'get_integer'
 #   at t/dynpmc/gdbmhash.t line 73.
 # Exited with error code: 139
 # Received:
 # Segmentation fault (core dumped)
 #
 # Expected:
 # An unitialized GDBMHash has size 0.
 # An GDBMHash for a new file has size 0.
 # After one assignment GDBMHash has size 1.
 # After two assignments GDBMHash has size 2.
 # After 15 assignments GDBMHash has size 15.
 #

 #   Failed test 'get_bool'
 #   at t/dynpmc/gdbmhash.t line 125.
 # Exited with error code: 139
 # Received:
 # Segmentation fault (core dumped)
 #
 # Expected:
 # An uninitialized GDBMHash is not.
 # An GDBMHash for a new file is not.
 # After one insert the GDBMHash is.
 #
 # Looks like you failed 2 tests of 13.
  Dubious, test returned 2 (wstat 512, 0x200)
  Failed 2/13 subtests
 t/dynpmc/rationalok

 This happens only for the computed-goto and for the switched runcore.

Parrot_MD5_init() isn't getting called, for some reason.  That's why the 
PMC_data() of this PMC is null when initializing the MD5 library.

-- c