contrib tool: search for opcodes

2006-07-07 Thread João Cruz Morais

The subject says it all :)
Given a valid regex (pcre) as an argument, the script will search
inside every *.ops file for an opcode name that matches, and dumps
both its arguments and its description. If no argument is passed every
opcode is dumped.

Example:

./search-ops.py find_n


--
File: string.ops - String Operations (1 matches)
--

find_not_cclass(out INT, in INT, in STR, in INT, in INT)
Set $1 to the offset of the first codepoint not matching the character
class(es) given by $2 in string $3, starting at offset $4 for up to $5
codepoints.  If the substring consists entirely of matching
characters, set $1 to (offset + count).

--
File: var.ops - Variable Ops (1 matches)
--

find_name(out PMC, in STR)
Find the name $2 in lexical, current, global, or builtin namespace and
store it in $1. If the name doesn't exist either throws an exception
or sets $1 to PMCNULL, depending on current errors settings. See
Berrorson.

-

The script will work right away if you place it inside
trunk/tools/util. Otherwise edit and change the 'path' as you wish.

If you think that's a useful development tool, feel free to add it to
the existing ones. I've done it in python I hope there's no problem
with that.

Cheers,
João
#!/usr/bin/python

import os, re
from sys import argv, exit

path = ../../src/ops/ # path to the ops source folder

def wrap(text, width):
return reduce(lambda line, word, width=width: '%s%s%s' %
  (line,
   ' \n'[(len(line)-line.rfind('\n')-1
 + len(word.split('\n',1)[0]
  ) = width)],
   word),
  text.split(' ')
 )

query = 
if len(argv)  1:
query = argv[1]

try:
query = re.compile(query)
except:
print Invalid opcode regex
exit()

path = path.replace(\\, /)
if len(path)  0 and path[-1] != /:
path = path + /

try:
opFiles = os.listdir(path)
except:
print Path not found
exit()

p = re.compile(\.ops$)
opFiles = filter(lambda file: p.search(file) is not None, opFiles)

matches = []

for file in opFiles:
results = []
opsc = open(path+file, r).read()

p = re.compile(^=item\sB(\w+)\(([^)]+)\)\n\n(?=(.*?)\n\n), 
re.MULTILINE|re.DOTALL)
for m in p.findall(opsc):
if query.search(m[0]) is None:
continue
if re.compile(=item).match(m[2]) is not None:
m = list(m)
m[2] = None
results.append(m)

if len(results)  0:
title = re.compile(^=head1\sNAME\n\n(.*), 
re.MULTILINE).search(opsc).group(1)
matches.append({f: title, rs: results})

if len(matches) == 0:
print No matches were found
else:
for v in matches:
print \n + -*70 + \nFile: %s (%d matches)\n % 
(v[f],len(v[rs])) + -*70 + \n
for m in v[rs]:
print %s(%s) % tuple(m[:2])
if m[2] is not None:
print wrap(m[2].replace(\n,  ), 70)+\n

contrib tool: search for opcodes

2006-07-07 Thread João Cruz Morais

(moderator please reject my other message - wrong email)

The subject says it all :)
Given a valid regex (pcre) as an argument, the script will search
inside every *.ops file for an opcode name that matches, and dumps
both its arguments and its description. If no argument is passed every
opcode found is dumped.

Example:

./search-ops.py find_n


--
File: string.ops - String Operations (1 matches)
--

find_not_cclass(out INT, in INT, in STR, in INT, in INT)
Set $1 to the offset of the first codepoint not matching the character
class(es) given by $2 in string $3, starting at offset $4 for up to $5
codepoints.  If the substring consists entirely of matching
characters, set $1 to (offset + count).

--
File: var.ops - Variable Ops (1 matches)
--

find_name(out PMC, in STR)
Find the name $2 in lexical, current, global, or builtin namespace and
store it in $1. If the name doesn't exist either throws an exception
or sets $1 to PMCNULL, depending on current errors settings. See
Berrorson.

-

The script will work right away if you place it inside
trunk/tools/util. Otherwise edit and change the 'path' as you wish.

If you think that's a useful development tool, feel free to add it to
the existing ones. I've done it in python I hope there's no problem
with that.

Cheers,
João
#!/usr/bin/python

import os, re
from sys import argv, exit

path = ../../src/ops/ # path to the ops source folder

def wrap(text, width):
return reduce(lambda line, word, width=width: '%s%s%s' %
  (line,
   ' \n'[(len(line)-line.rfind('\n')-1
 + len(word.split('\n',1)[0]
  ) = width)],
   word),
  text.split(' ')
 )

query = 
if len(argv)  1:
query = argv[1]

try:
query = re.compile(query)
except:
print Invalid opcode regex
exit()

path = path.replace(\\, /)
if len(path)  0 and path[-1] != /:
path = path + /

try:
opFiles = os.listdir(path)
except:
print Path not found
exit()

p = re.compile(\.ops$)
opFiles = filter(lambda file: p.search(file) is not None, opFiles)

matches = []

for file in opFiles:
results = []
opsc = open(path+file, r).read()

p = re.compile(^=item\sB(\w+)\(([^)]+)\)\n\n(?=(.*?)\n\n), 
re.MULTILINE|re.DOTALL)
for m in p.findall(opsc):
if query.search(m[0]) is None:
continue
if re.compile(=item).match(m[2]) is not None:
m = list(m)
m[2] = None
results.append(m)

if len(results)  0:
title = re.compile(^=head1\sNAME\n\n(.*), 
re.MULTILINE).search(opsc).group(1)
matches.append({f: title, rs: results})

if len(matches) == 0:
print No matches were found
else:
for v in matches:
print \n + -*70 + \nFile: %s (%d matches)\n % 
(v[f],len(v[rs])) + -*70 + \n
for m in v[rs]:
print %s(%s) % tuple(m[:2])
if m[2] is not None:
print wrap(m[2].replace(\n,  ), 70)+\n

[perl #39757] [BUG] sprintf left-justification doesn't work

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


   mini:~/Projects/parrot mdiep$ cat test.pir
   .sub main :main
 $P0 = new .ResizablePMCArray
 $P1 = new .Integer
 $P1 = 10
 $P0[0] = $P1
 $P1 = new .String
 $P1 = foo
 $P0[1] = $P1
 $P1 = new .String
 $P1 = bar
 $P0[2] = $P1
 $S0 = sprintf %-*s - %s\n, $P0
 print $S0
 end
   .end

   mini:~/Projects/parrot mdiep$ parrot test.pir
   foo - bar
   mini:~/Projects/parrot mdiep$

That should output foo- bar instead.

Tcl may be blocking on this soon, so takers wanted. :-)

--
Matt Diephouse



Re: HLL root globals and empty keys (was Re: test of get_namespace opcode)

2006-07-07 Thread Allison Randal

Chip Salzenberg wrote:


Well, I see a lot to like about this, but (and you knew there was a but
(but that's my job now :-))), in descending order of difficulty:


And you do it so well. Thank you. :)


 * The division into two categories (global and symbol) leaves the third
   category (current namespace) with no clear home.


Agreed.


 * All the things being accessed are globals.  Seems like the word global
   should be used consistently, and symbol has many meanings in Parrot
   that only partly overlap the specific meaning of global.


Agreed.


 * We still don't have way to ask for my HLL without spelling it.  I can
   say my HLL's Foo without spelling my HLL, but when I go up to my HLL's
   root I must suddenly know the spelling of my HLL and say it.  Seems like
   a sign of a design problem.


Agreed.


 * The global root is available as Cinterpinfo .INTERPINFO_ROOT_NAMESPACE
   at present -- awkward but fast.  Since global root accesses are supposed
   to be rare, awkwardness doesn't bug me for that case.  But adding opcodes
   for absolute-root ... hey, absolute, that's a good name.
 
 * Huffmanizing shouldn't be as big a consideration with PIR/pasm as with

   most languages.  Most PIR/pasm is program-generated.


Agreed, with a note of balance that we also want to avoid the pain of 
XS. Sometimes you need to poke into the guts of the system, and when you 
do, you want it to be pleasant to work with, even though it's not fancy.



So here's an illustrative suggestion, which I think is a variant on one of
your also-rans, albeit one that leaves the common HLL case unmarked:

  .HLL 'perl5', perl5_group
  .namespace ['Foo']

  $P0 = get_cur_global 'x'  # ['perl5';'Foo';'x']
  $P0 = get_cur_global ['Bar'], 'x' # ['perl5';'Foo';'Bar';'x']

  $P0 = get_global 'x'  # ['perl5';'x']
  $P0 = get_global ['Corge'], 'x'   # ['perl5';'Corge';'x']

  $P0 = get_abs_global 'x'  # ['x']
  $P0 = get_abs_global ['parrot'], 'x'  # ['parrot';'x']


This is non-evil. :)

I would rename 'get_cur_global' to 'get_global'. The selected namespace 
indicates that most of the code belongs in that namespace, so it's 
likely that most of the variables do too. (There are variations, but 
that's at least the common case.)


Then, what to call the HLL root access opcodes... perhaps 
'get_rel_global' (for relative root)?


Allison


Ruby on Parrot

2006-07-07 Thread Allison Randal
I gave a Parrot talk at a Ruby user group meeting tonight. Someone 
mentioned that they had seen somebody on #parrot who was working on a 
new Ruby implementation based on Punie. Do you exist? And is there 
anything we can do to help you?


Allison


[perl #39746] [NEW] t/codingstd/fixme.t - search for FIXME comments in source

2006-07-07 Thread John J. Trammell
# New Ticket Created by  John J. Trammell 
# Please include the string:  [perl #39746]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=39746 


New technical debt test to look for FIXME, TODO, and XXX markers in
C code and headers.

-- 
He's dead, Jim.  You get his tricorder, I'll get his wallet.
--- MANIFEST2006-07-06 15:37:58.0 -0500
+++ MANIFEST.new2006-07-06 15:33:23.0 -0500
@@ -980,6 +980,7 @@
 t/examples/subs.t []
 t/examples/namespace.t[]
 t/codingstd/cppcomments.t []
+t/codingstd/fixme.t   []
 config/inter/shlibs.pm[]
 config/inter/types.pm []
 config/inter/encoding.pm  []
#! perl
# Copyright (C) 2001-2006, The Perl Foundation.
# $Id$

use strict;
use warnings;
use lib qw( . lib ../lib ../../lib );
use Test::More;
use Parrot::Distribution;


=head1 NAME

t/codingstd/fixme.t - checks for FIXME and similar notes in C source and 
headers

=head1 SYNOPSIS

% prove t/codingstd/fixme.t

=head1 DESCRIPTION

Checks that no C source or header file in the distribution contains the
following strings:

FIXME
TODO
XXX

=cut


my @files = @ARGV ? @ARGV : source_files();

plan tests = scalar @files;

foreach my $file (@files) {
open FILE, $file or die Unable to open '$file' for reading: $!;

my @matches;
while (FILE) {
next unless /(FIXME|XXX|TODO)/;
push @matches, file '$file', line $.: $1\n;
}
close FILE;

is(scalar(@matches), 0, file '$file' has no FIXME strings)
  or diag(@matches);
}

sub source_files {
my $dist = Parrot::Distribution-new;
return map { $_-path } (
map($_-files_of_type('C code'),   $dist-c_source_file_directories),
map($_-files_of_type('C header'), $dist-c_header_file_directories),
);
}



[perl #39552] Segfault on FreeBSD during make

2006-07-07 Thread Chip Salzenberg via RT
Is this bug still reproducible this even after removing everything
Parrot-related from /usr/local?  (Also /usr/bin and /usr/lib if you
happen to have installed e.g. Debian's parrot packages.)


[perl #39745] [PATCH] Fixed TODO on t/codingstd/cppcomments.t

2006-07-07 Thread John J. Trammell
# New Ticket Created by  John J. Trammell 
# Please include the string:  [perl #39745]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=39745 


Test now uses Parrot::Distribution module instead of mass globbing.

output of diffstat:
 cppcomments.t |   58 +++---
 1 files changed, 19 insertions(+), 39 deletions(-)

-- 
alias kill 'kill -9 \!* ; kill -9 \!* ; kill -9 \!*'
Index: t/codingstd/cppcomments.t
===
--- t/codingstd/cppcomments.t   (revision 13166)
+++ t/codingstd/cppcomments.t   (working copy)
@@ -7,6 +7,7 @@
 
 use lib qw( . lib ../lib ../../lib );
 use Test::More tests = 1;
+use Parrot::Distribution;
 
 
 =head1 NAME
@@ -21,51 +22,30 @@
 
 Checks that no source file in the distribution uses C++ style comments.
 
-=head1 TODO
-
-Use Parrot::Distribution for looking for C-source files.
-
 =cut
 
 
-my @globs = qw(
-compilers/ast/*.c
-compilers/ast/*.h
-compilers/imcc/*.c
-compilers/imcc/*.h
-include/parrot/*.h
-include/parrot/oplib/*.h
-src/*.c
-src/charset/*.c
-src/charset/*.h
-src/dynoplibs/*.ops
-src/dynpmc/*.pmc
-src/encodings/*.c
-src/encodings/*.h
-src/io/*.c
-src/io/*.h
-src/jit/*/*.h
-src/ops/*.ops
-src/pmc/*.pmc
-src/packfile/*.c
-);
+sub source_files {
+my $dist = Parrot::Distribution-new;
+return (
+map($_-files_of_type('C code'),   $dist-c_source_file_directories),
+map($_-files_of_type('C header'), $dist-c_header_file_directories),
+);
+}
 
 my @comments;
 
-foreach my $glob ( @globs ) {
-foreach my $file ( glob $glob ) {
-
-open FILE, $file or die Can not open '$file' for reading!\n;
-foreach my $line ( FILE ) {
-next unless $line =~ m{//};
-next if $line =~ m{://}; # skip ftp:// http:// etc
-next if $line =~ m{//}; # skip printf(//= )
-
-push @comments, $file: $line
-}
-close FILE;
+foreach my $file ( source_files ) {
+my $path = $file-path;
+open(my $fh, q(), $path) or die Can not open '$path' for reading!\n;
+foreach my $line ($fh) {
+next unless $line =~ m{//};
+next if $line =~ m{://};# skip ftp:// http:// etc
+next if $line =~ m{//};# skip printf(//= )
+push @comments, $path: $line;
 }
 }
 
-ok( ! scalar(@comments), 'C++ style comments')
-or diag( C++ style comments found:[EMAIL PROTECTED] );
+ok(!scalar(@comments), 'C++ style comments')
+  or diag(C++ style comments found:[EMAIL PROTECTED]);
+


[perl #39754] [EMAIL PROTECTED]: tru64 core dump: t/pmc/resizablebooleanarray_20.pasm

2006-07-07 Thread via RT
# New Ticket Created by  Jarkko Hietaniemi 
# Please include the string:  [perl #39754]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=39754 


(dbx) run --gc-debug t/pmc/resizablebooleanarray_20.pasm
thread 0x3 signal Segmentation fault at
warning: src/pmc/fixedbooleanarray.pmc:188 has no code associated with it

  [Parrot_FixedBooleanArray_get_integer_keyed_int
warning: src/pmc/fixedbooleanarray.pmc:188 has no code associated with it

:188 +0x201b8b9d,0x1201b8b9c]
(dbx) where
  0 Parrot_FixedBooleanArray_get_integer_keyed_int(interpreter = 0x1401c4000, 
 pmc = 0x14049f5a0, key = 5000) [src/pmc/fixedbooleanarray.c:188, 
 0x1201b8b9c]
   1 Parrot_ResizableBooleanArray_get_integer_keyed_int(interpreter = 
0x1401c4000, pmc = 0x14049f5a0, key = 5000) 
[src/pmc/resizablebooleanarray.c:66, 0x1201be5b4]
   2 Parrot_set_i_p_kic(cur_opcode = 0x1404c7418, interpreter = 0x1401c4000) 
[src/ops/set.ops:417, 0x1200e6fa8]
   3 runops_slow_core(interpreter = 0x1401c4000, pc = 0x1404c7418) 
[src/runops_cores.c:180, 0x12014b208]
   4 runops_int( = 0x1404c7280,  = 0x1404c7280, interpreter = 0x1401c4000, 
offset = 0) [src/interpreter.c:775, 0x1200f9bb8]
   5 runops(interpreter = 0x1401c4000, offs = 0) [src/inter_run.c:81, 
0x1200f7f60]
   6 runops_args(interpreter = 0x1401c4000, sub = 0x14049f640, obj = 
0x1401214c0, meth = (nil), sig = 0x140061298 = vP, ap = struct {
_a0 = 0x11fffbf40
_offset = 24
}) [src/inter_run.c:182, 0x1200f8290]
   7 Parrot_runops_fromc_args(interpreter = 0x1401c4000, sub = 0x14049f640, sig
= 0x140061298 = vP) [src/inter_run.c:276, 0x1200f8460]
   8 Parrot_runcode(interpreter = 0x1401c4000, argc = 1, argv = 0x11fffc028) 
[src/embed.c:802, 0x1200a6384]
   9 main(argc = 1, argv = 0x11fffc028) [compilers/imcc/main.c:681, 
0x120088f60]
(dbx)

Summary of my parrot 0.4.5 (r13183) configuration:
  configdate='Fri Jul  7 00:08:51 2006'
  Platform:
osname=dec_osf, archname=alpha-dec_osf
jitcapable=0, jitarchname=nojit,
jitosname=dec_osf, jitcpuarch=alpha
execcapable=0
perl=/u/vieraat/vieraat/jhi/Perl/Platform/OSF1/bin/perl
  Compiler:
cc='cc', ccflags='-std -D_INTRINSICS -fprm d -ieee -I/p/include 
-DLANGUAGE_C -pthread -D_XOPEN_SOURCE=500',
  Linker and Libraries:
ld='ld', ldflags=' -L/p/lib',
cc_ldflags='',
libs='-lm -lutil -lpthread -laio -lrt -lgmp'
  Dynamic Linking:
share_ext='.so', ld_share_flags='-shared -expect_unresolved * -O4 -msym 
-std -L/p/lib',
load_ext='.so', ld_load_flags='-shared -expect_unresolved * -O4 -msym 
-std -L/p/lib'
  Types:
iv=long, intvalsize=8, intsize=4, opcode_t=long, opcode_t_size=8,
ptrsize=8, ptr_alignment=8 byteorder=12345678, 
nv=double, numvalsize=8, doublesize=8


[perl #39756] [EMAIL PROTECTED]: tru64 core dump: t/examples/japh_10.pasm

2006-07-07 Thread via RT
# New Ticket Created by  Jarkko Hietaniemi 
# Please include the string:  [perl #39756]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=39756 


(dbx) run --gc-debug t/examples/japh_10.pasm
run --gc-debug t/examples/japh_10.pasm
thread 0x3 signal Segmentation fault at   [clone_interpreter:63 +0xc,0x120122738
]   d-run_core = s-run_core;
(dbx) p d
(nil)
(dbx) where
  0 clone_interpreter(dest = 0x14049f618, self = 0x1404a22c8) 
 [src/pmc/parrotinterpreter.pmc:63, 0x120122738]
   1 pt_thread_run(interp = 0x1401c4000, dest_interp = 0x14049f618, sub = 
0x14049f500) [src/thread.c:147, 0x1200b8e58]
   2 pt_thread_run_3(interp = 0x1401c4000, dest_interp = 0x14049f618, sub = 
0x14049f500) [src/thread.c:221, 0x1200b8ff4]
   3 pcf_v_JOP( = 0x1200bea5c,  = 0x1200bea5c,  = 0x1200bea5c, interpreter = 
0x1401c4000, self = 0x14022d608) [src/nci.c:3266, 0x1201d0520]
   4 Parrot_NCI_invoke( = 0x1200c48c4,  = 0x1200c48c4, interpreter = 
0x1401c4000, pmc = 0x14022d608, next = 0x1404deb10) [src/pmc/nci.c:146, 
0x120178668]
   5 Parrot_invokecc_p(cur_opcode = 0x1404deb00, interpreter = 0x1401c4000) 
[src/ops/core.ops:414, 0x1200c48c0]
   6 runops_slow_core(interpreter = 0x1401c4000, pc = 0x1404deb00) 
[src/runops_cores.c:180, 0x12014b208]
   7 runops_int( = 0x1404dea00,  = 0x1404dea00, interpreter = 0x1401c4000, 
offset = 0) [src/interpreter.c:775, 0x1200f9bb8]
   8 runops(interpreter = 0x1401c4000, offs = 0) [src/inter_run.c:81, 
0x1200f7f60]
   9 runops_args(interpreter = 0x1401c4000, sub = 0x14049f640, obj = 
0x1401214c0, meth = (nil), sig = 0x140061298 = vP, ap = struct {
_a0 = 0x11fffbf40
_offset = 24
}) [src/inter_run.c:182, 0x1200f8290]
  10 Parrot_runops_fromc_args(interpreter = 0x1401c4000, sub = 0x14049f640, sig
= 0x140061298 = vP) [src/inter_run.c:276, 0x1200f8460]
  11 Parrot_runcode(interpreter = 0x1401c4000, argc = 1, argv = 0x11fffc028) 
[src/embed.c:802, 0x1200a6384]
  12 main(argc = 1, argv = 0x11fffc028) [compilers/imcc/main.c:681, 
0x120088f60]
(dbx)

Summary of my parrot 0.4.5 (r13183) configuration:
  configdate='Fri Jul  7 00:08:51 2006'
  Platform:
osname=dec_osf, archname=alpha-dec_osf
jitcapable=0, jitarchname=nojit,
jitosname=dec_osf, jitcpuarch=alpha
execcapable=0
perl=/u/vieraat/vieraat/jhi/Perl/Platform/OSF1/bin/perl
  Compiler:
cc='cc', ccflags='-std -D_INTRINSICS -fprm d -ieee -I/p/include 
-DLANGUAGE_C -pthread -D_XOPEN_SOURCE=500',
  Linker and Libraries:
ld='ld', ldflags=' -L/p/lib',
cc_ldflags='',
libs='-lm -lutil -lpthread -laio -lrt -lgmp'
  Dynamic Linking:
share_ext='.so', ld_share_flags='-shared -expect_unresolved * -O4 -msym 
-std -L/p/lib',
load_ext='.so', ld_load_flags='-shared -expect_unresolved * -O4 -msym 
-std -L/p/lib'
  Types:
iv=long, intvalsize=8, intsize=4, opcode_t=long, opcode_t_size=8,
ptrsize=8, ptr_alignment=8 byteorder=12345678, 
nv=double, numvalsize=8, doublesize=8


[perl #39753] [EMAIL PROTECTED]: tru64 core dump: t/pmc/io_1.pir

2006-07-07 Thread via RT
# New Ticket Created by  Jarkko Hietaniemi 
# Please include the string:  [perl #39753]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=39753 


(dbx) run --gc-debug t/pmc/io_1.pir
Undef ok 1
Undef ok 2
Assertion failed: (unsigned long)l != 0xdeadbeefUL, file src/io/io.c, line 1017
thread 0x13 signal IOT/Abort trap at *[__nxm_thread_kill, 0x3ff805c5908]  
ret  zero, (ra), 1
(dbx) where
  0 __nxm_thread_kill(0x6, 0x3ffc01b6000, 0x3ff805c3788, 0x3ffc01b6000, 
 0x3ffc01b6000) [0x3ff805c5908]
   1 pthread_kill(0x11fffbd07, 0x11fffbd10, 0x11fffbd00, 0x11fffbd0d, 0x5) 
[0x3ff805c37a0]
   2 __tis_raise(0x11fffbd00, 0x11fffbd0d, 0x5, 0x1, 0x3ff801d27bc) 
[0x3ff801405d4]
   3 abort(0x3ff801d2224, 0x0, 0x3ff805c4cc0, 0x0, 0x6) [0x3ff801d27b8]
   4 __assert(0x3ff800c2ad0, 0x3ff800c2ac0, 0x7, 0x1, 0x7) [0x3ff801d2220]
   5 PIO_putps(interpreter = 0x1401c4000, pmc = 0x1401214c0, s = 0x14047bf40) 
[src/io/io.c:1017, 0x1200b7be4]
   6 Parrot_print_p_sc(cur_opcode = 0x1404ea2b8, interpreter = 0x1401c4000) 
[src/ops/io.ops:329, 0x1200d2a88]
   7 runops_slow_core(interpreter = 0x1401c4000, pc = 0x1404ea2b8) 
[src/runops_cores.c:180, 0x12014b208]
   8 runops_int( = 0x1404ea000,  = 0x1404ea000, interpreter = 0x1401c4000, 
offset = 0) [src/interpreter.c:775, 0x1200f9bb8]
   9 runops(interpreter = 0x1401c4000, offs = 0) [src/inter_run.c:81, 
0x1200f7f60]
  10 runops_args(interpreter = 0x1401c4000, sub = 0x14049f640, obj = 
0x1401214c0, meth = (nil), sig = 0x140061298 = vP, ap = struct {
_a0 = 0x11fffbf40
_offset = 24
}) [src/inter_run.c:182, 0x1200f8290]
  11 Parrot_runops_fromc_args(interpreter = 0x1401c4000, sub = 0x14049f640, sig
= 0x140061298 = vP) [src/inter_run.c:276, 0x1200f8460]
  12 Parrot_runcode(interpreter = 0x1401c4000, argc = 1, argv = 0x11fffc028) 
[src/embed.c:802, 0x1200a6384]
  13 main(argc = 1, argv = 0x11fffc028) [compilers/imcc/main.c:681, 
0x120088f60]
(dbx)

Summary of my parrot 0.4.5 (r13183) configuration:
  configdate='Fri Jul  7 00:08:51 2006'
  Platform:
osname=dec_osf, archname=alpha-dec_osf
jitcapable=0, jitarchname=nojit,
jitosname=dec_osf, jitcpuarch=alpha
execcapable=0
perl=/u/vieraat/vieraat/jhi/Perl/Platform/OSF1/bin/perl
  Compiler:
cc='cc', ccflags='-std -D_INTRINSICS -fprm d -ieee -I/p/include 
-DLANGUAGE_C -pthread -D_XOPEN_SOURCE=500',
  Linker and Libraries:
ld='ld', ldflags=' -L/p/lib',
cc_ldflags='',
libs='-lm -lutil -lpthread -laio -lrt -lgmp'
  Dynamic Linking:
share_ext='.so', ld_share_flags='-shared -expect_unresolved * -O4 -msym 
-std -L/p/lib',
load_ext='.so', ld_load_flags='-shared -expect_unresolved * -O4 -msym 
-std -L/p/lib'
  Types:
iv=long, intvalsize=8, intsize=4, opcode_t=long, opcode_t_size=8,
ptrsize=8, ptr_alignment=8 byteorder=12345678, 
nv=double, numvalsize=8, doublesize=8


[perl #39750] [EMAIL PROTECTED]: tru64 core dump: t/examples/japh_12.pasm

2006-07-07 Thread via RT
# New Ticket Created by  Jarkko Hietaniemi 
# Please include the string:  [perl #39750]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=39750 


(dbx) run --gc-debug t/examples/japh_12.pasm
Parrot VM: PANIC: Out of bound register access!
C file src/ops/set.ops, line 336
Parrot file (not available), line (not available)

We highly suggest you notify the Parrot team if you have not been working on
Parrot.  Use parrotbug (located in parrot's root directory) or send an
e-mail to [EMAIL PROTECTED]
Include the entire text of this error message and the text of the script that
generated the error.  If you've made any modifications to Parrot, please
describe them as well.

Version : 0.4.5-devel
Configured  : Thu Jul  6 23:16:59 2006
Architecture: nojit
JIT Capable : No
Interp Flags: 0x10
Exceptions  : (missing from core)

Dumping Core...
thread 0x3 signal Quit at *[__nxm_thread_kill, 0x3ff805c5908]  ret zero, 
(ra), 1
(dbx) where
  0 __nxm_thread_kill(0x3, 0x3ffc01b6000, 0x3ff805c3788, 0x3ffc01b6000, 
 0x3ffc01b6000) [0x3ff805c5908]
   1 pthread_kill(0x1404de530, 0x1404de500, 0x1401c4000, 0x0, 0x5) 
[0x3ff805c37a0]
   2 __tis_raise(0x1401c4000, 0x0, 0x5, 0x1, 0x1200b5564) [0x3ff801405d4]
   3 do_panic(interpreter = 0x1401c4000, message = 0x140018408 = Out of bound 
register access, file = 0x140018428 = src/ops/set.ops, line = 336) 
[src/exceptions.c:125, 0x1200b5560]
   4 Parrot_sets_ind_i_sc(cur_opcode = 0x1404de530, interpreter = 0x1401c4000) 
[src/ops/set.ops:336, 0x1200e61d4]
   5 runops_slow_core(interpreter = 0x1401c4000, pc = 0x1404de530) 
[src/runops_cores.c:180, 0x12014b208]
   6 runops_int( = 0x1404de500,  = 0x1404de500, interpreter = 0x1401c4000, 
offset = 0) [src/interpreter.c:775, 0x1200f9bb8]
   7 runops(interpreter = 0x1401c4000, offs = 0) [src/inter_run.c:81, 
0x1200f7f60]
   8 runops_args(interpreter = 0x1401c4000, sub = 0x14049f640, obj = 
0x1401214c0, meth = (nil), sig = 0x140061298 = vP, ap = struct {
_a0 = 0x11fffbf40
_offset = 24
}) [src/inter_run.c:182, 0x1200f8290]
   9 Parrot_runops_fromc_args(interpreter = 0x1401c4000, sub = 0x14049f640, sig
= 0x140061298 = vP) [src/inter_run.c:276, 0x1200f8460]
  10 Parrot_runcode(interpreter = 0x1401c4000, argc = 1, argv = 0x11fffc028) 
[src/embed.c:802, 0x1200a6384]
  11 main(argc = 1, argv = 0x11fffc028) [compilers/imcc/main.c:681, 
0x120088f60]
(dbx)


Summary of my parrot 0.4.5 (r13183) configuration:
  configdate='Fri Jul  7 00:08:51 2006'
  Platform:
osname=dec_osf, archname=alpha-dec_osf
jitcapable=0, jitarchname=nojit,
jitosname=dec_osf, jitcpuarch=alpha
execcapable=0
perl=/u/vieraat/vieraat/jhi/Perl/Platform/OSF1/bin/perl
  Compiler:
cc='cc', ccflags='-std -D_INTRINSICS -fprm d -ieee -I/p/include 
-DLANGUAGE_C -pthread -D_XOPEN_SOURCE=500',
  Linker and Libraries:
ld='ld', ldflags=' -L/p/lib',
cc_ldflags='',
libs='-lm -lutil -lpthread -laio -lrt -lgmp'
  Dynamic Linking:
share_ext='.so', ld_share_flags='-shared -expect_unresolved * -O4 -msym 
-std -L/p/lib',
load_ext='.so', ld_load_flags='-shared -expect_unresolved * -O4 -msym 
-std -L/p/lib'
  Types:
iv=long, intvalsize=8, intsize=4, opcode_t=long, opcode_t_size=8,
ptrsize=8, ptr_alignment=8 byteorder=12345678, 
nv=double, numvalsize=8, doublesize=8


Re: HLL root globals and empty keys (was Re: test of get_namespace opcode)

2006-07-07 Thread Allison Randal

Matt Diephouse wrote:


So for the runtime (this is the HLL runtime, not the PIR runtime, btw)
we're all set. Arrays fill the need perfectly and let us access the
root HLL namespace. That makes me think that we don't need any new
opcodes.


Chip's latest simplification eliminates the need for creating and 
passing in an empty array, because 'no argument' always means the same 
thing as 'empty array' or 'no key' would mean. That's a really elegant 
piece of consistency.



And I think it's a worthy goal to make
compiler writer's lives good.


I agree.


Adding 0-dimensional keys would also let us get rid of the C
.namespace  special case and replace it with C .namespace [] .


Hmmm... if we're preserving parallels, that could be C $P0 = 
get_namespace  and C .namespace 



It's simpler to give the root HLL namespace a name.


I disagree on two counts here. 


And I've moved on to the root HLL namespace doesn't need a name if you 
 disambiguate by marking the verb (that is, the opcode).



First, I think C []  *is* a name.


Yes, in using C []  to mean access the root HLL namespace we would 
be treating it as a name. Or more like a method call. It's a magical bit 
of syntax that would be appropriate in a HLL, but seems out-of-place in PIR.



Second, any solution which involves giving the HLL namespace a
different name will have to either (a) add new opcodes, (b) add more
code for all the other cases by making all referencing originate at
the root, or (c) add a special syntax, none of which is simple.


To add a new feature, we have to add some extra syntax somewhere. I'm 
most comfortable with (a) here, because it targets the change at the 
problem in a straightforward fashion.


Allison


[perl #39742] [BUG] installed parrot conflicts with dev parrot.

2006-07-07 Thread via RT
# New Ticket Created by  Will Coleda 
# Please include the string:  [perl #39742]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=39742 


The development version of parrot should not be detecting or  
interacting with the installed (/usr/local, e.g.) versions at all.

The fact that there is interference here currently means you *can't*  
have an installed parrot if you are also working out of the source.

Regards.

--
Will Coleda
[EMAIL PROTECTED]
1.650.581.2414





[perl #39740] [PATCH] fix debug messages in io_unix bind, listen

2006-07-07 Thread via RT
# New Ticket Created by  Chris Dolan 
# Please include the string:  [perl #39740]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=39740 


This trivial patch corrects a pair confusing stderr diagnostics from  
the bind() and listen() methods in src/io/io_unix.c

% diffstat socket_diag.patch
CREDITS  |4 
src/io/io_unix.c |4 ++--
2 files changed, 6 insertions(+), 2 deletions(-)




socket_diag.patch
Description: Binary data


[perl #39744] accessing exception object should not throw an exception

2006-07-07 Thread via RT
# New Ticket Created by  Chip Salzenberg 
# Please include the string:  [perl #39744]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=39744 


Keyed access to exception objects should be very forgiving of mistakes,
returning the equivalent of 'null' for invalid keys.

This issue *may* be revisited when exception objects get their new pdd23
interface.
-- 
Chip Salzenberg [EMAIL PROTECTED]


[perl #39755] [EMAIL PROTECTED]: tru64 6 failures: getting NaNQs: t/pmc/complex.t

2006-07-07 Thread via RT
# New Ticket Created by  Jarkko Hietaniemi 
# Please include the string:  [perl #39755]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=39755 


t/pmc/complexok 32/53
# Failed test (t/pmc/complex.t at line 1024)
#  got: '
# ln(0+0i)
#   got -INF+NaNQi
#   not -inf+0.00i
# done
# '
# expected: 'done
# '
t/pmc/complexok 34/53
# Failed test (t/pmc/complex.t at line 1110)
#  got: '
# sqrt(0+0i)
#   got NaNQ+NaNQi
#   not 0.00+0.00i
# done
# '
# expected: 'done
# '
t/pmc/complexok 41/53
# Failed test (t/pmc/complex.t at line 1409)
#  got: '
# asin(-1+0i)
#   got NaNQ+NaNQi
#   not -1.570796-0.00i
#
# asin(1+0i)
#   got NaNQ+NaNQi
#   not 1.570796-0.00i
# done
# '
# expected: 'done
# '
t/pmc/complexNOK 42
# Failed test (t/pmc/complex.t at line 1452)
#  got: '
# acos(-1+0i)
#   got NaNQ+NaNQi
#   got NaNQ+NaNQi
#
# acos(1+0i)
#   got NaNQ+NaNQi
#   not 0.00-0.00i
# done
# '
# expected: 'done
# '
t/pmc/complexok 45/53
# Failed test (t/pmc/complex.t at line 1576)
t/pmc/complexNOK 46#  got: '
# asec(-1+0i)
#   got NaNQ+NaNQi
#   not 3.141593-0.00i
#
# asec(1+0i)
#   got NaNQ+NaNQi
#   not 0.00-0.00i
# done
# '
# expected: 'done
# '

# Failed test (t/pmc/complex.t at line 1618)
#  got: '
# acsc(-1+0i)
#   got NaNQ+NaNQi
#   not -1.570796-0.00i
#
# acsc(1+0i)
#   got NaNQ+NaNQi
#   not 1.570796-0.00i
# done
# '
# expected: 'done
# '
t/pmc/complexok 53/53# Looks like you failed 6 tests of
53.


Summary of my parrot 0.4.5 (r13183) configuration:
  configdate='Fri Jul  7 00:08:51 2006'
  Platform:
osname=dec_osf, archname=alpha-dec_osf
jitcapable=0, jitarchname=nojit,
jitosname=dec_osf, jitcpuarch=alpha
execcapable=0
perl=/u/vieraat/vieraat/jhi/Perl/Platform/OSF1/bin/perl
  Compiler:
cc='cc', ccflags='-std -D_INTRINSICS -fprm d -ieee -I/p/include 
-DLANGUAGE_C -pthread -D_XOPEN_SOURCE=500',
  Linker and Libraries:
ld='ld', ldflags=' -L/p/lib',
cc_ldflags='',
libs='-lm -lutil -lpthread -laio -lrt -lgmp'
  Dynamic Linking:
share_ext='.so', ld_share_flags='-shared -expect_unresolved * -O4 -msym 
-std -L/p/lib',
load_ext='.so', ld_load_flags='-shared -expect_unresolved * -O4 -msym 
-std -L/p/lib'
  Types:
iv=long, intvalsize=8, intsize=4, opcode_t=long, opcode_t_size=8,
ptrsize=8, ptr_alignment=8 byteorder=12345678, 
nv=double, numvalsize=8, doublesize=8


[perl #39751] [EMAIL PROTECTED]: tru64 core dump: t/dynoplibs/myops_4.pir

2006-07-07 Thread via RT
# New Ticket Created by  Jarkko Hietaniemi 
# Please include the string:  [perl #39751]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=39751 


(dbx) run --gc-debug t/dynoplibs/myops_4.pir
neither here
thread 0x3 signal Segmentation fault at   [Parrot_hcf:55 ,0x3001754]
Source not available
(dbx) where
  0 Parrot_hcf(cur_opcode = 0x1404de578, interpreter = 0x1401c4000) 
 [myops.ops:55, 0x3001754]
   1 runops_slow_core(interpreter = 0x1401c4000, pc = 0x1404de578) 
[src/runops_cores.c:180, 0x12014b208]
   2 runops_int( = 0x1404de550,  = 0x1404de550, interpreter = 0x1401c4000, 
offset = 0) [src/interpreter.c:775, 0x1200f9bb8]
   3 runops(interpreter = 0x1401c4000, offs = 0) [src/inter_run.c:81, 
0x1200f7f60]
   4 runops_args(interpreter = 0x1401c4000, sub = 0x14049f5a0, obj = 
0x1401214c0, meth = (nil), sig = 0x140061298 = vP, ap = struct {
_a0 = 0x11fffbf40
_offset = 24
}) [src/inter_run.c:182, 0x1200f8290]
   5 Parrot_runops_fromc_args(interpreter = 0x1401c4000, sub = 0x14049f5a0, sig
= 0x140061298 = vP) [src/inter_run.c:276, 0x1200f8460]
   6 Parrot_runcode(interpreter = 0x1401c4000, argc = 1, argv = 0x11fffc028) 
[src/embed.c:802, 0x1200a6384]
   7 main(argc = 1, argv = 0x11fffc028) [compilers/imcc/main.c:681, 
0x120088f60]
(dbx)


Summary of my parrot 0.4.5 (r13183) configuration:
  configdate='Fri Jul  7 00:08:51 2006'
  Platform:
osname=dec_osf, archname=alpha-dec_osf
jitcapable=0, jitarchname=nojit,
jitosname=dec_osf, jitcpuarch=alpha
execcapable=0
perl=/u/vieraat/vieraat/jhi/Perl/Platform/OSF1/bin/perl
  Compiler:
cc='cc', ccflags='-std -D_INTRINSICS -fprm d -ieee -I/p/include 
-DLANGUAGE_C -pthread -D_XOPEN_SOURCE=500',
  Linker and Libraries:
ld='ld', ldflags=' -L/p/lib',
cc_ldflags='',
libs='-lm -lutil -lpthread -laio -lrt -lgmp'
  Dynamic Linking:
share_ext='.so', ld_share_flags='-shared -expect_unresolved * -O4 -msym 
-std -L/p/lib',
load_ext='.so', ld_load_flags='-shared -expect_unresolved * -O4 -msym 
-std -L/p/lib'
  Types:
iv=long, intvalsize=8, intsize=4, opcode_t=long, opcode_t_size=8,
ptrsize=8, ptr_alignment=8 byteorder=12345678, 
nv=double, numvalsize=8, doublesize=8


[perl #39752] [EMAIL PROTECTED]: tru64 core dump: t/op/lexicals_27.pir

2006-07-07 Thread via RT
# New Ticket Created by  Jarkko Hietaniemi 
# Please include the string:  [perl #39752]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=39752 


(dbx) run --gc-debug t/pmc/lexicals_27.pir

# Failed test (t/op/lexicals.t at line 501)
#  got: 'Parrot VM: PANIC: Out of mem!
# C file src/memory.c, line 48
# Parrot file (not available), line (not available)
#
# We highly suggest you notify the Parrot team if you have not been working on
# Parrot.  Use parrotbug (located in parrot's root directory) or send an
# e-mail to [EMAIL PROTECTED]
# Include the entire text of this error message and the text of the script that
# generated the error.  If you've made any modifications to Parrot, please
# describe them as well.
#
# Version : 0.4.5-devel
# Configured  : Thu Jul  6 23:16:59 2006
# Architecture: nojit
# JIT Capable : No
# Interp Flags: (no interpreter)
# Exceptions  : (missing from core)
#
# Dumping Core...
# sh: 438387 Quit - core dumped
# '
# expected: '3 * 5 == 15!
# '
# './parrot  --gc-debug 
/cluster/members/member0/tmp/jhi/parrot-13183/t/op/lexicals_27.pir' failed 
with exit code 131

...

(dbx) where
  0 __nxm_thread_kill(0x3, 0x3ffc01b6000, 0x3ff805c3788, 0x3ffc01b6000, 
 0x3ffc01b6000) [0x3ff805c5908]
   1 pthread_kill(0x14049ef38, 0x1404f, 0x1401c4000, 0x0, 0x5) 
[0x3ff805c37a0]
   2 __tis_raise(0x1401c4000, 0x0, 0x5, 0x1, 0x1200b5564) [0x3ff801405d4]
   3 do_panic(interpreter = (nil), message = 0x140001890 = Out of mem, file =
0x1400018a0 = src/memory.c, line = 48) [src/exceptions.c:125, 0x1200b5560]
   4 mem_sys_allocate(size = 0) [src/memory.c:48, 0x120089804]
   5 Parrot_FixedPMCArray_clone(interpreter = 0x1401c4000, pmc = 0x14049ef38) 
[src/pmc/fixedpmcarray.c:181, 0x120119df0]
   6 Parrot_ResizablePMCArray_clone(interpreter = 0x1401c4000, pmc = 
0x14049ef38) [src/pmc/resizablepmcarray.c:560, 0x1201c1634]
   7 Parrot_clone_p_p(cur_opcode = 0x1404f0410, interpreter = 0x1401c4000) 
[src/ops/set.ops:524, 0x1200e8400]
   8 runops_slow_core(interpreter = 0x1401c4000, pc = 0x1404f0410) 
[src/runops_cores.c:180, 0x12014b208]
   9 runops_int( = 0x1404f,  = 0x1404f, interpreter = 0x1401c4000, 
offset = 0) [src/interpreter.c:775, 0x1200f9bb8]
  10 runops(interpreter = 0x1401c4000, offs = 0) [src/inter_run.c:81, 
0x1200f7f60]
  11 runops_args(interpreter = 0x1401c4000, sub = 0x14049f640, obj = 
0x1401214c0, meth = (nil), sig = 0x140061298 = vP, ap = struct {
_a0 = 0x11fffbf40
_offset = 24
}) [src/inter_run.c:182, 0x1200f8290]
  12 Parrot_runops_fromc_args(interpreter = 0x1401c4000, sub = 0x14049f640, sig
= 0x140061298 = vP) [src/inter_run.c:276, 0x1200f8460]
  13 Parrot_runcode(interpreter = 0x1401c4000, argc = 1, argv = 0x11fffc028) 
[src/embed.c:802, 0x1200a6384]
  14 main(argc = 1, argv = 0x11fffc028) [compilers/imcc/main.c:681, 
0x120088f60]
(dbx) 



Summary of my parrot 0.4.5 (r13183) configuration:
  configdate='Fri Jul  7 00:08:51 2006'
  Platform:
osname=dec_osf, archname=alpha-dec_osf
jitcapable=0, jitarchname=nojit,
jitosname=dec_osf, jitcpuarch=alpha
execcapable=0
perl=/u/vieraat/vieraat/jhi/Perl/Platform/OSF1/bin/perl
  Compiler:
cc='cc', ccflags='-std -D_INTRINSICS -fprm d -ieee -I/p/include 
-DLANGUAGE_C -pthread -D_XOPEN_SOURCE=500',
  Linker and Libraries:
ld='ld', ldflags=' -L/p/lib',
cc_ldflags='',
libs='-lm -lutil -lpthread -laio -lrt -lgmp'
  Dynamic Linking:
share_ext='.so', ld_share_flags='-shared -expect_unresolved * -O4 -msym 
-std -L/p/lib',
load_ext='.so', ld_load_flags='-shared -expect_unresolved * -O4 -msym 
-std -L/p/lib'
  Types:
iv=long, intvalsize=8, intsize=4, opcode_t=long, opcode_t_size=8,
ptrsize=8, ptr_alignment=8 byteorder=12345678, 
nv=double, numvalsize=8, doublesize=8


[perl #39743] [PATCH] change perl6-internals to parrot-porters in docs

2006-07-07 Thread via RT
# New Ticket Created by  Chris Dolan 
# Please include the string:  [perl #39743]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=39743 


This patch changes the main Parrot mailing list address from perl6- 
internals to parrot-porters in various documentation files and code  
strings.  I was careful not to alter the NNTP and HTTP URLs because  
those still only work under the old name.

% diffstat parrot-porters.patch
README  |4 ++--
README.win32.pod|2 +-
RELEASE_INSTRUCTIONS|8 
compilers/imcc/README   |2 +-
docs/debug.pod  |2 +-
docs/dev/dod.pod|6 +++---
docs/faq.pod|6 +++---
docs/gettingstarted.pod |   15 ---
docs/glossary.pod   |2 +-
docs/intro.pod  |8 
docs/parrot.pod |2 +-
docs/pdds/pdd00_pdd.pod |4 ++--
docs/submissions.pod|4 ++--
editor/pir-mode.el  |4 ++--
languages/regex/README  |4 ++--
src/exceptions.c|2 +-
16 files changed, 38 insertions(+), 37 deletions(-)



parrot-porters.patch
Description: Binary data


Re: [perl #39746] [NEW] t/codingstd/fixme.t - search for FIXME comments in source

2006-07-07 Thread Will Coleda

Thanks, applied as r13195

On Jul 6, 2006, at 5:17 PM, John J. Trammell (via RT) wrote:


John J. Trammell


--
Will Coke Coleda
[EMAIL PROTECTED]




Re: [perl #39751] [EMAIL PROTECTED]: tru64 core dump: t/dynoplibs/myops_4.pir

2006-07-07 Thread Will Coleda

hcf is actually supposed to explode if possible. Not sure if we should:

1) skip the test usually;
2) close the ticket as not a bug
3) eliminate this particular (silly) dynamic opcode.

Regards.

On Jul 7, 2006, at 2:04 AM, Jarkko Hietaniemi (via RT) wrote:


# New Ticket Created by  Jarkko Hietaniemi
# Please include the string:  [perl #39751]
# in the subject line of all future correspondence about this issue.
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=39751 


(dbx) run --gc-debug t/dynoplibs/myops_4.pir
neither here
thread 0x3 signal Segmentation fault at   [Parrot_hcf:55 , 
0x3001754]

Source not available
(dbx) where
 0 Parrot_hcf(cur_opcode = 0x1404de578, interpreter = 0x1401c4000)  
[myops.ops:55, 0x3001754]
   1 runops_slow_core(interpreter = 0x1401c4000, pc = 0x1404de578)  
[src/runops_cores.c:180, 0x12014b208]
   2 runops_int( = 0x1404de550,  = 0x1404de550, interpreter =  
0x1401c4000, offset = 0) [src/interpreter.c:775, 0x1200f9bb8]
   3 runops(interpreter = 0x1401c4000, offs = 0) [src/inter_run.c: 
81, 0x1200f7f60]
   4 runops_args(interpreter = 0x1401c4000, sub = 0x14049f5a0, obj  
= 0x1401214c0, meth = (nil), sig = 0x140061298 = vP, ap = struct {

_a0 = 0x11fffbf40
_offset = 24
}) [src/inter_run.c:182, 0x1200f8290]
   5 Parrot_runops_fromc_args(interpreter = 0x1401c4000, sub =  
0x14049f5a0, sig

= 0x140061298 = vP) [src/inter_run.c:276, 0x1200f8460]
   6 Parrot_runcode(interpreter = 0x1401c4000, argc = 1, argv =  
0x11fffc028) [src/embed.c:802, 0x1200a6384]
   7 main(argc = 1, argv = 0x11fffc028) [compilers/imcc/main.c: 
681, 0x120088f60]

(dbx)


Summary of my parrot 0.4.5 (r13183) configuration:
  configdate='Fri Jul  7 00:08:51 2006'
  Platform:
osname=dec_osf, archname=alpha-dec_osf
jitcapable=0, jitarchname=nojit,
jitosname=dec_osf, jitcpuarch=alpha
execcapable=0
perl=/u/vieraat/vieraat/jhi/Perl/Platform/OSF1/bin/perl
  Compiler:
cc='cc', ccflags='-std -D_INTRINSICS -fprm d -ieee -I/p/include  
-DLANGUAGE_C -pthread -D_XOPEN_SOURCE=500',

  Linker and Libraries:
ld='ld', ldflags=' -L/p/lib',
cc_ldflags='',
libs='-lm -lutil -lpthread -laio -lrt -lgmp'
  Dynamic Linking:
share_ext='.so', ld_share_flags='-shared -expect_unresolved *  
-O4 -msym -std -L/p/lib',
load_ext='.so', ld_load_flags='-shared -expect_unresolved * - 
O4 -msym -std -L/p/lib'

  Types:
iv=long, intvalsize=8, intsize=4, opcode_t=long, opcode_t_size=8,
ptrsize=8, ptr_alignment=8 byteorder=12345678,
nv=double, numvalsize=8, doublesize=8



--
Will Coke Coleda
[EMAIL PROTECTED]




Re: contrib tool: search for opcodes

2006-07-07 Thread Bernhard Schmalhofer

João Cruz Morais schrieb:

(moderator please reject my other message - wrong email)

The subject says it all :)
Given a valid regex (pcre) as an argument, the script will search
inside every *.ops file for an opcode name that matches, and dumps
both its arguments and its description. If no argument is passed every
opcode found is dumped.

Hi,

I have added the script as tools/docs/search-ops.py .
Could you provi


Re: contrib tool: search for opcodes

2006-07-07 Thread Bernhard Schmalhofer

João Cruz Morais schrieb:

(moderator please reject my other message - wrong email)

The subject says it all :)
Given a valid regex (pcre) as an argument, the script will search
inside every *.ops file for an opcode name that matches, and dumps
both its arguments and its description. If no argument is passed every
opcode found is dumped.

Hi João,

I have added the script as tools/docs/search-ops.py.
In order to decrease confusion, could you provide a patch that puts some
documentation into the script? The information and the example from your 
mail would suffice.


The recommended way to provide patches and new files is to create 
tickets in the
RequestTracker. Information on how to do that is provided in 
docs/submissions.pod.


Thanks,
 Bernhard

PS: For future Python scripts a port of the Parrot::Config Perl5 module 
would be nice to have.




Re: [perl #39745] [PATCH] Fixed TODO on t/codingstd/cppcomments.t

2006-07-07 Thread jerry gay

On 7/6/06, via RT John J. Trammell [EMAIL PROTECTED] wrote:

Test now uses Parrot::Distribution module instead of mass globbing.


thanks, applied as r13196, with some slight modifications, and additions.
~jerry


Re: contrib tool: search for opcodes

2006-07-07 Thread João Cruz Morais

Hi,

I've just submitted the patch.


PS: For future Python scripts a port of the Parrot::Config Perl5 module
would be nice to have.


Are you talking about the module that has the code to run the steps
from Configure.pl?


Regards,
João C Morais


Re: contrib tool: search for opcodes

2006-07-07 Thread jerry gay

On 7/7/06, João Cruz Morais [EMAIL PROTECTED] wrote:

Are you talking about the module that has the code to run the steps
from Configure.pl?


Parrot::Config is a module *generated* by Configure.pl, containing
parrot's configuration information in a format (perl module) that's
easy for perl scripts to read. bernhard is suggesting you create a
config file that's easy for python scripts to read.
~jerry


Re: [perl #39755] [EMAIL PROTECTED]: tru64 6 failures: getting NaNQs: t/pmc/complex.t

2006-07-07 Thread Jarkko Hietaniemi
Jerry Gay via RT wrote:
 i've related this ticket to #38887: (Nobody) Result of INFINITY or NAN
 stringification is platform dependent [new]
 
 there are many platforms failing NaN/Inf related tests due to this issue.

That is very true, and very worthy of a separate ticket, but isn't
the failure I'm seeing something a bit different -- expecting non-NaNs
(mostly zeros) but getting NaNQs?

 thanks for your report.
 ~jerry

-- 
Jarkko Hietaniemi [EMAIL PROTECTED] http://www.iki.fi/jhi/ There is this 
special
biologist word we use for 'stable'.  It is 'dead'. -- Jack Cohen


Re: Ruby on Parrot

2006-07-07 Thread Kevin Tew

Allison Randal wrote:
I gave a Parrot talk at a Ruby user group meeting tonight. Someone 
mentioned that they had seen somebody on #parrot who was working on a 
new Ruby implementation based on Punie. Do you exist? And is there 
anything we can do to help you?


Allison

That would be me!

PRuby is the project.
Suggestions of a better project name are welcome.

Current Source is at http://tewk.com/pruby.tgz
It is currently hosted in a private svn repo.

Chip said I can have a commit bit. So Thats a great start.
I will put a signed copy of the CLA in the mail today.

I based the initial PGE grammar for PRuby off of  
svn://rubyforge.org/var/svn/rubygrammar/grammars/antlr-v3/trunk/ruby.g 
which is in complete.
I'm looking for a BNF style description of the Ruby grammar.  Otherwise 
I will have to dig into :pserver:[EMAIL PROTECTED]:/src/parse.y.


I used to use
$P0 = find_global , _dumper
$P0( $P1, $P1)
inside TGE transformational rules to dump tree nodes, but that doesn't 
work now.


I tried replacing find_global with the alternatives proposed by chip and 
mdiep to no avail.

Basically

interpinfo $P99, .INTERPINFO_NAMESPACE_ROOT
$P99 = $P99['_dumper']

$P0 = new .ResizablePMCArray
$P0 = get_namespace $P0
$P0['_dumper']

null $S0
$P0 = get_namespace $S0
$P0['_dumper']

Haven't had time to get back to it today.

A short example of how to include/load_bytecode library/dumper.pir and 
lookup the _dumper symbol inside a TGE rule would be helpful.


Kevin Tew



Java Script in Parrot

2006-07-07 Thread Vishal Soni

Hi,

Is any one working on Java Script(ECMA-262) implementation in Parrot?

--
Thanks,
Vishal


I'm pre-hackathoning at OSCON, not post-hackathoning

2006-07-07 Thread Chip Salzenberg
I'm unable to hang around Portland after Friday afternoon, I'm sorry to
report, so Saturday hackathoning will miss me.  However, I will be arriving
a day _early_ so I'll be in Portland all day Sunday.  I understood Patrick
to be in a similar situation, so he might be there Sunday too.
-- 
Chip Salzenberg [EMAIL PROTECTED]


[perl #39760] make warnings (r13197 - x86-msvc-7.1)

2006-07-07 Thread via RT
# New Ticket Created by  Jerry Gay 
# Please include the string:  [perl #39760]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=39760 


compilers\imcc\imcparser.c
imcparser.c
compilers\imcc\imcparser.c(878) : warning C4273: 'malloc' :
inconsistent dll linkage
compilers\imcc\imcparser.c(885) : warning C4273: 'free' : inconsistent
dll linkage

compilers\ast\astparser.c
astparser.c
compilers\ast\astparser.c(1298) : warning C4102: 'yyerrlab1' :
unreferenced label

compilers\imcc\main.c
main.c
compilers\imcc\main.c(480) : warning C4273: 'imcc_init' : inconsistent
dll linkage

~jerry


[perl #39759] [NEW] Util tool - search for opcodes

2006-07-07 Thread João Cruz Morais
# New Ticket Created by  João Cruz Morais 
# Please include the string:  [perl #39759]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=39759 


Given a valid regex (pcre style) as an argument, the script will search inside
any *.ops file located in 'path' for an opcode name that matches, dumping both
its arguments and its description.
If no argument is passed, every opcode found is dumped.

Example:
 ./search-ops.py load

--
File: core.ops - Parrot Core Ops (2 matches)
--

load_bytecode(in STR)
Load Parrot bytecode from file $1, and (TODO) search the library path,
to locate the file.

loadlib(out PMC, in STR)
Load a dynamic link library named $2 and store it in $1.

--
File: debug.ops (1 matches)
--

debug_load(inconst STR)
Load a Parrot source file for the current program.


manifest.patch
Description: Binary data
#!/usr/bin/python


Given a valid regex (pcre style) as an argument, the script will search inside 
any *.ops file located in 'path' for an opcode name that matches, dumping both
its arguments and its description. 
If no argument is passed, every opcode found is dumped.

Example:
 ./search-ops.py load

--
File: core.ops - Parrot Core Ops (2 matches)
--

load_bytecode(in STR)
Load Parrot bytecode from file $1, and (TODO) search the library path,
to locate the file.

loadlib(out PMC, in STR)
Load a dynamic link library named $2 and store it in $1.

--
File: debug.ops (1 matches)
--

debug_load(inconst STR)
Load a Parrot source file for the current program.


path = ../../src/ops/ # path to the ops source folder
wrap_width = 70 # max chars per line

import os, re
from sys import argv, exit

def wrap(text, width):
return reduce(lambda line, word, width=width: '%s%s%s' %
  (line,
   ' \n'[(len(line)-line.rfind('\n')-1
 + len(word.split('\n',1)[0]
  ) = width)],
   word),
  text.split(' ')
 )

query = 
if len(argv)  1:
query = argv[1]

try:
query = re.compile(query)
except:
print Invalid opcode regex
exit()

path = path.replace(\\, /)
if len(path)  0 and path[-1] != /:
path = path + /

try:
opFiles = os.listdir(path)
except:
print Path not found
exit()

opFiles = filter(lambda file: re.compile(\.ops$).search(file) is not None, 
opFiles)

matches = []

for file in opFiles:
results = []
opsc = open(path+file, r).read()

p = re.compile(^=item\sB(\w+)\(([^)]+)\)\n\n(?=(.*?)\n\n), 
re.MULTILINE|re.DOTALL)
for m in p.findall(opsc):
if query.search(m[0]) is None:
continue
if re.compile(=item).match(m[2]) is not None:
m = list(m)
m[2] = None
results.append(m)

if len(results)  0:
title = re.compile(^=head1\sNAME\n\n(.*), 
re.MULTILINE).search(opsc).group(1)
matches.append({f: title, rs: results})

if len(matches) == 0:
print No matches were found
else:
delim = \n + - * wrap_width + \n
for v in matches:
print %sFile: %s (%d matches)%s % (delim, v[f], len(v[rs]), delim)
for m in v[rs]:
print %s(%s) % tuple(m[:2])
if m[2] is not None:
print wrap(m[2].replace(\n,  ), wrap_width)+\n

[perl #39761] [NEW] t/codingstd/tabs.t - checks for tabbed indents

2006-07-07 Thread John J. Trammell
# New Ticket Created by  John J. Trammell 
# Please include the string:  [perl #39761]
# in the subject line of all future correspondence about this issue. 
# URL: http://rt.perl.org/rt3/Ticket/Display.html?id=39761 


Found in docs/pdds/pdd07_codingstd.pod:

All indentation must consist of spaces, no tabs (for ease of
patching).

This test looks for tabbed indents in source code and header files.

#! perl
# Copyright (C) 2001-2006, The Perl Foundation.

use strict;
use warnings;
use lib qw( . lib ../lib ../../lib );
use Test::More;
use Parrot::Distribution;


=head1 NAME

t/codingstd/tabs.t - checks for tab indents in C source and headers

=head1 SYNOPSIS

% prove t/codingstd/tabs.t [file ...]

=head1 DESCRIPTION

Checks that the indicated file(s) do not use tabs to indent.

If no file(s) are specified, checks the Parrot C source and header files for
tab indents.

=head1 SEE ALSO

Ldocs/pdds/pdd07_codingstd.pod

=cut


my @files = @ARGV ? @ARGV : source_files();

plan tests = scalar @files;

foreach my $file (@files) {
open FILE, $file or die Unable to open '$file' for reading: $!;

my @tabs;
LINE:
while (FILE) {
next unless /^ *\t/;
push @tabs, tab in leading whitespace, file '$file', line $.\n;
if (@tabs = 5) {
push @tabs, skipping remaining lines (you get the idea)\n;
last LINE;
}
}
close FILE;

is(scalar(@tabs), 0, file '$file' does not use tabs)
  or diag(@tabs);
}

sub source_files {
my $dist = Parrot::Distribution-new;
return map { $_-path } (
map($_-files_of_type('C code'),   $dist-c_source_file_directories),
map($_-files_of_type('C header'), $dist-c_header_file_directories),
);
}

## vim: expandtab sw=4
Index: MANIFEST
===
--- MANIFEST(revision 13197)
+++ MANIFEST(working copy)
@@ -981,6 +981,7 @@
 t/examples/namespace.t[]
 t/codingstd/cppcomments.t []
 t/codingstd/fixme.t   []
+t/codingstd/tabs.t[]
 config/inter/shlibs.pm[]
 config/inter/types.pm []
 config/inter/encoding.pm  []


Re: Ruby on Parrot

2006-07-07 Thread jerry gay

On 7/7/06, Kevin Tew [EMAIL PROTECTED] wrote:

Allison Randal wrote:
 I gave a Parrot talk at a Ruby user group meeting tonight. Someone
 mentioned that they had seen somebody on #parrot who was working on a
 new Ruby implementation based on Punie. Do you exist? And is there
 anything we can do to help you?

 Allison
That would be me!

PRuby is the project.
Suggestions of a better project name are welcome.


since i think 'cardinal' is catchy, and it's not yet taken, perhaps
you should consider it.


Current Source is at http://tewk.com/pruby.tgz
It is currently hosted in a private svn repo.


i've taken a look at this and promised to help kevin get it fit for checkin.


Chip said I can have a commit bit. So Thats a great start.
I will put a signed copy of the CLA in the mail today.


sure is! i can't wait to welcome another HLL implementor to the growing team.

i'm almost done working with Chris Dolan to get his TAP parser checked
in, and then i'll be able to devote more time to getting ruby running
on parrot. yeehah!
~jerry


Re: Ruby on Parrot

2006-07-07 Thread Allison Randal

Kevin Tew wrote:


That would be me!

PRuby is the project.
Suggestions of a better project name are welcome.


Possibly Cardinal? (A ruby-red bird.) The original Cardinal project was 
started in 2002, but talking last night we decided it needed a complete 
re-write in PGE/TGE (which is when you were mentioned). I suspect Phil 
would be happy to donate the name to the new version, and even help out. 
I'll connect you two.


Any chance you might make it out to Portland the last week of July? 
There will be some hacking sessions at OSCON and it'd be great to get 
together with you, Patrick, and the PDX.rb group.



Current Source is at http://tewk.com/pruby.tgz
It is currently hosted in a private svn repo.

Chip said I can have a commit bit. So Thats a great start.
I will put a signed copy of the CLA in the mail today.


Awesome!

I based the initial PGE grammar for PRuby off of  
svn://rubyforge.org/var/svn/rubygrammar/grammars/antlr-v3/trunk/ruby.g 
which is in complete.
I'm looking for a BNF style description of the Ruby grammar.  Otherwise 
I will have to dig into :pserver:[EMAIL PROTECTED]:/src/parse.y.


No one last night knew of a BNF grammar for Ruby, but I've found that 
translating from yacc to PGE isn't difficult (it's what I've done with 
Punie).



I used to use
$P0 = find_global , _dumper
$P0( $P1, $P1)
inside TGE transformational rules to dump tree nodes, but that doesn't 
work now.


PGE uses the Parrot version of Data::Dumper (which is what this code 
does), but the TGE nodes don't (yet). Just call the 'dump' method on the 
tree node.


  node.'dump'()

Allison


[perl #39704] [TODO] Tcl - Convert TODO/XXX comments to RT tickets

2006-07-07 Thread Will Coleda via RT
Suggestion for these and other areas in the source with TODOs...

# XXX bad.

# XXX (RT#39704) good.

Then it's still obvious if you're in the code that a ticket was opened, and 
it's possible to 
automate your search for bad XXX's (or TODOs).

On Mon Jul 03 23:58:41 2006, mdiep wrote:
mini:~/Projects/parrot/languages/tcl mdiep$ grep -r XXX . | grep - 
 v .svn | wc -l
 120
mini:~/Projects/parrot/languages/tcl mdiep$
 
 We need to work on technical debt -- convert these to RT tickets.
 
 --
 Matt Diephouse