[svn:parrot] r44463 - in branches/boehm_gc_2: compilers/ncigen/t compilers/ncigen/t/NCIGENAST compilers/pirc/t config/init/hints docs examples/languages/abc/t ext/Parrot-Embed/lib/Parrot ext/Parrot-Embed/t lib/Parrot/Pmc2c src/dynpmc src/pmc t/codingstd t/compilers/imcc/imcpasm t/compilers/imcc/reg t/compilers/imcc/syn t/compilers/pct t/distro t/dynpmc t/examples t/native_pbc t/oo t/op t/perl t/pmc t/steps/auto t/tools/ops2pm
bacek at svn.parrot.org
bacek at svn.parrot.org
Wed Feb 24 20:31:07 UTC 2010
Author: bacek
Date: Wed Feb 24 20:31:05 2010
New Revision: 44463
URL: https://trac.parrot.org/parrot/changeset/44463
Log:
Merge branch 'master' into boehm2
Modified:
branches/boehm_gc_2/compilers/ncigen/t/NCIGENAST/struct_00.t
branches/boehm_gc_2/compilers/ncigen/t/NCIGENAST/typedef_00.t
branches/boehm_gc_2/compilers/ncigen/t/parse_00.t
branches/boehm_gc_2/compilers/ncigen/t/parse_01.t
branches/boehm_gc_2/compilers/ncigen/t/parse_02.t
branches/boehm_gc_2/compilers/pirc/t/basic.t
branches/boehm_gc_2/compilers/pirc/t/heredoc.t
branches/boehm_gc_2/compilers/pirc/t/macro.t
branches/boehm_gc_2/compilers/pirc/t/stmts.t
branches/boehm_gc_2/compilers/pirc/t/subflags.t
branches/boehm_gc_2/config/init/hints/openbsd.pm
branches/boehm_gc_2/docs/embed.pod
branches/boehm_gc_2/examples/languages/abc/t/01-tests.t
branches/boehm_gc_2/ext/Parrot-Embed/lib/Parrot/Embed.xs
branches/boehm_gc_2/ext/Parrot-Embed/t/pipp.t
branches/boehm_gc_2/lib/Parrot/Pmc2c/PMC.pm
branches/boehm_gc_2/src/dynpmc/gdbmhash.pmc
branches/boehm_gc_2/src/pmc/oplib.pmc
branches/boehm_gc_2/t/codingstd/c_cppcomments.t
branches/boehm_gc_2/t/compilers/imcc/imcpasm/optc.t
branches/boehm_gc_2/t/compilers/imcc/reg/spill_old.t
branches/boehm_gc_2/t/compilers/imcc/syn/hll.t
branches/boehm_gc_2/t/compilers/pct/past.t
branches/boehm_gc_2/t/distro/meta_yml.t
branches/boehm_gc_2/t/dynpmc/gdbmhash.t
branches/boehm_gc_2/t/dynpmc/rational.t
branches/boehm_gc_2/t/examples/pod.t
branches/boehm_gc_2/t/native_pbc/integer.t
branches/boehm_gc_2/t/native_pbc/number.t
branches/boehm_gc_2/t/native_pbc/string.t
branches/boehm_gc_2/t/oo/new-old.t
branches/boehm_gc_2/t/op/calling.t
branches/boehm_gc_2/t/op/exit.t
branches/boehm_gc_2/t/op/sysinfo.t
branches/boehm_gc_2/t/perl/Parrot_IO.t
branches/boehm_gc_2/t/pmc/exporter.t
branches/boehm_gc_2/t/pmc/iterator.t
branches/boehm_gc_2/t/pmc/multidispatch.t
branches/boehm_gc_2/t/pmc/sub.t
branches/boehm_gc_2/t/steps/auto/snprintf-01.t
branches/boehm_gc_2/t/tools/ops2pm/05-renum_op_map_file.t
branches/boehm_gc_2/t/tools/ops2pm/08-sort_ops.t
Modified: branches/boehm_gc_2/compilers/ncigen/t/NCIGENAST/struct_00.t
==============================================================================
--- branches/boehm_gc_2/compilers/ncigen/t/NCIGENAST/struct_00.t Wed Feb 24 20:22:33 2010 (r44462)
+++ branches/boehm_gc_2/compilers/ncigen/t/NCIGENAST/struct_00.t Wed Feb 24 20:31:05 2010 (r44463)
@@ -2,6 +2,9 @@
# Copyright (C) 2008-2010, Parrot Foundation.
# $Id$
+use strict;
+use warnings;
+
use lib ('./lib', '../../lib');
use Parrot::Test::NCIGENAST;
Modified: branches/boehm_gc_2/compilers/ncigen/t/NCIGENAST/typedef_00.t
==============================================================================
--- branches/boehm_gc_2/compilers/ncigen/t/NCIGENAST/typedef_00.t Wed Feb 24 20:22:33 2010 (r44462)
+++ branches/boehm_gc_2/compilers/ncigen/t/NCIGENAST/typedef_00.t Wed Feb 24 20:31:05 2010 (r44463)
@@ -2,6 +2,9 @@
# Copyright (C) 2008-2010, Parrot Foundation.
# $Id$
+use strict;
+use warnings;
+
use lib ('./lib', '../../lib');
use Parrot::Test::NCIGENAST;
Modified: branches/boehm_gc_2/compilers/ncigen/t/parse_00.t
==============================================================================
--- branches/boehm_gc_2/compilers/ncigen/t/parse_00.t Wed Feb 24 20:22:33 2010 (r44462)
+++ branches/boehm_gc_2/compilers/ncigen/t/parse_00.t Wed Feb 24 20:31:05 2010 (r44463)
@@ -2,6 +2,9 @@
# Copyright (C) 2008-2010, Parrot Foundation.
# $Id$
+use strict;
+use warnings;
+
use lib ('./lib', '../../lib');
use Parrot::Test::NCIGENAST;
@@ -122,7 +125,7 @@
int a = 10 * sizeof(int) * 13;
CODE
-parse_success(<<'CODE', 'times_04.c').c;
+parse_success(<<'CODE', 'times_04.c');
int a = 8 * 3;
CODE
Modified: branches/boehm_gc_2/compilers/ncigen/t/parse_01.t
==============================================================================
--- branches/boehm_gc_2/compilers/ncigen/t/parse_01.t Wed Feb 24 20:22:33 2010 (r44462)
+++ branches/boehm_gc_2/compilers/ncigen/t/parse_01.t Wed Feb 24 20:31:05 2010 (r44463)
@@ -2,6 +2,9 @@
# Copyright (C) 2008-2010, Parrot Foundation.
# $Id$
+use strict;
+use warnings;
+
use lib ('./lib', '../../lib');
use Parrot::Test::NCIGENAST;
Modified: branches/boehm_gc_2/compilers/ncigen/t/parse_02.t
==============================================================================
--- branches/boehm_gc_2/compilers/ncigen/t/parse_02.t Wed Feb 24 20:22:33 2010 (r44462)
+++ branches/boehm_gc_2/compilers/ncigen/t/parse_02.t Wed Feb 24 20:31:05 2010 (r44463)
@@ -2,6 +2,9 @@
# Copyright (C) 2008-2010, Parrot Foundation.
# $Id$
+use strict;
+use warnings;
+
use lib ('./lib', '../../lib');
use Parrot::Test::NCIGENAST;
Modified: branches/boehm_gc_2/compilers/pirc/t/basic.t
==============================================================================
--- branches/boehm_gc_2/compilers/pirc/t/basic.t Wed Feb 24 20:22:33 2010 (r44462)
+++ branches/boehm_gc_2/compilers/pirc/t/basic.t Wed Feb 24 20:31:05 2010 (r44463)
@@ -2,6 +2,9 @@
# Copyright (C) 2008-2009, Parrot Foundation.
# $Id$
+use strict;
+use warnings;
+
use lib qw(lib);
use Parrot::Test tests => 6;
Modified: branches/boehm_gc_2/compilers/pirc/t/heredoc.t
==============================================================================
--- branches/boehm_gc_2/compilers/pirc/t/heredoc.t Wed Feb 24 20:22:33 2010 (r44462)
+++ branches/boehm_gc_2/compilers/pirc/t/heredoc.t Wed Feb 24 20:31:05 2010 (r44463)
@@ -2,6 +2,9 @@
# Copyright (C) 2008-2009, Parrot Foundation.
# $Id$
+use strict;
+use warnings;
+
use lib qw(lib);
use Parrot::Test tests => 1;
Modified: branches/boehm_gc_2/compilers/pirc/t/macro.t
==============================================================================
--- branches/boehm_gc_2/compilers/pirc/t/macro.t Wed Feb 24 20:22:33 2010 (r44462)
+++ branches/boehm_gc_2/compilers/pirc/t/macro.t Wed Feb 24 20:31:05 2010 (r44463)
@@ -2,6 +2,9 @@
# Copyright (C) 2008-2009, Parrot Foundation.
# $Id$
+use strict;
+use warnings;
+
use lib qw(lib);
use Parrot::Test tests => 1;
Modified: branches/boehm_gc_2/compilers/pirc/t/stmts.t
==============================================================================
--- branches/boehm_gc_2/compilers/pirc/t/stmts.t Wed Feb 24 20:22:33 2010 (r44462)
+++ branches/boehm_gc_2/compilers/pirc/t/stmts.t Wed Feb 24 20:31:05 2010 (r44463)
@@ -2,6 +2,9 @@
# Copyright (C) 2008-2009, Parrot Foundation.
# $Id$
+use strict;
+use warnings;
+
use lib qw(lib);
use Parrot::Test tests => 5;
Modified: branches/boehm_gc_2/compilers/pirc/t/subflags.t
==============================================================================
--- branches/boehm_gc_2/compilers/pirc/t/subflags.t Wed Feb 24 20:22:33 2010 (r44462)
+++ branches/boehm_gc_2/compilers/pirc/t/subflags.t Wed Feb 24 20:31:05 2010 (r44463)
@@ -2,6 +2,9 @@
# Copyright (C) 2008-2009, Parrot Foundation.
# $Id$
+use strict;
+use warnings;
+
use lib qw(lib);
use Parrot::Test tests => 1;
Modified: branches/boehm_gc_2/config/init/hints/openbsd.pm
==============================================================================
--- branches/boehm_gc_2/config/init/hints/openbsd.pm Wed Feb 24 20:22:33 2010 (r44462)
+++ branches/boehm_gc_2/config/init/hints/openbsd.pm Wed Feb 24 20:31:05 2010 (r44463)
@@ -21,10 +21,17 @@
if ( $libs !~ /-lpthread\b/ ) {
$libs .= ' -lpthread';
}
+
+ my $ldflags = $conf->data->get('ldflags');
+ if ( $ldflags !~ m|-L/usr/local/lib\b| ) {
+ $ldflags .= ' -L/usr/local/lib';
+ }
+
$conf->data->set(
- libs => $libs,
- link => 'g++',
- rpath => '-Wl,-R',
+ ldflags => $ldflags,
+ libs => $libs,
+ link => 'g++',
+ rpath => '-Wl,-R',
has_dynamic_linking => 1,
parrot_is_shared => 1,
Modified: branches/boehm_gc_2/docs/embed.pod
==============================================================================
--- branches/boehm_gc_2/docs/embed.pod Wed Feb 24 20:22:33 2010 (r44462)
+++ branches/boehm_gc_2/docs/embed.pod Wed Feb 24 20:31:05 2010 (r44463)
@@ -340,14 +340,6 @@
with return values are passed as references in the varargs list, after all
arguments.
-=item [DEPRECATED] C<void *Parrot_call_sub(PARROT_INTERP, Parrot_PMC sub, const_char *signature)>
-
-Call a Parrot subroutine that returns a pointer using the supplied signature.
-
-=item [DEPRECATED] C<Parrot_Int Parrot_call_sub_ret_int(PARROT_INTERP, Parrot_PMC sub, const_char *signature)>
-
-Call a Parrot subroutine that returns an integer using the supplied signature.
-
=back
=head2 Objects
@@ -490,7 +482,7 @@
sub = Parrot_find_global_cur(interp, pstr);
/* run foo(), which returns nothing */
- Parrot_call_sub(interp, sub, "v");
+ Parrot_ext_call(interp, sub, "->");
Parrot_destroy(interp);
@@ -587,10 +579,6 @@
=item C<Parrot_ext_call>
-=item [DEPRECATED] C<Parrot_call_sub>
-
-=item [DEPRECATED] C<Parrot_call_sub_ret_int>
-
=item C<Parrot_char_digit_value>
=item C<Parrot_charset_c_name>
Modified: branches/boehm_gc_2/examples/languages/abc/t/01-tests.t
==============================================================================
--- branches/boehm_gc_2/examples/languages/abc/t/01-tests.t Wed Feb 24 20:22:33 2010 (r44462)
+++ branches/boehm_gc_2/examples/languages/abc/t/01-tests.t Wed Feb 24 20:31:05 2010 (r44463)
@@ -79,7 +79,7 @@
# calculate total number of tests
my $numtests = 0;
foreach my $f (@test_files) {
- open my( $TEST_FILE ), $f;
+ open my $TEST_FILE, '<', $f;
# for each line in the given files if it's not a comment line
# or an empty line, the it's a test
@@ -91,7 +91,7 @@
# main loop
foreach my $file (@test_files) {
- open my $TEST_FILE, "<$file" or die "can't open file";
+ open my $TEST_FILE, '<', $file or die "can't open file";
while (<$TEST_FILE>) {
chomp;
s/\r//g;
Modified: branches/boehm_gc_2/ext/Parrot-Embed/lib/Parrot/Embed.xs
==============================================================================
--- branches/boehm_gc_2/ext/Parrot-Embed/lib/Parrot/Embed.xs Wed Feb 24 20:22:33 2010 (r44462)
+++ branches/boehm_gc_2/ext/Parrot-Embed/lib/Parrot/Embed.xs Wed Feb 24 20:31:05 2010 (r44463)
@@ -223,7 +223,7 @@
pmc_actual = pmc->pmc;
interp = get_interp( pmc->interp );
arg_string = Parrot_str_new_constant( interp, argument );
- out_pmc = Parrot_call_sub( interp, pmc_actual, signature, arg_string );
+ Parrot_ext_call( interp, pmc_actual, signature, arg_string, &out_pmc );
RETVAL = make_pmc( aTHX_ pmc->interp, out_pmc );
OUTPUT:
RETVAL
Modified: branches/boehm_gc_2/ext/Parrot-Embed/t/pipp.t
==============================================================================
--- branches/boehm_gc_2/ext/Parrot-Embed/t/pipp.t Wed Feb 24 20:22:33 2010 (r44462)
+++ branches/boehm_gc_2/ext/Parrot-Embed/t/pipp.t Wed Feb 24 20:31:05 2010 (r44463)
@@ -1,5 +1,5 @@
#!perl
-# Copyright (C) 2008-2009, Parrot Foundation.
+# Copyright (C) 2008-2010, Parrot Foundation.
# $Id$
use strict;
@@ -33,8 +33,8 @@
isa_ok( $pipp_x, 'Parrot::PMC' );
}
-# TODO: get hll id of Pipp
-# TODO: set hll namespace root to 'pipp'
+# todo: get hll id of Pipp
+# todo: set hll namespace root to 'pipp'
# find sub 'eval' and hll namespace 'pipp'
my $pipp_eval = $interp->find_global( 'pipp', 'eval' );
# isa_ok( $pipp_eval, 'Parrot::PMC', todo => '$pipp_eval is not found' );
@@ -73,3 +73,11 @@
ok( $pmc, 'invoke() should return a PMC, given that signature' );
is( $pmc->get_string(), 42, 'value returned in the PMC' );
}
+
+
+# Local Variables:
+# mode: cperl
+# cperl-indent-level: 4
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:
Modified: branches/boehm_gc_2/lib/Parrot/Pmc2c/PMC.pm
==============================================================================
--- branches/boehm_gc_2/lib/Parrot/Pmc2c/PMC.pm Wed Feb 24 20:22:33 2010 (r44462)
+++ branches/boehm_gc_2/lib/Parrot/Pmc2c/PMC.pm Wed Feb 24 20:31:05 2010 (r44463)
@@ -1,4 +1,4 @@
-# Copyright (C) 2004-2008, Parrot Foundation.
+# Copyright (C) 2004-2010, Parrot Foundation.
# $Id$
#
@@ -340,7 +340,6 @@
my ( $self, $methodname ) = @_;
return 1 if ($methodname =~ m/^
- (?:i_)?
(?:add|subtract|multiply|divide|floor_divide|modulus)
(?:_int|_float)?
$/x);
Modified: branches/boehm_gc_2/src/dynpmc/gdbmhash.pmc
==============================================================================
--- branches/boehm_gc_2/src/dynpmc/gdbmhash.pmc Wed Feb 24 20:22:33 2010 (r44462)
+++ branches/boehm_gc_2/src/dynpmc/gdbmhash.pmc Wed Feb 24 20:31:05 2010 (r44463)
@@ -390,6 +390,40 @@
return;
}
+
+/*
+
+=back
+
+=head2 Specific Methods
+
+=over 4
+
+=item C<void open(STRING* value)>
+
+Open a or create a new dbm file.
+
+=cut
+
+*/
+
+ METHOD void open(STRING* value) {
+ VTABLE_set_string_native(interp, SELF, value);
+ }
+
+/*
+
+=item C<void close()>
+
+Close current dbm file.
+
+=cut
+
+*/
+
+ METHOD void close() {
+ gdbm_close(PMC_dbfh(SELF));
+ }
}
/*
Modified: branches/boehm_gc_2/src/pmc/oplib.pmc
==============================================================================
--- branches/boehm_gc_2/src/pmc/oplib.pmc Wed Feb 24 20:22:33 2010 (r44462)
+++ branches/boehm_gc_2/src/pmc/oplib.pmc Wed Feb 24 20:31:05 2010 (r44463)
@@ -8,7 +8,7 @@
=head1 DESCRIPTION
-Implements oplib VTABLEs.
+Implements oplib VTABLEs.
=cut
@@ -22,7 +22,7 @@
need to cache even a majority of the ~1300 ops. */
static PMC *OPLIB_PMC_INSTANCE;
static PMC *OPLIB_OPCODE_CACHE;
-pmclass OpLib singleton {
+pmclass OpLib {
void class_init() {
OPLIB_PMC_INSTANCE = NULL;
OPLIB_OPCODE_CACHE = NULL;
@@ -39,6 +39,7 @@
VTABLE void init() {
if (OPLIB_OPCODE_CACHE == NULL)
OPLIB_OPCODE_CACHE = Parrot_pmc_new(INTERP, enum_class_Hash);
+ PObj_custom_mark_SET(SELF);
}
VTABLE void mark() {
@@ -82,13 +83,12 @@
}
VTABLE PMC* get_pmc_keyed_int(INTVAL value) {
- if (value > interp->op_lib->op_count)
+ if ((UINTVAL)value > interp->op_lib->op_count)
Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_OUT_OF_BOUNDS,
"OpLib: Opcode index %d out of bounds", value);
else {
- const char * const name = interp->op_info_table[value].full_name;
- const INTVAL len = strlen(name);
- STRING * const newstr = Parrot_str_new(INTERP, name, len);
+ const char * const name = interp->op_info_table[value].full_name;
+ STRING * const newstr = Parrot_str_new(INTERP, name, 0);
return VTABLE_get_pmc_keyed_str(INTERP, SELF, newstr);
}
}
Modified: branches/boehm_gc_2/t/codingstd/c_cppcomments.t
==============================================================================
--- branches/boehm_gc_2/t/codingstd/c_cppcomments.t Wed Feb 24 20:22:33 2010 (r44462)
+++ branches/boehm_gc_2/t/codingstd/c_cppcomments.t Wed Feb 24 20:31:05 2010 (r44463)
@@ -60,9 +60,9 @@
(?: ' (?: \\\\ | \\' | [^'] )* ' ) # remove ' string
| (?: " (?: \\\\ | \\" | [^"] )* " ) # remove " string
| /\* .*? \*/ # remove C comment
- | https?:\/\/ # TT # 414 quick fix
+ | https?:\/\/ # TT # 414 quick fix
)
- }{}gsx;
+ }{}gsx;
return $buf !~ m{ ( .*? // .* ) }x;
}
Modified: branches/boehm_gc_2/t/compilers/imcc/imcpasm/optc.t
==============================================================================
--- branches/boehm_gc_2/t/compilers/imcc/imcpasm/optc.t Wed Feb 24 20:22:33 2010 (r44462)
+++ branches/boehm_gc_2/t/compilers/imcc/imcpasm/optc.t Wed Feb 24 20:31:05 2010 (r44463)
@@ -307,22 +307,9 @@
i 1 j 3 k 2
OUT
-sub permute (&@) {
- my $code = shift;
- my @idx = 0 .. $#_;
- while ( $code->( @_[@idx] ) ) {
- my $p = $#idx;
- --$p while $idx[ $p - 1 ] > $idx[$p];
- my $q = $p or return;
- push @idx, reverse splice @idx, $p;
- ++$q while $idx[ $p - 1 ] > $idx[$q];
- @idx[ $p - 1, $q ] = @idx[ $q, $p - 1 ];
- }
-}
-
my @array = ( 'i', 'j', 'k' );
my @b;
-permute { push @b, "@_" } @array;
+my_permute( sub { push @b, "@_" }, @array );
my $x;
my $y;
foreach $x (@b) {
@@ -356,7 +343,7 @@
undef @b;
@array = ( 'i', 'j', 'k', 'l' );
-permute { push @b, "@_" } @array;
+my_permute( sub { push @b, "@_" }, @array );
foreach $x (@b) {
$x =~ tr/ /,/;
$y = $x;
@@ -392,7 +379,7 @@
undef @b;
@array = ( 'i', 'j' );
-permute { push @b, "@_" } @array;
+my_permute( sub { push @b, "@_" }, @array );
foreach $x (@b) {
$x =~ tr/ /,/;
$y = $x;
@@ -419,6 +406,18 @@
OUT
}
+sub my_permute {
+ my $code = shift;
+ my @idx = 0 .. $#_;
+ while ( $code->( @_[@idx] ) ) {
+ my $p = $#idx;
+ --$p while $idx[ $p - 1 ] > $idx[$p];
+ my $q = $p or return;
+ push @idx, reverse splice @idx, $p;
+ ++$q while $idx[ $p - 1 ] > $idx[$q];
+ @idx[ $p - 1, $q ] = @idx[ $q, $p - 1 ];
+ }
+}
# Local Variables:
# mode: cperl
# cperl-indent-level: 4
Modified: branches/boehm_gc_2/t/compilers/imcc/reg/spill_old.t
==============================================================================
--- branches/boehm_gc_2/t/compilers/imcc/reg/spill_old.t Wed Feb 24 20:22:33 2010 (r44462)
+++ branches/boehm_gc_2/t/compilers/imcc/reg/spill_old.t Wed Feb 24 20:31:05 2010 (r44463)
@@ -1,6 +1,6 @@
#!perl
# Copyright (C) 2001-2008, Parrot Foundation.
-# $Id: spill.t 37201 2009-03-08 12:07:48Z fperrad $
+# $Id$
use strict;
use warnings;
Modified: branches/boehm_gc_2/t/compilers/imcc/syn/hll.t
==============================================================================
--- branches/boehm_gc_2/t/compilers/imcc/syn/hll.t Wed Feb 24 20:22:33 2010 (r44462)
+++ branches/boehm_gc_2/t/compilers/imcc/syn/hll.t Wed Feb 24 20:31:05 2010 (r44463)
@@ -1,5 +1,5 @@
#!perl
-# Copyright (C) 2008, Parrot Foundation.
+# Copyright (C) 2008-2010, Parrot Foundation.
# $Id$
use strict;
@@ -81,3 +81,10 @@
Stack
OUT
}
+
+# Local Variables:
+# mode: cperl
+# cperl-indent-level: 4
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:
Modified: branches/boehm_gc_2/t/compilers/pct/past.t
==============================================================================
--- branches/boehm_gc_2/t/compilers/pct/past.t Wed Feb 24 20:22:33 2010 (r44462)
+++ branches/boehm_gc_2/t/compilers/pct/past.t Wed Feb 24 20:31:05 2010 (r44463)
@@ -72,9 +72,9 @@
}
OUT
-## TODO: test that return() is taken from the type of value when not specified
+## TT #1476: test that return() is taken from the type of value when not specified
-## TODO: check the rest of the PAST::Var attributes
+## TT #1476: check the rest of the PAST::Var attributes
pir_output_is( <<'CODE', <<'OUT', 'dump PAST::Var node in visual format' );
.sub _main :main
load_bytecode 'PCT.pbc'
Modified: branches/boehm_gc_2/t/distro/meta_yml.t
==============================================================================
--- branches/boehm_gc_2/t/distro/meta_yml.t Wed Feb 24 20:22:33 2010 (r44462)
+++ branches/boehm_gc_2/t/distro/meta_yml.t Wed Feb 24 20:31:05 2010 (r44463)
@@ -1,5 +1,5 @@
#! perl
-# Copyright (C) 2008, Parrot Foundation.
+# Copyright (C) 2008-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -30,3 +30,10 @@
plan skip_all => "Test::CPAN::Meta 0.08 required for testing META.yml" if $@;
meta_yaml_ok();
+
+# Local Variables:
+# mode: cperl
+# cperl-indent-level: 4
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:
Modified: branches/boehm_gc_2/t/dynpmc/gdbmhash.t
==============================================================================
--- branches/boehm_gc_2/t/dynpmc/gdbmhash.t Wed Feb 24 20:22:33 2010 (r44462)
+++ branches/boehm_gc_2/t/dynpmc/gdbmhash.t Wed Feb 24 20:31:05 2010 (r44463)
@@ -48,7 +48,17 @@
.sub unlink
.param string filename
new $P0, 'OS'
+ push_eh _handler
$P0.'rm'(filename)
+ .return ()
+ _handler:
+ .local pmc e
+ .get_results (e)
+ printerr "# Cannot unlink "
+ printerr filename
+ printerr " ("
+ printerr e
+ printerr ")\n"
.end
.sub test_typeof
@@ -118,6 +128,7 @@
hash_size = hash_1
is(hash_size, 13, 'After 15 assignments and 2 deletes GDBMHash has size 13')
+ hash_1."close"()
unlink('gdbm_hash_1')
.end
@@ -130,7 +141,7 @@
ok(1, 'An uninitialized GDBMHash is not')
HASH1_IS_1:
- hash_1 = "gdbm_hash_1"
+ hash_1 = "gdbm_hash_2"
if hash_1 goto HASH1_IS_2
ok(1, 'A GDBMHash for a new file is not')
HASH1_IS_2:
@@ -141,7 +152,8 @@
HASH1_IS_3:
ok(1, 'After one insert the GDBMHash is')
- unlink('gdbm_hash_1')
+ hash_1."close"()
+ unlink('gdbm_hash_2')
.end
# The value is a STRING, with umlaut
@@ -151,7 +163,7 @@
gdbmhash_lib = loadlib "gdbmhash"
.local pmc hash_1
hash_1 = new "GDBMHash"
- hash_1 = "gdbm_hash_1"
+ hash_1 = "gdbm_hash_3"
.local pmc val_pmc
@@ -168,7 +180,8 @@
val_pmc = hash_1["Schluessel"]
is(val_pmc, 'Wert urspruenglich', 'modify an entry')
- unlink('gdbm_hash_1')
+ hash_1."close"()
+ unlink('gdbm_hash_3')
.end
# The value is a STRING.
@@ -178,7 +191,7 @@
gdbmhash_lib = loadlib "gdbmhash"
.local pmc hash_1
hash_1 = new "GDBMHash"
- hash_1 = "gdbm_hash_1"
+ hash_1 = "gdbm_hash_4"
hash_1["Schluessel"] = "Wert"
@@ -197,7 +210,8 @@
exist_flag = exists hash_1[key_out]
is(exist_flag, 1, 'exists keyed')
- unlink('gdbm_hash_1')
+ hash_1."close"()
+ unlink('gdbm_hash_4')
.end
# The value is a STRING.
@@ -207,7 +221,7 @@
gdbmhash_lib = loadlib "gdbmhash"
.local pmc hash_1
hash_1 = new "GDBMHash"
- hash_1 = "gdbm_hash_1"
+ hash_1 = "gdbm_hash_5"
hash_1["Schluessel"] = "Wert"
@@ -226,7 +240,8 @@
val_pmc = hash_1[key_out]
is(val_pmc, 'Wert', 'set string with string key')
- unlink('gdbm_hash_1')
+ hash_1."close"()
+ unlink('gdbm_hash_5')
.end
# The value is a STRING.
@@ -236,7 +251,7 @@
gdbmhash_lib = loadlib "gdbmhash"
.local pmc hash_1
hash_1 = new "GDBMHash"
- hash_1 = "gdbm_hash_1"
+ hash_1 = "gdbm_hash_6"
.local pmc key_pmc
key_pmc = new 'String'
@@ -258,7 +273,8 @@
val_pmc = hash_1[key2]
is(val_pmc, 'Wert', 'set string with pmc key')
- unlink('gdbm_hash_1')
+ hash_1."close"()
+ unlink('gdbm_hash_6')
.end
# The value is a PMC.
@@ -268,7 +284,7 @@
gdbmhash_lib = loadlib "gdbmhash"
.local pmc hash_1
hash_1 = new "GDBMHash"
- hash_1 = "gdbm_hash_1"
+ hash_1 = "gdbm_hash_7"
.local pmc val
val = new 'String'
@@ -290,7 +306,8 @@
val_pmc = hash_1[key_out]
is(val_pmc, 'Wert', 'set pmc with string key')
- unlink('gdbm_hash_1')
+ hash_1."close"()
+ unlink('gdbm_hash_7')
.end
# The value is a PMC.
@@ -300,7 +317,7 @@
gdbmhash_lib = loadlib "gdbmhash"
.local pmc hash_1
hash_1 = new "GDBMHash"
- hash_1 = "gdbm_hash_1"
+ hash_1 = "gdbm_hash_8"
.local pmc val
val = new 'String'
@@ -325,7 +342,8 @@
val_pmc = hash_1[key2]
is(val_pmc, 'Wert', 'set pmc with pmc key')
- unlink('gdbm_hash_1')
+ hash_1."close"()
+ unlink('gdbm_hash_8')
.end
# The value is an INTVAL
@@ -335,7 +353,7 @@
gdbmhash_lib = loadlib "gdbmhash"
.local pmc hash_1
hash_1 = new "GDBMHash"
- hash_1 = "gdbm_hash_1"
+ hash_1 = "gdbm_hash_9"
hash_1["Schluessel"] = -11012005
@@ -354,7 +372,8 @@
val_pmc = hash_1[key_out]
is(val_pmc, -11012005, 'set intval with a string key')
- unlink('gdbm_hash_1')
+ hash_1."close"()
+ unlink('gdbm_hash_9')
.end
# The value is a FLOATVAL.
@@ -364,7 +383,7 @@
gdbmhash_lib = loadlib "gdbmhash"
.local pmc hash_1
hash_1 = new "GDBMHash"
- hash_1 = "gdbm_hash_1"
+ hash_1 = "gdbm_hash_10"
.local pmc key_pmc
key_pmc = new 'String'
@@ -386,7 +405,8 @@
val_pmc = hash_1[key2]
is(val_pmc, -1101.2005, 'set float with a pmc key')
- unlink('gdbm_hash_1')
+ hash_1."close"()
+ unlink('gdbm_hash_10')
.end
.sub test_delete_keyed
@@ -394,7 +414,7 @@
gdbmhash_lib = loadlib "gdbmhash"
.local pmc hash_1
hash_1 = new "GDBMHash"
- hash_1 = "gdbm_hash_1"
+ hash_1 = "gdbm_hash_11"
.local int exist_flag
.local int hash_size
@@ -410,7 +430,8 @@
exist_flag = exists hash_1["a"]
is(exist_flag, 0, 'delete keyed')
- unlink('gdbm_hash_1')
+ hash_1."close"()
+ unlink('gdbm_hash_11')
.end
# Local Variables:
Modified: branches/boehm_gc_2/t/dynpmc/rational.t
==============================================================================
--- branches/boehm_gc_2/t/dynpmc/rational.t Wed Feb 24 20:22:33 2010 (r44462)
+++ branches/boehm_gc_2/t/dynpmc/rational.t Wed Feb 24 20:31:05 2010 (r44463)
@@ -1,5 +1,5 @@
#! perl
-# Copyright (C) 2008, Parrot Foundation.
+# Copyright (C) 2008-2010, Parrot Foundation.
# $Id$
use strict;
@@ -658,3 +658,10 @@
-1
1
OUTPUT
+
+# Local Variables:
+# mode: cperl
+# cperl-indent-level: 4
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:
Modified: branches/boehm_gc_2/t/examples/pod.t
==============================================================================
--- branches/boehm_gc_2/t/examples/pod.t Wed Feb 24 20:22:33 2010 (r44462)
+++ branches/boehm_gc_2/t/examples/pod.t Wed Feb 24 20:31:05 2010 (r44463)
@@ -74,7 +74,7 @@
my $todo = 0;
$todo = 1 if ($snippet->{modifier} =~ /TODO|INVALID/);
TODO: {
- # conditionally TODO the file.
+ # conditionally todo the file.
local $TODO = 'invalid code' if $todo;
is ($error_output,'',$description);
Modified: branches/boehm_gc_2/t/native_pbc/integer.t
==============================================================================
--- branches/boehm_gc_2/t/native_pbc/integer.t Wed Feb 24 20:22:33 2010 (r44462)
+++ branches/boehm_gc_2/t/native_pbc/integer.t Wed Feb 24 20:31:05 2010 (r44463)
@@ -90,7 +90,7 @@
. "_"
. (substr($PConfig{byteorder},0,2) eq '12' ? "le" : "be");
}
-sub bc_version($) {
+sub bc_version {
my $f = shift;
my $b;
open my $F, "<", "$f" or return "Can't open $f: $!";
Modified: branches/boehm_gc_2/t/native_pbc/number.t
==============================================================================
--- branches/boehm_gc_2/t/native_pbc/number.t Wed Feb 24 20:22:33 2010 (r44462)
+++ branches/boehm_gc_2/t/native_pbc/number.t Wed Feb 24 20:31:05 2010 (r44463)
@@ -132,7 +132,7 @@
. "_"
. (substr($PConfig{byteorder},0,2) eq '12' ? "le" : "be");
}
-sub bc_version($) {
+sub bc_version {
my $f = shift;
my $b;
open my $F, "<", "$f" or return "Can't open $f: $!";
Modified: branches/boehm_gc_2/t/native_pbc/string.t
==============================================================================
--- branches/boehm_gc_2/t/native_pbc/string.t Wed Feb 24 20:22:33 2010 (r44462)
+++ branches/boehm_gc_2/t/native_pbc/string.t Wed Feb 24 20:31:05 2010 (r44463)
@@ -58,7 +58,7 @@
. "_"
. (substr($PConfig{byteorder},0,2) eq '12' ? "le" : "be");
}
-sub bc_version($) {
+sub bc_version {
my $f = shift;
my $b;
open my $F, "<", "$f" or return "Can't open $f: $!";
Modified: branches/boehm_gc_2/t/oo/new-old.t
==============================================================================
--- branches/boehm_gc_2/t/oo/new-old.t Wed Feb 24 20:22:33 2010 (r44462)
+++ branches/boehm_gc_2/t/oo/new-old.t Wed Feb 24 20:31:05 2010 (r44463)
@@ -58,7 +58,8 @@
OUT
# Local Variables:
-# mode: pir
+# mode: cperl
+# cperl-indent-level: 4
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4 ft=pir:
+# vim: expandtab shiftwidth=4:
Modified: branches/boehm_gc_2/t/op/calling.t
==============================================================================
--- branches/boehm_gc_2/t/op/calling.t Wed Feb 24 20:22:33 2010 (r44462)
+++ branches/boehm_gc_2/t/op/calling.t Wed Feb 24 20:31:05 2010 (r44463)
@@ -1406,9 +1406,14 @@
ok
OUTPUT
-my @todo = ( todo => 'broken with JIT (TT #983)' )
- if ( defined $ENV{TEST_PROG_ARGS} and
- $ENV{TEST_PROG_ARGS} =~ /--runcore=jit/ );
+my @todo = (
+ defined $ENV{TEST_PROG_ARGS}
+ and
+ $ENV{TEST_PROG_ARGS} =~ /--runcore=jit/
+)
+ ? ( todo => 'broken with JIT (TT #983)' )
+ : ();
+
pir_output_is( <<'CODE', <<'OUTPUT', "clone_key_arg", @todo );
.sub main :main
foo()
@@ -2461,7 +2466,7 @@
OUTPUT
# See Rakudo queue http://rt.perl.org/rt3/Ticket/Display.html?id=62730
-pir_output_is( <<'CODE', <<'OUTPUT', "Handling :flat of emtpy arguments" );
+pir_output_is( <<'CODE', <<'OUTPUT', "Handling :flat of empty arguments" );
.sub 'main'
$P0 = new ['Undef']
($P0) = foo()
Modified: branches/boehm_gc_2/t/op/exit.t
==============================================================================
--- branches/boehm_gc_2/t/op/exit.t Wed Feb 24 20:22:33 2010 (r44462)
+++ branches/boehm_gc_2/t/op/exit.t Wed Feb 24 20:31:05 2010 (r44463)
@@ -1,5 +1,5 @@
#!perl
-# Copyright (C) 2009, Parrot Foundation.
+# Copyright (C) 2009-2010, Parrot Foundation.
# $Id$
use strict;
@@ -65,6 +65,7 @@
pbc_exit_code_is($pbc, 0, 'pbc exits with 0 by default');
}
+# Local Variables:
# mode: cperl
# cperl-indent-level: 4
# fill-column: 100
Modified: branches/boehm_gc_2/t/op/sysinfo.t
==============================================================================
--- branches/boehm_gc_2/t/op/sysinfo.t Wed Feb 24 20:22:33 2010 (r44462)
+++ branches/boehm_gc_2/t/op/sysinfo.t Wed Feb 24 20:31:05 2010 (r44463)
@@ -1,5 +1,5 @@
#!perl
-# Copyright (C) 2008, Parrot Foundation.
+# Copyright (C) 2008-2010, Parrot Foundation.
# $Id$
# initial work by Brad Gilbert b2gills <at> gmail <dot> com
@@ -142,7 +142,7 @@
print S1
end
CODE
- } # END TODO block
+ } # END todo block
} # END inner SKIP block
} # END outer SKIP block
@@ -174,3 +174,10 @@
.end
CODE
}
+
+# Local Variables:
+# mode: cperl
+# cperl-indent-level: 4
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:
Modified: branches/boehm_gc_2/t/perl/Parrot_IO.t
==============================================================================
--- branches/boehm_gc_2/t/perl/Parrot_IO.t Wed Feb 24 20:22:33 2010 (r44462)
+++ branches/boehm_gc_2/t/perl/Parrot_IO.t Wed Feb 24 20:31:05 2010 (r44463)
@@ -1,5 +1,5 @@
#! perl
-# Copyright (C) 2001-2008, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
use strict;
@@ -40,9 +40,9 @@
BEGIN { use_ok('Parrot::IO::Path') }
my $file_temp_work_path = tempdir(
- 'PARROT_IO_XXXX',
- TMPDIR => 1,
- CLEANUP => 1
+ 'PARROT_IO_XXXX',
+ TMPDIR => 1,
+ CLEANUP => 1
);
# you can sort of count on the var below being the unique part of the temp dir
my $file_temp_dir = (splitdir($file_temp_work_path))[-1];
@@ -89,7 +89,7 @@
ok( !$r->parent(), 'root has no parent' );
my $d = Parrot::IO::Directory->tmp_directory(
- catfile($file_temp_dir, 't')
+ catfile($file_temp_dir, 't')
);
ok( $d, 'tmp_directory' );
Modified: branches/boehm_gc_2/t/pmc/exporter.t
==============================================================================
--- branches/boehm_gc_2/t/pmc/exporter.t Wed Feb 24 20:22:33 2010 (r44462)
+++ branches/boehm_gc_2/t/pmc/exporter.t Wed Feb 24 20:31:05 2010 (r44463)
@@ -405,7 +405,7 @@
ok 1
OUT
-# TODO: Test exporting mmd subs: TT #1205
+# Test exporting mmd subs: TT #1205
# https://trac.parrot.org/parrot/ticket/1205
# Local Variables:
Modified: branches/boehm_gc_2/t/pmc/iterator.t
==============================================================================
--- branches/boehm_gc_2/t/pmc/iterator.t Wed Feb 24 20:22:33 2010 (r44462)
+++ branches/boehm_gc_2/t/pmc/iterator.t Wed Feb 24 20:31:05 2010 (r44463)
@@ -23,7 +23,7 @@
=cut
-# XXX Split this test into aggregate specific one.
+# TT #1478: Split this test into aggregate specific one.
pasm_output_is( <<'CODE', <<'OUTPUT', "new iter" );
new P2, ['ResizablePMCArray']
Modified: branches/boehm_gc_2/t/pmc/multidispatch.t
==============================================================================
--- branches/boehm_gc_2/t/pmc/multidispatch.t Wed Feb 24 20:22:33 2010 (r44462)
+++ branches/boehm_gc_2/t/pmc/multidispatch.t Wed Feb 24 20:31:05 2010 (r44463)
@@ -1,5 +1,5 @@
#! perl
-# Copyright (C) 2001-2008, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
use strict;
@@ -9,7 +9,7 @@
use Test::More;
use Parrot::Test::Util 'create_tempfile';
-use Parrot::Test tests => 45;
+use Parrot::Test tests => 46;
=head1 NAME
@@ -1493,6 +1493,29 @@
77.788.899.9
OUTPUT
+pir_output_is( <<'CODE', <<'OUTPUT', 'Integer subclass and MMD - TT #784' );
+.sub main :main
+ .local pmc int_c
+ int_c = get_class "Integer"
+
+ .local pmc sub_c
+ sub_c = subclass int_c, "MyInt"
+
+ $P1 = new 'Integer'
+ $P1 = 4
+ $P1 -= 3
+ say $P1
+
+ $P1 = new 'MyInt'
+ $P1 = 4
+ $P1 -= 3
+ say $P1
+.end
+CODE
+1
+1
+OUTPUT
+
# Local Variables:
# mode: cperl
# cperl-indent-level: 4
Modified: branches/boehm_gc_2/t/pmc/sub.t
==============================================================================
--- branches/boehm_gc_2/t/pmc/sub.t Wed Feb 24 20:22:33 2010 (r44462)
+++ branches/boehm_gc_2/t/pmc/sub.t Wed Feb 24 20:31:05 2010 (r44463)
@@ -27,6 +27,8 @@
=cut
+my @todo;
+
pasm_output_is( <<'CODE', <<'OUTPUT', "PASM subs - invokecc" );
.const 'Sub' P0 = "func"
@@ -835,9 +837,14 @@
main
OUTPUT
-my @todo = ( todo => 'broken with JIT (TT #983)' )
- if ( defined $ENV{TEST_PROG_ARGS} and
- $ENV{TEST_PROG_ARGS} =~ /--runcore=jit/ );
+ at todo = (
+ defined $ENV{TEST_PROG_ARGS}
+ and
+ $ENV{TEST_PROG_ARGS} =~ /--runcore=jit/
+)
+ ? ( todo => 'broken with JIT (TT #983)' )
+ : ();
+
pir_output_is( <<'CODE', <<'OUTPUT', "caller introspection via interp", @todo );
.sub main :main
.include "interpinfo.pasm"
Modified: branches/boehm_gc_2/t/steps/auto/snprintf-01.t
==============================================================================
--- branches/boehm_gc_2/t/steps/auto/snprintf-01.t Wed Feb 24 20:22:33 2010 (r44462)
+++ branches/boehm_gc_2/t/steps/auto/snprintf-01.t Wed Feb 24 20:31:05 2010 (r44463)
@@ -35,24 +35,6 @@
$conf->options->set(%{$args});
my $step = test_step_constructor_and_description($conf);
-# The test of runstep() below will need to be TODO-ed until such time as
-# we can test with all the data which the Parrot::Configure object would
-# normally have during regular configuration at the onset of this step.
-# That's because runstep() consists almost solely of calls to C
-# programs. We can't refactor runstep()'s guts out into internal
-# subroutines and test them explicitly as we've been able to do for
-# other configuration steps. We won't lose any coverage by commenting
-# out the TODO block for the time being, as the coverage analysis will,
-# at the very least, pick up runstep() while running the step itself.
-#
-#TODO: {
-# # http://rt.perl.org/rt3/Ticket/Display.html?id=47391
-# local $TODO =
-# q<Reported failing where vendor-supplied Perl 5 Config.pm does not match true state of system available for Parrot configuration>;
-# ok($step->runstep($conf), "runstep() returned true value");
-#} #'
-
-
$conf->replenish($serialized);
########## _evaluate_snprintf() ##########
Modified: branches/boehm_gc_2/t/tools/ops2pm/05-renum_op_map_file.t
==============================================================================
--- branches/boehm_gc_2/t/tools/ops2pm/05-renum_op_map_file.t Wed Feb 24 20:22:33 2010 (r44462)
+++ branches/boehm_gc_2/t/tools/ops2pm/05-renum_op_map_file.t Wed Feb 24 20:31:05 2010 (r44463)
@@ -1,5 +1,5 @@
#! perl
-# Copyright (C) 2007-2008, Parrot Foundation.
+# Copyright (C) 2007-2010, Parrot Foundation.
# $Id$
# 05-renum_op_map_file.t
@@ -127,3 +127,10 @@
return ($lastcode, $lastnumber);
}
+# Local Variables:
+# mode: cperl
+# cperl-indent-level: 4
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:
+
Modified: branches/boehm_gc_2/t/tools/ops2pm/08-sort_ops.t
==============================================================================
--- branches/boehm_gc_2/t/tools/ops2pm/08-sort_ops.t Wed Feb 24 20:22:33 2010 (r44462)
+++ branches/boehm_gc_2/t/tools/ops2pm/08-sort_ops.t Wed Feb 24 20:31:05 2010 (r44463)
@@ -177,17 +177,12 @@
\$stderr
);
ok($ret, "sort_ops returned successfully" );
-# TODO: {
-# local $TODO = 'broken warning about experimental ops';
- like(
- $stderr,
- qr|experimental, not in ops\.num|,
- "Got expected warning about experimental ops"
- );
-# }
-
- # To do: Test that the sorting was correct.
+ like(
+ $stderr,
+ qr|experimental, not in ops\.num|,
+ "Got expected warning about experimental ops"
+ );
ok( chdir $cwd, 'changed back to starting directory after testing' );
}
More information about the parrot-commits
mailing list