[svn:parrot] r44452 - in branches/rm_cflags: . compilers/ncigen/t compilers/ncigen/t/NCIGENAST compilers/pirc/t config/gen/makefiles config/init/hints docs examples/languages/abc/t ext/Parrot-Embed/lib/Parrot ext/Parrot-Embed/t include/parrot lib/Parrot lib/Parrot/Ops2c lib/Parrot/Pmc2c runtime/parrot/library runtime/parrot/library/Configure src src/call src/gc src/interp src/io src/nci src/ops src/pmc src/runcore t/codingstd t/compilers/imcc/imcpasm t/compilers/imcc/reg t/compilers/imcc/syn t/compilers/json t/compilers/pct t/compilers/pge t/compilers/tge t/configure t/distro t/dynoplibs t/dynpmc t/examples t/library t/manifest t/native_pbc t/oo t/op t/perl t/pir t/pmc t/src t/steps/auto t/steps/init/hints t/tools t/tools/dev t/tools/install t/tools/ops2pm t/tools/pmc2cutils tools/dev
coke at svn.parrot.org
coke at svn.parrot.org
Wed Feb 24 08:12:08 UTC 2010
Author: coke
Date: Wed Feb 24 08:11:58 2010
New Revision: 44452
URL: https://trac.parrot.org/parrot/changeset/44452
Log:
merge latest changes from trunk
Added:
branches/rm_cflags/t/compilers/imcc/reg/spill_old.t
- copied unchanged from r44451, trunk/t/compilers/imcc/reg/spill_old.t
Modified:
branches/rm_cflags/ (props changed)
branches/rm_cflags/MANIFEST
branches/rm_cflags/compilers/ncigen/t/NCIGENAST/struct_00.t
branches/rm_cflags/compilers/ncigen/t/NCIGENAST/typedef_00.t
branches/rm_cflags/compilers/ncigen/t/parse_00.t
branches/rm_cflags/compilers/ncigen/t/parse_01.t
branches/rm_cflags/compilers/ncigen/t/parse_02.t
branches/rm_cflags/compilers/pirc/t/basic.t
branches/rm_cflags/compilers/pirc/t/heredoc.t
branches/rm_cflags/compilers/pirc/t/macro.t
branches/rm_cflags/compilers/pirc/t/stmts.t
branches/rm_cflags/compilers/pirc/t/subflags.t
branches/rm_cflags/config/gen/makefiles/root.in
branches/rm_cflags/config/init/hints/openbsd.pm
branches/rm_cflags/docs/embed.pod
branches/rm_cflags/examples/languages/abc/t/01-tests.t
branches/rm_cflags/ext/Parrot-Embed/lib/Parrot/Embed.xs
branches/rm_cflags/ext/Parrot-Embed/t/pipp.t
branches/rm_cflags/include/parrot/call.h
branches/rm_cflags/include/parrot/hash.h
branches/rm_cflags/include/parrot/io.h
branches/rm_cflags/include/parrot/oplib.h
branches/rm_cflags/include/parrot/pobj.h
branches/rm_cflags/include/parrot/runcore_trace.h (props changed)
branches/rm_cflags/lib/Parrot/Distribution.pm
branches/rm_cflags/lib/Parrot/Ops2c/Utils.pm
branches/rm_cflags/lib/Parrot/Pmc2c/PMC.pm
branches/rm_cflags/runtime/parrot/library/Configure/genfile.pir
branches/rm_cflags/runtime/parrot/library/distutils.pir
branches/rm_cflags/src/call/ops.c
branches/rm_cflags/src/gc/gc_ms.c
branches/rm_cflags/src/hash.c
branches/rm_cflags/src/interp/inter_create.c (contents, props changed)
branches/rm_cflags/src/io/filehandle.c
branches/rm_cflags/src/nci/core_thunks.c
branches/rm_cflags/src/nci/extra_thunks.c
branches/rm_cflags/src/ops/set.ops
branches/rm_cflags/src/pmc/filehandle.pmc
branches/rm_cflags/src/pmc/fixedstringarray.pmc
branches/rm_cflags/src/pmc/nci.pmc
branches/rm_cflags/src/pmc/oplib.pmc
branches/rm_cflags/src/pmc/sockaddr.pmc
branches/rm_cflags/src/pmc/socket.pmc
branches/rm_cflags/src/runcore/cores.c (contents, props changed)
branches/rm_cflags/src/runcore/main.c
branches/rm_cflags/src/runcore/profiling.c
branches/rm_cflags/src/runcore/trace.c (props changed)
branches/rm_cflags/src/tsq.c
branches/rm_cflags/t/codingstd/c_arg_assert.t
branches/rm_cflags/t/codingstd/c_cppcomments.t
branches/rm_cflags/t/codingstd/c_indent.t
branches/rm_cflags/t/codingstd/c_macro_args.t
branches/rm_cflags/t/codingstd/cuddled_else.t
branches/rm_cflags/t/codingstd/opcode_doc.t
branches/rm_cflags/t/codingstd/perlcritic.t
branches/rm_cflags/t/codingstd/pod_description.t
branches/rm_cflags/t/codingstd/pod_syntax.t
branches/rm_cflags/t/codingstd/trailing_space.t
branches/rm_cflags/t/compilers/imcc/imcpasm/optc.t
branches/rm_cflags/t/compilers/imcc/reg/spill.t
branches/rm_cflags/t/compilers/imcc/syn/hll.t
branches/rm_cflags/t/compilers/imcc/syn/labels.t
branches/rm_cflags/t/compilers/imcc/syn/objects.t
branches/rm_cflags/t/compilers/imcc/syn/op.t
branches/rm_cflags/t/compilers/imcc/syn/scope.t
branches/rm_cflags/t/compilers/imcc/syn/subflags.t
branches/rm_cflags/t/compilers/imcc/syn/veracity.t
branches/rm_cflags/t/compilers/json/from_parrot.t
branches/rm_cflags/t/compilers/pct/past.t
branches/rm_cflags/t/compilers/pge/00-basic.t
branches/rm_cflags/t/compilers/pge/02-match.t
branches/rm_cflags/t/compilers/pge/03-optable.t
branches/rm_cflags/t/compilers/pge/04-compile.t
branches/rm_cflags/t/compilers/pge/06-grammar.t
branches/rm_cflags/t/compilers/pge/pge-hs.t
branches/rm_cflags/t/compilers/tge/basic.t
branches/rm_cflags/t/compilers/tge/parser.t
branches/rm_cflags/t/configure/008-file_based_configuration.t
branches/rm_cflags/t/distro/meta_yml.t
branches/rm_cflags/t/dynoplibs/math.t
branches/rm_cflags/t/dynoplibs/obscure.t
branches/rm_cflags/t/dynpmc/foo2.t
branches/rm_cflags/t/dynpmc/gdbmhash.t
branches/rm_cflags/t/dynpmc/rational.t
branches/rm_cflags/t/dynpmc/subproxy.t
branches/rm_cflags/t/examples/catchall.t
branches/rm_cflags/t/examples/pod.t
branches/rm_cflags/t/examples/tutorial.t
branches/rm_cflags/t/library/cgi_query_hash.t
branches/rm_cflags/t/library/configure.t
branches/rm_cflags/t/library/getopt_obj.t
branches/rm_cflags/t/library/md5.t
branches/rm_cflags/t/library/mime_base64.t
branches/rm_cflags/t/library/p6object.t
branches/rm_cflags/t/library/parrotlib.t
branches/rm_cflags/t/library/pg.t
branches/rm_cflags/t/library/protoobject.t
branches/rm_cflags/t/library/rand.t
branches/rm_cflags/t/library/tcl_glob.t
branches/rm_cflags/t/library/test_class.t
branches/rm_cflags/t/library/test_more.t
branches/rm_cflags/t/library/uuid.t
branches/rm_cflags/t/manifest/01-basic.t
branches/rm_cflags/t/manifest/02-regenerate_file.t
branches/rm_cflags/t/manifest/03-regenerate_skip.t
branches/rm_cflags/t/manifest/04-alt_file.t
branches/rm_cflags/t/manifest/05-alt_skip.t
branches/rm_cflags/t/native_pbc/header.t
branches/rm_cflags/t/native_pbc/integer.t
branches/rm_cflags/t/native_pbc/number.t
branches/rm_cflags/t/native_pbc/string.t
branches/rm_cflags/t/oo/attributes.t
branches/rm_cflags/t/oo/composition.t
branches/rm_cflags/t/oo/inheritance.t
branches/rm_cflags/t/oo/metamodel.t
branches/rm_cflags/t/oo/methods.t
branches/rm_cflags/t/oo/mro-c3.t
branches/rm_cflags/t/oo/names.t
branches/rm_cflags/t/oo/new-old.t
branches/rm_cflags/t/oo/new.t
branches/rm_cflags/t/oo/ops.t
branches/rm_cflags/t/oo/root_new.t
branches/rm_cflags/t/oo/subclass.t
branches/rm_cflags/t/op/00ff-dos.t
branches/rm_cflags/t/op/00ff-unix.t
branches/rm_cflags/t/op/64bit.t
branches/rm_cflags/t/op/annotate.t
branches/rm_cflags/t/op/arithmetics.t
branches/rm_cflags/t/op/arithmetics_pmc.t
branches/rm_cflags/t/op/box.t
branches/rm_cflags/t/op/calling.t
branches/rm_cflags/t/op/cc_params.t
branches/rm_cflags/t/op/comp.t
branches/rm_cflags/t/op/errorson.t
branches/rm_cflags/t/op/exit.t
branches/rm_cflags/t/op/fetch.t
branches/rm_cflags/t/op/gc-leaky.t
branches/rm_cflags/t/op/gc.t
branches/rm_cflags/t/op/inf_nan.t
branches/rm_cflags/t/op/integer.t
branches/rm_cflags/t/op/literal.t
branches/rm_cflags/t/op/number.t
branches/rm_cflags/t/op/sprintf2.t
branches/rm_cflags/t/op/string.t
branches/rm_cflags/t/op/string_cmp.t
branches/rm_cflags/t/op/string_mem.t
branches/rm_cflags/t/op/stringu.t
branches/rm_cflags/t/op/sysinfo.t
branches/rm_cflags/t/op/time.t
branches/rm_cflags/t/op/trans.t
branches/rm_cflags/t/op/vivify.t
branches/rm_cflags/t/perl/Parrot_IO.t
branches/rm_cflags/t/perl/Parrot_Test.t
branches/rm_cflags/t/pir/macro.t
branches/rm_cflags/t/pmc/arrayiterator.t
branches/rm_cflags/t/pmc/bigint.t
branches/rm_cflags/t/pmc/capture.t
branches/rm_cflags/t/pmc/class.t
branches/rm_cflags/t/pmc/complex.t
branches/rm_cflags/t/pmc/continuation.t
branches/rm_cflags/t/pmc/default.t
branches/rm_cflags/t/pmc/env.t
branches/rm_cflags/t/pmc/eventhandler.t
branches/rm_cflags/t/pmc/exception.t
branches/rm_cflags/t/pmc/exporter.t
branches/rm_cflags/t/pmc/filehandle.t
branches/rm_cflags/t/pmc/fixedbooleanarray.t
branches/rm_cflags/t/pmc/fixedintegerarray.t
branches/rm_cflags/t/pmc/fixedpmcarray.t
branches/rm_cflags/t/pmc/fixedstringarray.t
branches/rm_cflags/t/pmc/handle.t
branches/rm_cflags/t/pmc/hash.t
branches/rm_cflags/t/pmc/hashiterator.t
branches/rm_cflags/t/pmc/hashiteratorkey.t
branches/rm_cflags/t/pmc/imageio.t
branches/rm_cflags/t/pmc/imageiosize.t
branches/rm_cflags/t/pmc/integer.t
branches/rm_cflags/t/pmc/iterator.t
branches/rm_cflags/t/pmc/lexinfo.t
branches/rm_cflags/t/pmc/lexpad.t
branches/rm_cflags/t/pmc/multidispatch.t
branches/rm_cflags/t/pmc/namespace.t
branches/rm_cflags/t/pmc/objects.t
branches/rm_cflags/t/pmc/opcode.t
branches/rm_cflags/t/pmc/oplib.t
branches/rm_cflags/t/pmc/orderedhashiterator.t
branches/rm_cflags/t/pmc/os.t
branches/rm_cflags/t/pmc/packfile.t
branches/rm_cflags/t/pmc/packfileannotation.t
branches/rm_cflags/t/pmc/packfileannotations.t
branches/rm_cflags/t/pmc/packfileconstanttable.t
branches/rm_cflags/t/pmc/packfiledirectory.t
branches/rm_cflags/t/pmc/packfilefixupentry.t
branches/rm_cflags/t/pmc/packfilefixuptable.t
branches/rm_cflags/t/pmc/packfilerawsegment.t
branches/rm_cflags/t/pmc/packfilesegment.t
branches/rm_cflags/t/pmc/parrotinterpreter.t
branches/rm_cflags/t/pmc/prop.t
branches/rm_cflags/t/pmc/ro.t
branches/rm_cflags/t/pmc/scalar.t
branches/rm_cflags/t/pmc/scheduler.t
branches/rm_cflags/t/pmc/string.t
branches/rm_cflags/t/pmc/stringhandle.t
branches/rm_cflags/t/pmc/stringiterator.t
branches/rm_cflags/t/pmc/sub.t
branches/rm_cflags/t/src/embed.t (props changed)
branches/rm_cflags/t/steps/auto/snprintf-01.t
branches/rm_cflags/t/steps/init/hints/darwin-01.t
branches/rm_cflags/t/tools/dev/pmctree.t
branches/rm_cflags/t/tools/install/02-install_files.t
branches/rm_cflags/t/tools/install/03-lines_to_files.t
branches/rm_cflags/t/tools/ops2pm/05-renum_op_map_file.t
branches/rm_cflags/t/tools/ops2pm/08-sort_ops.t
branches/rm_cflags/t/tools/pbc_disassemble.t
branches/rm_cflags/t/tools/pmc2cutils/04-dump_pmc.t
branches/rm_cflags/t/tools/pmc2cutils/05-gen_c.t
branches/rm_cflags/tools/dev/mk_gitignore.pl (props changed)
branches/rm_cflags/tools/dev/nci_thunk_gen.pir
Modified: branches/rm_cflags/MANIFEST
==============================================================================
--- branches/rm_cflags/MANIFEST Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/MANIFEST Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,7 +1,7 @@
# ex: set ro:
# $Id$
#
-# generated by tools/dev/mk_manifest_and_skip.pl Sat Feb 20 18:21:54 2010 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Tue Feb 23 18:31:24 2010 UT
#
# See below for documentation on the format of this file.
#
@@ -1565,6 +1565,7 @@
t/compilers/imcc/imcpasm/pcc.t [test]
t/compilers/imcc/reg/alloc.t [test]
t/compilers/imcc/reg/spill.t [test]
+t/compilers/imcc/reg/spill_old.t [test]
t/compilers/imcc/syn/clash.t [test]
t/compilers/imcc/syn/const.t [test]
t/compilers/imcc/syn/errors.t [test]
Modified: branches/rm_cflags/compilers/ncigen/t/NCIGENAST/struct_00.t
==============================================================================
--- branches/rm_cflags/compilers/ncigen/t/NCIGENAST/struct_00.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/compilers/ncigen/t/NCIGENAST/struct_00.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,4 +1,9 @@
-#!/usr/bin/perl
+#!perl
+# Copyright (C) 2008-2010, Parrot Foundation.
+# $Id$
+
+use strict;
+use warnings;
use lib ('./lib', '../../lib');
use Parrot::Test::NCIGENAST;
@@ -16,3 +21,10 @@
CODE
contains("<complex> => PMC 'NCIGENAST;Struct'");
+
+# Local Variables:
+# mode: cperl
+# cperl-indent-level: 4
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:
Modified: branches/rm_cflags/compilers/ncigen/t/NCIGENAST/typedef_00.t
==============================================================================
--- branches/rm_cflags/compilers/ncigen/t/NCIGENAST/typedef_00.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/compilers/ncigen/t/NCIGENAST/typedef_00.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,4 +1,9 @@
-#!/usr/bin/perl
+#!perl
+# Copyright (C) 2008-2010, Parrot Foundation.
+# $Id$
+
+use strict;
+use warnings;
use lib ('./lib', '../../lib');
use Parrot::Test::NCIGENAST;
@@ -24,3 +29,10 @@
parse('int a(), b(), c()');
parse_failure;
+
+# Local Variables:
+# mode: cperl
+# cperl-indent-level: 4
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:
Modified: branches/rm_cflags/compilers/ncigen/t/parse_00.t
==============================================================================
--- branches/rm_cflags/compilers/ncigen/t/parse_00.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/compilers/ncigen/t/parse_00.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,4 +1,9 @@
-#!/usr/bin/perl
+#!perl
+# Copyright (C) 2008-2010, Parrot Foundation.
+# $Id$
+
+use strict;
+use warnings;
use lib ('./lib', '../../lib');
use Parrot::Test::NCIGENAST;
@@ -120,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
@@ -173,3 +178,10 @@
parse_success(<<'CODE', 'void_star.c');
__extension__ typedef void * __timer_t;
CODE
+
+# Local Variables:
+# mode: cperl
+# cperl-indent-level: 4
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:
Modified: branches/rm_cflags/compilers/ncigen/t/parse_01.t
==============================================================================
--- branches/rm_cflags/compilers/ncigen/t/parse_01.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/compilers/ncigen/t/parse_01.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,4 +1,9 @@
-#!/usr/bin/perl
+#!perl
+# Copyright (C) 2008-2010, Parrot Foundation.
+# $Id$
+
+use strict;
+use warnings;
use lib ('./lib', '../../lib');
use Parrot::Test::NCIGENAST;
@@ -26,3 +31,10 @@
int sqlite3_open( const char *filename, sqlite3 **ppDb);
CODE
+
+# Local Variables:
+# mode: cperl
+# cperl-indent-level: 4
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:
Modified: branches/rm_cflags/compilers/ncigen/t/parse_02.t
==============================================================================
--- branches/rm_cflags/compilers/ncigen/t/parse_02.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/compilers/ncigen/t/parse_02.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,4 +1,9 @@
-#!/usr/bin/perl
+#!perl
+# Copyright (C) 2008-2010, Parrot Foundation.
+# $Id$
+
+use strict;
+use warnings;
use lib ('./lib', '../../lib');
use Parrot::Test::NCIGENAST;
@@ -70,3 +75,10 @@
parse_success(<<'CODE', 'Xlib.h 2');
extern int (*XSetAfterFunction( Display* , int (*) ( Display*)))( Display*);
CODE
+
+# Local Variables:
+# mode: cperl
+# cperl-indent-level: 4
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:
Modified: branches/rm_cflags/compilers/pirc/t/basic.t
==============================================================================
--- branches/rm_cflags/compilers/pirc/t/basic.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/compilers/pirc/t/basic.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -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/rm_cflags/compilers/pirc/t/heredoc.t
==============================================================================
--- branches/rm_cflags/compilers/pirc/t/heredoc.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/compilers/pirc/t/heredoc.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -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/rm_cflags/compilers/pirc/t/macro.t
==============================================================================
--- branches/rm_cflags/compilers/pirc/t/macro.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/compilers/pirc/t/macro.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -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/rm_cflags/compilers/pirc/t/stmts.t
==============================================================================
--- branches/rm_cflags/compilers/pirc/t/stmts.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/compilers/pirc/t/stmts.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -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/rm_cflags/compilers/pirc/t/subflags.t
==============================================================================
--- branches/rm_cflags/compilers/pirc/t/subflags.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/compilers/pirc/t/subflags.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -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/rm_cflags/config/gen/makefiles/root.in
==============================================================================
--- branches/rm_cflags/config/gen/makefiles/root.in Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/config/gen/makefiles/root.in Wed Feb 24 08:11:58 2010 (r44452)
@@ -285,7 +285,6 @@
$(LIBRARY_DIR)/Getopt/Obj.pbc \
$(LIBRARY_DIR)/Iter.pbc \
$(LIBRARY_DIR)/JSON.pbc \
- $(LIBRARY_DIR)/data_json.pbc \
$(LIBRARY_DIR)/Math/Rand.pbc \
$(LIBRARY_DIR)/MIME/Base64.pbc \
$(LIBRARY_DIR)/NCI/Utils.pbc \
@@ -528,7 +527,7 @@
PARROT_CONFIG = . at slash@parrot_config$(EXE)
PIRC = . at slash@pirc$(EXE)
NQP_RX = . at slash@parrot-nqp$(EXE)
-NCI_THUNK_GEN = ./parrot_nci_thunk_gen$(EXE)
+NCI_THUNK_GEN = ./parrot_nci_thunk_gen$(EXE)
# Installable executables
INSTALLABLEPARROT = . at slash@installable_parrot$(EXE)
@@ -2444,7 +2443,8 @@
$(ALL_PARROT_LIBS) @opengl_lib@
src/extra_nci_thunks.c : src/nci/extra_thunks.nci $(NCI_THUNK_GEN)
- $(NCI_THUNK_GEN) --dynext --output=src/extra_nci_thunks.c <src/nci/extra_thunks.nci
+ $(NCI_THUNK_GEN) --dynext --no-warn-dups \
+ --output=src/extra_nci_thunks.c <src/nci/extra_thunks.nci
src/extra_nci_thunks$(O) : $(GENERAL_H_FILES)
Modified: branches/rm_cflags/config/init/hints/openbsd.pm
==============================================================================
--- branches/rm_cflags/config/init/hints/openbsd.pm Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/config/init/hints/openbsd.pm Wed Feb 24 08:11:58 2010 (r44452)
@@ -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/rm_cflags/docs/embed.pod
==============================================================================
--- branches/rm_cflags/docs/embed.pod Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/docs/embed.pod Wed Feb 24 08:11:58 2010 (r44452)
@@ -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/rm_cflags/examples/languages/abc/t/01-tests.t
==============================================================================
--- branches/rm_cflags/examples/languages/abc/t/01-tests.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/examples/languages/abc/t/01-tests.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -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/rm_cflags/ext/Parrot-Embed/lib/Parrot/Embed.xs
==============================================================================
--- branches/rm_cflags/ext/Parrot-Embed/lib/Parrot/Embed.xs Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/ext/Parrot-Embed/lib/Parrot/Embed.xs Wed Feb 24 08:11:58 2010 (r44452)
@@ -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/rm_cflags/ext/Parrot-Embed/t/pipp.t
==============================================================================
--- branches/rm_cflags/ext/Parrot-Embed/t/pipp.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/ext/Parrot-Embed/t/pipp.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -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/rm_cflags/include/parrot/call.h
==============================================================================
--- branches/rm_cflags/include/parrot/call.h Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/include/parrot/call.h Wed Feb 24 08:11:58 2010 (r44452)
@@ -139,9 +139,6 @@
void destroy_runloop_jump_points(PARROT_INTERP)
__attribute__nonnull__(1);
-void really_destroy_runloop_jump_points(
- ARGIN_NULLOK(Parrot_runloop *jump_point));
-
void runops(PARROT_INTERP, size_t offs)
__attribute__nonnull__(1);
@@ -151,8 +148,6 @@
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_destroy_runloop_jump_points __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
-#define ASSERT_ARGS_really_destroy_runloop_jump_points \
- __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_runops __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
Modified: branches/rm_cflags/include/parrot/hash.h
==============================================================================
--- branches/rm_cflags/include/parrot/hash.h Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/include/parrot/hash.h Wed Feb 24 08:11:58 2010 (r44452)
@@ -113,7 +113,8 @@
FUNC_MODIFIES(*hash);
PARROT_EXPORT
-void parrot_hash_destroy(SHIM_INTERP, ARGMOD(Hash *hash))
+void parrot_hash_destroy(PARROT_INTERP, ARGMOD(Hash *hash))
+ __attribute__nonnull__(1)
__attribute__nonnull__(2)
FUNC_MODIFIES(*hash);
@@ -400,7 +401,8 @@
, PARROT_ASSERT_ARG(hash) \
, PARROT_ASSERT_ARG(key))
#define ASSERT_ARGS_parrot_hash_destroy __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(hash))
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(hash))
#define ASSERT_ARGS_parrot_hash_exists __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(hash) \
Modified: branches/rm_cflags/include/parrot/io.h
==============================================================================
--- branches/rm_cflags/include/parrot/io.h Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/include/parrot/io.h Wed Feb 24 08:11:58 2010 (r44452)
@@ -665,7 +665,8 @@
__attribute__nonnull__(2);
PARROT_CAN_RETURN_NULL
-void Parrot_io_clear_buffer(SHIM_INTERP, ARGIN(PMC *filehandle))
+void Parrot_io_clear_buffer(PARROT_INTERP, ARGIN(PMC *filehandle))
+ __attribute__nonnull__(1)
__attribute__nonnull__(2);
PARROT_CAN_RETURN_NULL
@@ -751,7 +752,8 @@
#define ASSERT_ARGS_Parrot_io_set_os_handle __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(filehandle))
#define ASSERT_ARGS_Parrot_io_clear_buffer __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(filehandle))
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(filehandle))
#define ASSERT_ARGS_Parrot_io_get_buffer_flags __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(filehandle))
#define ASSERT_ARGS_Parrot_io_get_buffer_size __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
Modified: branches/rm_cflags/include/parrot/oplib.h
==============================================================================
--- branches/rm_cflags/include/parrot/oplib.h Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/include/parrot/oplib.h Wed Feb 24 08:11:58 2010 (r44452)
@@ -41,7 +41,7 @@
} op_lib_flags_enum;
/* when init = true initialize, else de_initialize */
-typedef op_lib_t *(*oplib_init_f)(long init);
+typedef op_lib_t *(*oplib_init_f)(PARROT_INTERP, long init);
/* core.ops special opcode numbers */
typedef enum {
Modified: branches/rm_cflags/include/parrot/pobj.h
==============================================================================
--- branches/rm_cflags/include/parrot/pobj.h Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/include/parrot/pobj.h Wed Feb 24 08:11:58 2010 (r44452)
@@ -331,15 +331,6 @@
| ~PObj_custom_mark_FLAG \
| ~PObj_live_FLAG)
-/*******************************************************
- * DEPRECATED -- use PObj_custom_destroy_FOO() instead *
- *******************************************************/
-#define PObj_active_destroy_FLAG PObj_custom_destroy_FLAG
-#define PObj_active_destroy_SET(o) PObj_flag_SET(custom_destroy, o)
-#define PObj_active_destroy_TEST(o) PObj_flag_TEST(custom_destroy, o)
-#define PObj_active_destroy_CLEAR(o) PObj_flag_CLEAR(custom_destroy, o)
-
-
#endif /* PARROT_POBJ_H_GUARD */
/*
Modified: branches/rm_cflags/lib/Parrot/Distribution.pm
==============================================================================
--- branches/rm_cflags/lib/Parrot/Distribution.pm Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/lib/Parrot/Distribution.pm Wed Feb 24 08:11:58 2010 (r44452)
@@ -537,7 +537,7 @@
# test files (.t) might need testing.
# ignore everything else.
- return 0 unless $filename !~ /\.t$/;
+ return 0 if $filename !~ /\.t$/;
# Now let's check to see if there's a perl shebang.
@@ -608,7 +608,7 @@
# test files (.t) files might need testing.
# ignore everything else.
- return 0 unless $filename !~ /\.t$/;
+ return 0 if $filename !~ /\.t$/;
# Now let's check to see if there's a plain parrot shebang.
open my $file_handle, '<', $filename
Modified: branches/rm_cflags/lib/Parrot/Ops2c/Utils.pm
==============================================================================
--- branches/rm_cflags/lib/Parrot/Ops2c/Utils.pm Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/lib/Parrot/Ops2c/Utils.pm Wed Feb 24 08:11:58 2010 (r44452)
@@ -477,7 +477,7 @@
#include "parrot/parrot.h"
#include "parrot/oplib.h"
-$self->{sym_export} op_lib_t *$self->{init_func}(long init);
+$self->{sym_export} op_lib_t *$self->{init_func}(PARROT_INTERP, long init);
END_C
return 1;
@@ -899,7 +899,7 @@
/* XXX on changing interpreters, this should be called,
through a hook */
-static void hop_deinit(void);
+static void hop_deinit(PARROT_INTERP);
/*
* find a short or full opcode
@@ -956,7 +956,7 @@
if (get_op(interp, info[i].name, 0) == -1)
store_op(interp, info + i, 0);
}
-static void hop_deinit(void)
+static void hop_deinit(PARROT_INTERP)
{
if (hop) {
size_t i;
@@ -964,7 +964,7 @@
HOP *p = hop[i];
while (p) {
HOP * const next = p->next;
- mem_sys_free(p);
+ mem_gc_free(interp, p);
p = next;
}
}
@@ -977,7 +977,7 @@
}
else {
print $fh <<END_C;
-static void hop_deinit(void) {}
+static void hop_deinit(SHIM_INTERP) {}
END_C
}
return 1;
@@ -1026,11 +1026,11 @@
print $fh <<END_C;
op_lib_t *
-$self->{init_func}(long init) {
+$self->{init_func}(PARROT_INTERP, long init) {
/* initialize and return op_lib ptr */
if (init == 1) {
$init1_code
- return &$self->{bs}op_lib;
+ return &$self->{bs}op_lib;
}
/* set op_lib to the passed ptr (in init) */
else if (init) {
@@ -1038,7 +1038,7 @@
}
/* deinit - free resources */
else {
- hop_deinit();
+ hop_deinit(interp);
}
return NULL;
}
Modified: branches/rm_cflags/lib/Parrot/Pmc2c/PMC.pm
==============================================================================
--- branches/rm_cflags/lib/Parrot/Pmc2c/PMC.pm Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/lib/Parrot/Pmc2c/PMC.pm Wed Feb 24 08:11:58 2010 (r44452)
@@ -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/rm_cflags/runtime/parrot/library/Configure/genfile.pir
==============================================================================
--- branches/rm_cflags/runtime/parrot/library/Configure/genfile.pir Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/runtime/parrot/library/Configure/genfile.pir Wed Feb 24 08:11:58 2010 (r44452)
@@ -46,17 +46,28 @@
.param pmc config
.param int verbose :named('verbose') :optional
.param int has_verbose :opt_flag
+ .local int flag_replace_slash
+ flag_replace_slash = 1
+ $I0 = index outfile, '.'
+ if $I0 < 0 goto L1
+ $S0 = substr outfile, $I0
+ $I0 = index '.c .h .pir .pmc .t', $S0
+ if $I0 < 0 goto L1
+ flag_replace_slash = 0
+ L1:
$S0 = slurp(tmpl)
$S0 = conditioned_line($S0, config)
$S0 = interpolate_var($S0, config)
$S1 = sysinfo .SYSINFO_PARROT_OS
+ unless flag_replace_slash goto L2
$S0 = replace_slash($S0, $S1)
+ L2:
spew(outfile, $S0)
- unless has_verbose goto L1
- unless verbose goto L1
+ unless has_verbose goto L3
+ unless verbose goto L3
print "generate "
say outfile
- L1:
+ L3:
.end
.sub 'slurp' :anon
Modified: branches/rm_cflags/runtime/parrot/library/distutils.pir
==============================================================================
--- branches/rm_cflags/runtime/parrot/library/distutils.pir Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/runtime/parrot/library/distutils.pir Wed Feb 24 08:11:58 2010 (r44452)
@@ -328,7 +328,7 @@
=cut
-.sub 'setup'
+.sub 'setup' :multi()
.param pmc args :slurpy
.param pmc kv :slurpy :named
.local pmc steps
@@ -374,6 +374,12 @@
rethrow ex
.end
+.sub 'setup' :multi(ResizableStringArray,Hash)
+ .param pmc array
+ .param pmc hash
+ .tailcall setup(array :flat, hash :flat :named)
+.end
+
=item run_step
Call a step by its name.
@@ -4519,10 +4525,15 @@
.const string srcname = 'tmp.c'
spew(srcname, source)
.local string exename
- $S0 = get_exe()
- exename = 'tmp' . $S0
+ exename = 'tmp'
.local pmc config
config = get_config()
+ $S0 = config['osname']
+ if $S0 == 'MSWin32' goto L0
+ exename = './' . exename
+ L0:
+ $S0 = get_exe()
+ exename .= $S0
.local string cmd
cmd = config['cc']
cmd .= " "
@@ -4533,21 +4544,20 @@
cmd .= cflags
L1:
cmd .= " "
+ cmd .= srcname
+ cmd .= " "
$S0 = get_ldflags()
cmd .= $S0
unless has_ldflags goto L2
cmd .= " "
cmd .= ldflags
L2:
- cmd .= " "
- cmd .= srcname
cmd .= " -o "
cmd .= exename
system(cmd, verbose :named('verbose'), 1 :named('ignore_error'))
unlink(srcname, verbose :named('verbose'))
- cmd = "./" . exename
- $P0 = open cmd, 'rp'
+ $P0 = open exename, 'rp'
$S0 = $P0.'readall'()
$P0.'close'()
Modified: branches/rm_cflags/src/call/ops.c
==============================================================================
--- branches/rm_cflags/src/call/ops.c Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/src/call/ops.c Wed Feb 24 08:11:58 2010 (r44452)
@@ -31,6 +31,19 @@
static int
runloop_id_counter = 0; /* for synthesizing runloop ids. */
+/* HEADERIZER BEGIN: static */
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+
+static void really_destroy_runloop_jump_points(PARROT_INTERP,
+ ARGFREE(Parrot_runloop *jump_point))
+ __attribute__nonnull__(1);
+
+#define ASSERT_ARGS_really_destroy_runloop_jump_points \
+ __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
+/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+/* HEADERIZER END: static */
+
/*
=item C<void runops(PARROT_INTERP, size_t offs)>
@@ -184,13 +197,14 @@
destroy_runloop_jump_points(PARROT_INTERP)
{
ASSERT_ARGS(destroy_runloop_jump_points)
- really_destroy_runloop_jump_points(interp->current_runloop);
- really_destroy_runloop_jump_points(interp->runloop_jmp_free_list);
+ really_destroy_runloop_jump_points(interp, interp->current_runloop);
+ really_destroy_runloop_jump_points(interp, interp->runloop_jmp_free_list);
}
/*
-=item C<void really_destroy_runloop_jump_points(Parrot_runloop *jump_point)>
+=item C<static void really_destroy_runloop_jump_points(PARROT_INTERP,
+Parrot_runloop *jump_point)>
Takes a pointer to a runloop jump point (which had better be the last one in
the list). Walks back through the list, freeing the memory of each one, until
@@ -200,13 +214,14 @@
*/
-void
-really_destroy_runloop_jump_points(ARGIN_NULLOK(Parrot_runloop *jump_point))
+static void
+really_destroy_runloop_jump_points(PARROT_INTERP,
+ ARGFREE(Parrot_runloop *jump_point))
{
ASSERT_ARGS(really_destroy_runloop_jump_points)
while (jump_point) {
Parrot_runloop * const prev = jump_point->prev;
- mem_sys_free(jump_point);
+ mem_gc_free(interp, jump_point);
jump_point = prev;
}
}
Modified: branches/rm_cflags/src/gc/gc_ms.c
==============================================================================
--- branches/rm_cflags/src/gc/gc_ms.c Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/src/gc/gc_ms.c Wed Feb 24 08:11:58 2010 (r44452)
@@ -17,6 +17,15 @@
#include "parrot/parrot.h"
#include "gc_private.h"
+PARROT_DOES_NOT_RETURN
+static void failed_allocation(unsigned int line, unsigned long size) /* HEADERIZER SKIP */
+{
+ fprintf(stderr, "Failed allocation of %lu bytes\n", size);
+ do_panic(NULL, "Out of mem", __FILE__, line);
+}
+
+#define PANIC_OUT_OF_MEM(size) failed_allocation(__LINE__, (size))
+
/* HEADERIZER HFILE: src/gc/gc_private.h */
/* HEADERIZER BEGIN: static */
@@ -166,8 +175,8 @@
FUNC_MODIFIES(*buffer);
static void * gc_ms_reallocate_memory_chunk(PARROT_INTERP,
- ARGFREE(void *data),
- size_t newsize)
+ ARGFREE(void *from),
+ size_t size)
__attribute__nonnull__(1);
static void * gc_ms_reallocate_memory_chunk_zeroed(PARROT_INTERP,
@@ -1094,8 +1103,8 @@
=item C<static void * gc_ms_allocate_memory_chunk(PARROT_INTERP, size_t size)>
-=item C<static void * gc_ms_reallocate_memory_chunk(PARROT_INTERP, void *data,
-size_t newsize)>
+=item C<static void * gc_ms_reallocate_memory_chunk(PARROT_INTERP, void *from,
+size_t size)>
=item C<static void * gc_ms_allocate_memory_chunk_zeroed(PARROT_INTERP, size_t
size)>
@@ -1113,22 +1122,46 @@
gc_ms_allocate_memory_chunk(PARROT_INTERP, size_t size)
{
ASSERT_ARGS(gc_ms_allocate_memory_chunk)
- return mem_sys_allocate(size);
+ void * const ptr = malloc(size);
+#ifdef DETAIL_MEMORY_DEBUG
+ fprintf(stderr, "Allocated %i at %p\n", size, ptr);
+#endif
+ if (!ptr)
+ PANIC_OUT_OF_MEM(size);
+ return ptr;
}
static void *
-gc_ms_reallocate_memory_chunk(PARROT_INTERP, ARGFREE(void *data), size_t newsize)
+gc_ms_reallocate_memory_chunk(PARROT_INTERP, ARGFREE(void *from), size_t size)
{
ASSERT_ARGS(gc_ms_reallocate_memory_chunk)
- return mem_sys_realloc(data, newsize);
+ void *ptr;
+#ifdef DETAIL_MEMORY_DEBUG
+ fprintf(stderr, "Freed %p (realloc -- %i bytes)\n", from, size);
+#endif
+ if (from)
+ ptr = realloc(from, size);
+ else
+ ptr = calloc(1, size);
+#ifdef DETAIL_MEMORY_DEBUG
+ fprintf(stderr, "Allocated %i at %p\n", size, ptr);
+#endif
+ if (!ptr)
+ PANIC_OUT_OF_MEM(size);
+ return ptr;
}
static void *
gc_ms_allocate_memory_chunk_zeroed(PARROT_INTERP, size_t size)
{
ASSERT_ARGS(gc_ms_allocate_memory_chunk_zeroed)
- /* FIXME UB of realloc to clear allocated memory */
- return mem_sys_realloc(NULL, size);
+ void * const ptr = calloc(1, (size_t)size);
+#ifdef DETAIL_MEMORY_DEBUG
+ fprintf(stderr, "Allocated %i at %p\n", size, ptr);
+#endif
+ if (!ptr)
+ PANIC_OUT_OF_MEM(size);
+ return ptr;
}
static void *
@@ -1146,7 +1179,11 @@
gc_ms_free_memory_chunk(PARROT_INTERP, ARGFREE(void *data))
{
ASSERT_ARGS(gc_ms_free_memory_chunk)
- mem_sys_free(data);
+#ifdef DETAIL_MEMORY_DEBUG
+ fprintf(stderr, "Freed %p\n", data);
+#endif
+ if (data)
+ free(data);
}
Modified: branches/rm_cflags/src/hash.c
==============================================================================
--- branches/rm_cflags/src/hash.c Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/src/hash.c Wed Feb 24 08:11:58 2010 (r44452)
@@ -750,11 +750,13 @@
/* resize mem */
if (old_offset != old_mem) {
/* This buffer has been reallocated at least once before. */
- new_mem = (HashBucket *)mem_sys_realloc(old_mem, HASH_ALLOC_SIZE(new_size));
+ new_mem = (HashBucket *)Parrot_gc_reallocate_memory_chunk_with_interior_pointers(
+ interp, old_mem, HASH_ALLOC_SIZE(new_size), HASH_ALLOC_SIZE(old_size));
}
else {
/* Allocate a new buffer. */
- new_mem = (HashBucket *)mem_sys_allocate(HASH_ALLOC_SIZE(new_size));
+ new_mem = (HashBucket *)Parrot_gc_allocate_memory_chunk_with_interior_pointers(
+ interp, HASH_ALLOC_SIZE(new_size));
memcpy(new_mem, old_mem, HASH_ALLOC_SIZE(old_size));
}
@@ -951,7 +953,8 @@
{
ASSERT_ARGS(parrot_create_hash)
HashBucket *bp;
- void *alloc = mem_sys_allocate(sizeof (Hash) + HASH_ALLOC_SIZE(INITIAL_BUCKETS));
+ void *alloc = Parrot_gc_allocate_memory_chunk_with_interior_pointers(
+ interp, sizeof (Hash) + HASH_ALLOC_SIZE(INITIAL_BUCKETS));
Hash * const hash = (Hash*)alloc;
size_t i;
@@ -1010,13 +1013,13 @@
PARROT_EXPORT
void
-parrot_hash_destroy(SHIM_INTERP, ARGMOD(Hash *hash))
+parrot_hash_destroy(PARROT_INTERP, ARGMOD(Hash *hash))
{
ASSERT_ARGS(parrot_hash_destroy)
HashBucket *bp = (HashBucket*)((char*)hash + sizeof (Hash));
if (bp != hash->bs)
- mem_sys_free(hash->bs);
- mem_sys_free(hash);
+ mem_gc_free(interp, hash->bs);
+ mem_gc_free(interp, hash);
}
@@ -1040,8 +1043,8 @@
for (i = 0; i <= hash->mask; i++) {
HashBucket *bucket = hash->bi[i];
while (bucket) {
- mem_sys_free(bucket->key);
- mem_sys_free(bucket->value);
+ mem_gc_free(interp, bucket->key);
+ mem_gc_free(interp, bucket->value);
bucket = bucket->next;
}
}
@@ -1075,7 +1078,7 @@
for (i = 0; i <= hash->mask; i++) {
HashBucket *bucket = hash->bi[i];
while (bucket) {
- mem_sys_free(bucket->key);
+ mem_gc_free(interp, bucket->key);
func(bucket->value);
bucket = bucket->next;
}
Modified: branches/rm_cflags/src/interp/inter_create.c
==============================================================================
--- branches/rm_cflags/src/interp/inter_create.c Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/src/interp/inter_create.c Wed Feb 24 08:11:58 2010 (r44452)
@@ -254,7 +254,7 @@
Parrot_runcore_init(interp);
/* Load the core op func and info tables */
- interp->op_lib = PARROT_CORE_OPLIB_INIT(1);
+ interp->op_lib = PARROT_CORE_OPLIB_INIT(interp, 1);
interp->op_count = interp->op_lib->op_count;
interp->op_func_table = interp->op_lib->op_func_table;
interp->op_info_table = interp->op_lib->op_info_table;
@@ -438,18 +438,18 @@
destroy_object_cache(interp);
if (interp->evc_func_table) {
- mem_sys_free(interp->evc_func_table);
+ mem_gc_free(interp, interp->evc_func_table);
interp->evc_func_table = NULL;
}
/* strings, charsets, encodings - only once */
Parrot_str_finish(interp);
- PARROT_CORE_OPLIB_INIT(0);
+ PARROT_CORE_OPLIB_INIT(interp, 0);
if (!interp->parent_interpreter) {
if (interp->thread_data)
- mem_sys_free(interp->thread_data);
+ mem_internal_free(interp->thread_data);
/* free vtables */
parrot_free_vtables(interp);
@@ -458,10 +458,10 @@
Parrot_gc_finalize(interp);
MUTEX_DESTROY(interpreter_array_mutex);
- mem_sys_free(interp);
+ mem_internal_free(interp);
/* finally free other globals */
- mem_sys_free(interpreter_array);
+ mem_internal_free(interpreter_array);
interpreter_array = NULL;
}
@@ -471,15 +471,16 @@
|| (interp->thread_data
&& (interp->thread_data->state & THREAD_STATE_JOINED))) {
if (interp->thread_data) {
- mem_sys_free(interp->thread_data);
+ mem_internal_free(interp->thread_data);
interp->thread_data = NULL;
}
+ parrot_free_vtables(interp);
+
/* Finalyze GC */
Parrot_gc_finalize(interp);
- parrot_free_vtables(interp);
- mem_sys_free(interp);
+ mem_internal_free(interp);
}
}
}
Modified: branches/rm_cflags/src/io/filehandle.c
==============================================================================
--- branches/rm_cflags/src/io/filehandle.c Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/src/io/filehandle.c Wed Feb 24 08:11:58 2010 (r44452)
@@ -552,12 +552,12 @@
PARROT_CAN_RETURN_NULL
void
-Parrot_io_clear_buffer(SHIM_INTERP, ARGIN(PMC *filehandle))
+Parrot_io_clear_buffer(PARROT_INTERP, ARGIN(PMC *filehandle))
{
ASSERT_ARGS(Parrot_io_clear_buffer)
Parrot_FileHandle_attributes * const io = PARROT_FILEHANDLE(filehandle);
if (io->buffer_start && (io->flags & PIO_BF_MALLOC)) {
- mem_sys_free(io->buffer_start);
+ mem_gc_free(interp, io->buffer_start);
io->buffer_start = NULL;
}
}
Modified: branches/rm_cflags/src/nci/core_thunks.c
==============================================================================
--- branches/rm_cflags/src/nci/core_thunks.c Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/src/nci/core_thunks.c Wed Feb 24 08:11:58 2010 (r44452)
@@ -1040,10 +1040,12 @@
}
-
void
Parrot_nci_load_core_thunks(PARROT_INTERP)
-{
+;
+ void
+Parrot_nci_load_core_thunks(PARROT_INTERP)
+ {
PMC *iglobals;
PMC *nci_funcs;
PMC *temp_pmc;
@@ -1231,6 +1233,7 @@
VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_P_Ji);
VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "PJi"), temp_pmc);
+
}
Modified: branches/rm_cflags/src/nci/extra_thunks.c
==============================================================================
--- branches/rm_cflags/src/nci/extra_thunks.c Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/src/nci/extra_thunks.c Wed Feb 24 08:11:58 2010 (r44452)
@@ -6192,10 +6192,12 @@
}
-
void
Parrot_nci_load_extra_thunks(PARROT_INTERP)
-{
+;
+ void
+Parrot_nci_load_extra_thunks(PARROT_INTERP)
+ {
PMC *iglobals;
PMC *nci_funcs;
PMC *temp_pmc;
@@ -7223,6 +7225,7 @@
VTABLE_set_pointer(interp, temp_pmc, (void *)pcf_i_pitii);
VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "ipitii"), temp_pmc);
+
}
Modified: branches/rm_cflags/src/ops/set.ops
==============================================================================
--- branches/rm_cflags/src/ops/set.ops Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/src/ops/set.ops Wed Feb 24 08:11:58 2010 (r44452)
@@ -510,7 +510,7 @@
memmove($1, clone, sizeof (PMC));
/* don't let the clone's destruction destroy the destination's data */
- PObj_active_destroy_CLEAR(clone);
+ PObj_custom_destroy_CLEAR(clone);
PMC_data(clone) = NULL;
PMC_sync(clone) = NULL;
PMC_metadata(clone) = NULL;
Modified: branches/rm_cflags/src/pmc/filehandle.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/filehandle.pmc Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/src/pmc/filehandle.pmc Wed Feb 24 08:11:58 2010 (r44452)
@@ -153,7 +153,7 @@
}
if (data_struct->buffer_start)
- mem_sys_free(data_struct->buffer_start);
+ mem_gc_free(INTERP, data_struct->buffer_start);
}
}
@@ -374,7 +374,7 @@
add_history(r);
string_result = Parrot_str_new(INTERP, r, 0);
- mem_sys_free(r);
+ mem_internal_free(r);
}
#else
if (got_prompt)
Modified: branches/rm_cflags/src/pmc/fixedstringarray.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/fixedstringarray.pmc Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/src/pmc/fixedstringarray.pmc Wed Feb 24 08:11:58 2010 (r44452)
@@ -183,6 +183,20 @@
return SELF.elements();
}
+/*
+
+=item C<FLOATVAL get_number()>
+
+Returns the number of elements in the array.
+
+=cut
+
+*/
+
+ VTABLE FLOATVAL get_number() {
+ const INTVAL e = SELF.elements();
+ return (FLOATVAL)e;
+ }
/*
Modified: branches/rm_cflags/src/pmc/nci.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/nci.pmc Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/src/pmc/nci.pmc Wed Feb 24 08:11:58 2010 (r44452)
@@ -78,7 +78,7 @@
break;
default:
if (sig_length > 7)
- mem_sys_free(param_sig);
+ mem_gc_free(interp, param_sig);
Parrot_ex_throw_from_c_args(interp, NULL,
EXCEPTION_JIT_ERROR,
"Unknown param Signature %c\n", (char)c);
@@ -97,7 +97,7 @@
nci_info->pcc_params_signature = CONST_STRING(interp, "");
if (sig_length > 7)
- mem_sys_free(param_sig);
+ mem_gc_free(interp, param_sig);
}
/* actually build the NCI thunk */
Modified: branches/rm_cflags/src/pmc/oplib.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/oplib.pmc Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/src/pmc/oplib.pmc Wed Feb 24 08:11:58 2010 (r44452)
@@ -8,7 +8,7 @@
=head1 DESCRIPTION
-Implements oplib VTABLEs.
+Implements oplib VTABLEs.
=cut
@@ -82,13 +82,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/rm_cflags/src/pmc/sockaddr.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/sockaddr.pmc Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/src/pmc/sockaddr.pmc Wed Feb 24 08:11:58 2010 (r44452)
@@ -65,7 +65,7 @@
Parrot_Sockaddr_attributes * const data = PARROT_SOCKADDR(SELF);
if (data) {
- mem_sys_free(data->pointer);
+ mem_gc_free(INTERP, data->pointer);
data->pointer = NULL;
}
}
Modified: branches/rm_cflags/src/pmc/socket.pmc
==============================================================================
--- branches/rm_cflags/src/pmc/socket.pmc Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/src/pmc/socket.pmc Wed Feb 24 08:11:58 2010 (r44452)
@@ -20,7 +20,7 @@
#include "../src/io/io_private.h"
-pmclass Socket extends Handle auto_attrs {
+pmclass Socket extends Handle provides socket auto_attrs {
ATTR PMC *local; /* Local addr */
ATTR PMC *remote; /* Remote addr */
@@ -67,21 +67,6 @@
/*
-=item C<INTVAL does(STRING * role)>
-
-=cut
-
-*/
-
- VTABLE INTVAL does(STRING * role) {
- Parrot_Socket_attributes * const attrs = PARROT_SOCKET(SELF);
- if (Parrot_str_equal(interp, role, CONST_STRING(interp, "socket")))
- return 1;
- return SUPER(role);
- }
-
-/*
-
=item C<void mark()>
Mark active socket handle data as live.
Modified: branches/rm_cflags/src/runcore/cores.c
==============================================================================
--- branches/rm_cflags/src/runcore/cores.c Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/src/runcore/cores.c Wed Feb 24 08:11:58 2010 (r44452)
@@ -1052,7 +1052,7 @@
int (*get_op)(PARROT_INTERP, const char * name, int full);
get_op = interp->op_lib->op_code;
- interp->op_lib = init_func(1);
+ interp->op_lib = init_func(interp, 1);
/* preserve the get_op function */
interp->op_lib->op_code = get_op;
Modified: branches/rm_cflags/src/runcore/main.c
==============================================================================
--- branches/rm_cflags/src/runcore/main.c Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/src/runcore/main.c Wed Feb 24 08:11:58 2010 (r44452)
@@ -55,7 +55,9 @@
/* HEADERIZER BEGIN: static */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-static void dynop_register_switch(size_t n_old, size_t n_new);
+static void dynop_register_switch(PARROT_INTERP, size_t n_old, size_t n_new)
+ __attribute__nonnull__(1);
+
static void dynop_register_xx(PARROT_INTERP,
size_t n_old,
size_t n_new,
@@ -91,7 +93,8 @@
static void turn_ev_check(PARROT_INTERP, int on)
__attribute__nonnull__(1);
-#define ASSERT_ARGS_dynop_register_switch __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+#define ASSERT_ARGS_dynop_register_switch __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_dynop_register_xx __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_get_dynamic_op_lib_init __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
@@ -481,7 +484,7 @@
stop_prederef(PARROT_INTERP)
{
ASSERT_ARGS(stop_prederef)
- interp->op_func_table = PARROT_CORE_OPLIB_INIT(1)->op_func_table;
+ interp->op_func_table = PARROT_CORE_OPLIB_INIT(interp, 1)->op_func_table;
if (interp->evc_func_table) {
mem_gc_free(interp, interp->evc_func_table);
@@ -580,7 +583,7 @@
ASSERT_ARGS(Parrot_setup_event_func_ptrs)
const size_t n = interp->op_count;
const oplib_init_f init_func = get_core_op_lib_init(interp, interp->run_core);
- op_lib_t * const lib = init_func(1);
+ op_lib_t * const lib = init_func(interp, 1);
/* remember op_func_table */
interp->save_func_table = lib->op_func_table;
@@ -640,13 +643,13 @@
return;
#ifdef HAVE_COMPUTED_GOTO
- cg_lib = PARROT_CORE_CGP_OPLIB_INIT(1);
+ cg_lib = PARROT_CORE_CGP_OPLIB_INIT(interp, 1);
if (cg_lib->op_func_table)
mem_gc_free(interp, cg_lib->op_func_table);
cg_lib->op_func_table = NULL;
- cg_lib = PARROT_CORE_CG_OPLIB_INIT(1);
+ cg_lib = PARROT_CORE_CG_OPLIB_INIT(interp, 1);
if (cg_lib->op_func_table)
mem_gc_free(interp, cg_lib->op_func_table);
cg_lib->op_func_table = NULL;
@@ -707,7 +710,7 @@
interp->n_libs + 1, interp->n_libs, op_lib_t *);
init_func = get_dynamic_op_lib_init(interp, lib_pmc);
- lib = init_func(1);
+ lib = init_func(interp, 1);
interp->all_op_libs[interp->n_libs++] = lib;
@@ -725,7 +728,7 @@
n_old = interp->op_count;
n_new = lib->op_count;
n_tot = n_old + n_new;
- core = PARROT_CORE_OPLIB_INIT(1);
+ core = PARROT_CORE_OPLIB_INIT(interp, 1);
PARROT_ASSERT(interp->op_count == core->op_count);
@@ -766,7 +769,7 @@
interp->save_func_table = new_func_table;
/* deinit core, so that it gets rehashed */
- (void) PARROT_CORE_OPLIB_INIT(0);
+ (void) PARROT_CORE_OPLIB_INIT(interp, 0);
/* set table */
core->op_func_table = interp->op_func_table = new_func_table;
@@ -780,7 +783,7 @@
dynop_register_xx(interp, n_old, n_new, PARROT_CORE_CG_OPLIB_INIT);
#endif
- dynop_register_switch(n_old, n_new);
+ dynop_register_switch(interp, n_old, n_new);
}
@@ -802,7 +805,7 @@
ASSERT_ARGS(dynop_register_xx)
const size_t n_tot = n_old + n_new;
op_func_t *ops_addr = NULL;
- op_lib_t *cg_lib = init_func(1);
+ op_lib_t *cg_lib = init_func(interp, 1);
#if 0
/* related to CG and CGP ops issue below */
@@ -892,13 +895,14 @@
/* tell the cg_core about the new jump table */
cg_lib->op_func_table = ops_addr;
cg_lib->op_count = n_tot;
- init_func((long) ops_addr);
+ init_func(interp, (long) ops_addr);
}
/*
-=item C<static void dynop_register_switch(size_t n_old, size_t n_new)>
+=item C<static void dynop_register_switch(PARROT_INTERP, size_t n_old, size_t
+n_new)>
Used only at the end of dynop_register. Sums the old and new op_counts
storing the result into the operations count field of the interpreter
@@ -909,10 +913,10 @@
*/
static void
-dynop_register_switch(size_t n_old, size_t n_new)
+dynop_register_switch(PARROT_INTERP, size_t n_old, size_t n_new)
{
ASSERT_ARGS(dynop_register_switch)
- op_lib_t * const lib = PARROT_CORE_SWITCH_OPLIB_INIT(1);
+ op_lib_t * const lib = PARROT_CORE_SWITCH_OPLIB_INIT(interp, 1);
lib->op_count = n_old + n_new;
}
@@ -933,7 +937,7 @@
ASSERT_ARGS(notify_func_table)
const oplib_init_f init_func = get_core_op_lib_init(interp, interp->run_core);
- init_func((long) table);
+ init_func(interp, (long) table);
if (PARROT_RUNCORE_FUNC_TABLE_TEST(interp->run_core)) {
PARROT_ASSERT(table);
Modified: branches/rm_cflags/src/runcore/profiling.c
==============================================================================
--- branches/rm_cflags/src/runcore/profiling.c Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/src/runcore/profiling.c Wed Feb 24 08:11:58 2010 (r44452)
@@ -613,7 +613,7 @@
if (runcore->output_fn != record_values_none)
fclose(runcore->profile_fd);
- mem_sys_free(runcore->time);
+ mem_gc_free(interp, runcore->time);
return NULL;
}
Modified: branches/rm_cflags/src/tsq.c
==============================================================================
--- branches/rm_cflags/src/tsq.c Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/src/tsq.c Wed Feb 24 08:11:58 2010 (r44452)
@@ -402,7 +402,7 @@
COND_DESTROY(queue->queue_condition);
MUTEX_DESTROY(queue->queue_mutex);
- mem_sys_free(queue);
+ mem_internal_free(queue);
}
/*
Modified: branches/rm_cflags/t/codingstd/c_arg_assert.t
==============================================================================
--- branches/rm_cflags/t/codingstd/c_arg_assert.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/codingstd/c_arg_assert.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! perl
-# Copyright (C) 2008-2009, Parrot Foundation.
+# Copyright (C) 2008-2010, Parrot Foundation.
# $Id$
use strict;
@@ -51,7 +51,7 @@
if ( my ($func) = $line =~ m/^#define ASSERT_ARGS_([_a-zA-Z0-9]+)\s/s ) {
push @defines, [$func, $path];
}
-
+
if ( my ($func) = $line =~ m/^\s+ASSERT_ARGS\(([_a-zA-Z0-9]+)\)$/ ) {
$usages{$func} = 1;
Modified: branches/rm_cflags/t/codingstd/c_cppcomments.t
==============================================================================
--- branches/rm_cflags/t/codingstd/c_cppcomments.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/codingstd/c_cppcomments.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! perl
-# Copyright (C) 2001-2009, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
use strict;
@@ -50,7 +50,7 @@
);
# TT # 414 (https://trac.parrot.org/parrot/ticket/414):
-# In the POD inside a C source code file, a hyperlink such as
+# In the POD inside a C source code file, a hyperlink such as
# https://trac.parrot.org will be inaccurately reported as a C++-style
# comment.
# Quick fix added
@@ -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/rm_cflags/t/codingstd/c_indent.t
==============================================================================
--- branches/rm_cflags/t/codingstd/c_indent.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/codingstd/c_indent.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -183,7 +183,7 @@
my ($indent) = $line =~ /^(\s+)/ or next;
$indent = length($indent);
- # Ignore the indentation of the current line if the last
+ # Ignore the indentation of the current line if the last
# character of the was anything but a ';'.
#
# The indentation of the previous line is not considered.
@@ -198,7 +198,8 @@
. " apparent non-2 space outdenting ($indent spaces)\n";
$c_failed{"$path\n"} = 1
}
- } else {
+ }
+ else {
if ( $indent % 4 &&
!$state{in_comment} &&
$state{prev_last_char} eq ';'
Modified: branches/rm_cflags/t/codingstd/c_macro_args.t
==============================================================================
--- branches/rm_cflags/t/codingstd/c_macro_args.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/codingstd/c_macro_args.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,6 +1,6 @@
#! perl
-# Copyright (C) 2008-2009, Parrot Foundation.
-# $Id $
+# Copyright (C) 2008-2010, Parrot Foundation.
+# $Id$
use strict;
use warnings;
Modified: branches/rm_cflags/t/codingstd/cuddled_else.t
==============================================================================
--- branches/rm_cflags/t/codingstd/cuddled_else.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/codingstd/cuddled_else.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -23,7 +23,8 @@
=head1 DESCRIPTION
-Checks that files do not use cuddled else a.k.a C<} else {>.
+Checks that files do not use cuddled else, that is an else on the same
+line as the closing brace of the if part.
=head1 SEE ALSO
Modified: branches/rm_cflags/t/codingstd/opcode_doc.t
==============================================================================
--- branches/rm_cflags/t/codingstd/opcode_doc.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/codingstd/opcode_doc.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! perl
-# Copyright (C) 2001-2005, The Perl Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
use strict;
Modified: branches/rm_cflags/t/codingstd/perlcritic.t
==============================================================================
--- branches/rm_cflags/t/codingstd/perlcritic.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/codingstd/perlcritic.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -80,7 +80,8 @@
map { $_->path }
grep { $_->read !~ m/use v6;/ }
$dist->get_perl_language_files();
-} else {
+}
+else {
@files = <@ARGV>;
}
Modified: branches/rm_cflags/t/codingstd/pod_description.t
==============================================================================
--- branches/rm_cflags/t/codingstd/pod_description.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/codingstd/pod_description.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! perl
-# Copyright (C) 2001-2009, The Perl Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
use strict;
Modified: branches/rm_cflags/t/codingstd/pod_syntax.t
==============================================================================
--- branches/rm_cflags/t/codingstd/pod_syntax.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/codingstd/pod_syntax.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! perl
-# Copyright (C) 2001-2009, The Perl Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
use strict;
Modified: branches/rm_cflags/t/codingstd/trailing_space.t
==============================================================================
--- branches/rm_cflags/t/codingstd/trailing_space.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/codingstd/trailing_space.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -36,7 +36,6 @@
=cut
my $DIST = Parrot::Distribution->new;
-
my @files = @ARGV ? <@ARGV> : (
$DIST->get_c_language_files(),
$DIST->get_make_language_files(),
@@ -73,4 +72,8 @@
# generated by tools/dev/nci_thunk_gen.pir
src/nci/core_thunks.c
src/nci/extra_thunks.c
-
+t/examples/pir.t
+t/examples/tutorial.t
+t/library/getopt_obj.t
+t/perl/Parrot_Test.t
+t/run/options.t
Modified: branches/rm_cflags/t/compilers/imcc/imcpasm/optc.t
==============================================================================
--- branches/rm_cflags/t/compilers/imcc/imcpasm/optc.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/compilers/imcc/imcpasm/optc.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -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/rm_cflags/t/compilers/imcc/reg/spill.t
==============================================================================
--- branches/rm_cflags/t/compilers/imcc/reg/spill.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/compilers/imcc/reg/spill.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,718 +1,372 @@
-#!perl
-# Copyright (C) 2001-2008, Parrot Foundation.
+#!parrot
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
-use strict;
-use warnings;
-use lib qw( . lib ../lib ../../lib );
-use Parrot::Test tests => 9;
+.sub main :main
+ .include 'test_more.pir'
+ plan(78)
+
+ test_allocate_1()
+ test_spill_1()
+ test_pcc_arg_overflow_1()
+ test_spill_4()
+.end
-pir_output_is( <<'CODE', <<'OUT', "allocate 1" );
+.sub test_allocate_1
#
# Test the ability of the register allocator to
# generate spills.
#
-.sub test :main
- $I0 = 0
- $I1 = 1
- $I2 = 2
- $I3 = 3
- $I4 = 4
- $I5 = 5
- $I6 = 6
- $I7 = 7
- $I8 = 8
- $I9 = 9
-
- $I10 = 10
- $I11 = 11
- $I12 = 12
- $I13 = 13
- $I14 = 14
- $I15 = 15
- $I16 = 16
- $I17 = 17
- $I18 = 18
- $I19 = 19
-
- $I20 = 20
- $I21 = 21
- $I22 = 22
- $I23 = 23
- $I24 = 24
- $I25 = 25
- $I26 = 26
- $I27 = 27
- $I28 = 28
- $I29 = 29
-
- $I30 = 30
- $I31 = 31
- $I32 = 32
- $I33 = 33
- $I34 = 34
- $I35 = 35
- $I36 = 36
- $I37 = 37
- $I38 = 38
- $I39 = 39
-
- $I40 = 40
-
- print $I0
- print "\n"
- print $I10
- print "\n"
- print $I20
- print "\n"
- print $I30
- print "\n"
- print $I40
- print "\n"
+ $I0 = 0
+ $I1 = 1
+ $I2 = 2
+ $I3 = 3
+ $I4 = 4
+ $I5 = 5
+ $I6 = 6
+ $I7 = 7
+ $I8 = 8
+ $I9 = 9
+
+ $I10 = 10
+ $I11 = 11
+ $I12 = 12
+ $I13 = 13
+ $I14 = 14
+ $I15 = 15
+ $I16 = 16
+ $I17 = 17
+ $I18 = 18
+ $I19 = 19
+
+ $I20 = 20
+ $I21 = 21
+ $I22 = 22
+ $I23 = 23
+ $I24 = 24
+ $I25 = 25
+ $I26 = 26
+ $I27 = 27
+ $I28 = 28
+ $I29 = 29
+
+ $I30 = 30
+ $I31 = 31
+ $I32 = 32
+ $I33 = 33
+ $I34 = 34
+ $I35 = 35
+ $I36 = 36
+ $I37 = 37
+ $I38 = 38
+ $I39 = 39
+
+ $I40 = 40
+
+ is($I0, 0, "allocate 1")
+ is($I10, 10, "allocate 1")
+ is($I20, 20, "allocate 1")
+ is($I30, 30, "allocate 1")
+ is($I40, 40, "allocate 1")
- end
.end
-CODE
-0
-10
-20
-30
-40
-OUT
-pir_output_is( <<'CODE', <<'OUT', "spill 1" );
+.sub test_spill_1
#
# Test the ability of the register allocator to
# generate spills.
#
-.sub test :main
- $I0 = 0
- $I1 = 1
- $I2 = 2
- $I3 = 3
- $I4 = 4
- $I5 = 5
- $I6 = 6
- $I7 = 7
- $I8 = 8
- $I9 = 9
-
- $I10 = 10
- $I11 = 11
- $I12 = 12
- $I13 = 13
- $I14 = 14
- $I15 = 15
- $I16 = 16
- $I17 = 17
- $I18 = 18
- $I19 = 19
-
- $I20 = 20
- $I21 = 21
- $I22 = 22
- $I23 = 23
- $I24 = 24
- $I25 = 25
- $I26 = 26
- $I27 = 27
- $I28 = 28
- $I29 = 29
-
- $I30 = 30
- $I31 = 31
- $I32 = 32
- $I33 = 33
- $I34 = 34
- $I35 = 35
- $I36 = 36
- $I37 = 37
- $I38 = 38
- $I39 = 39
-
- $I40 = $I0 + $I1
- $I41 = $I2 + $I3
- $I42 = $I4 + $I5
- $I43 = $I6 + $I7
- $I44 = $I8 + $I9
-
- $I50 = $I10 + $I11
- $I51 = $I12 + $I13
- $I52 = $I14 + $I15
- $I53 = $I16 + $I17
- $I54 = $I18 + $I19
-
- $I60 = $I20 + $I21
- $I61 = $I22 + $I23
- $I62 = $I24 + $I25
- $I63 = $I26 + $I27
- $I64 = $I28 + $I29
-
- $I70 = $I30 + $I31
- $I71 = $I32 + $I33
- $I72 = $I34 + $I35
- $I73 = $I36 + $I37
- $I74 = $I38 + $I39
-
- print $I0
- print $I1
- print $I2
- print $I3
- print $I4
- print $I5
- print $I6
- print $I7
- print $I8
- print $I9
- print "\n"
- print $I10
- print $I11
- print $I12
- print $I13
- print $I14
- print $I15
- print $I16
- print $I17
- print $I18
- print $I19
- print "\n"
- print $I20
- print $I21
- print $I22
- print $I23
- print $I24
- print $I25
- print $I26
- print $I27
- print $I28
- print $I29
- print "\n"
- print $I30
- print $I31
- print $I32
- print $I33
- print $I34
- print $I35
- print $I36
- print $I37
- print $I38
- print $I39
- print "\n"
- print $I40
- print $I41
- print $I42
- print $I43
- print $I44
- print "\n"
- print $I50
- print $I51
- print $I52
- print $I53
- print $I54
- print "\n"
- print $I60
- print $I61
- print $I62
- print $I63
- print $I64
- print "\n"
- print $I70
- print $I71
- print $I72
- print $I73
- print $I74
- print "\n"
- end
+ $I0 = 0
+ $I1 = 1
+ $I2 = 2
+ $I3 = 3
+ $I4 = 4
+ $I5 = 5
+ $I6 = 6
+ $I7 = 7
+ $I8 = 8
+ $I9 = 9
+
+ $I10 = 10
+ $I11 = 11
+ $I12 = 12
+ $I13 = 13
+ $I14 = 14
+ $I15 = 15
+ $I16 = 16
+ $I17 = 17
+ $I18 = 18
+ $I19 = 19
+
+ $I20 = 20
+ $I21 = 21
+ $I22 = 22
+ $I23 = 23
+ $I24 = 24
+ $I25 = 25
+ $I26 = 26
+ $I27 = 27
+ $I28 = 28
+ $I29 = 29
+
+ $I30 = 30
+ $I31 = 31
+ $I32 = 32
+ $I33 = 33
+ $I34 = 34
+ $I35 = 35
+ $I36 = 36
+ $I37 = 37
+ $I38 = 38
+ $I39 = 39
+
+ $I40 = $I0 + $I1
+ $I41 = $I2 + $I3
+ $I42 = $I4 + $I5
+ $I43 = $I6 + $I7
+ $I44 = $I8 + $I9
+
+ $I50 = $I10 + $I11
+ $I51 = $I12 + $I13
+ $I52 = $I14 + $I15
+ $I53 = $I16 + $I17
+ $I54 = $I18 + $I19
+
+ $I60 = $I20 + $I21
+ $I61 = $I22 + $I23
+ $I62 = $I24 + $I25
+ $I63 = $I26 + $I27
+ $I64 = $I28 + $I29
+
+ $I70 = $I30 + $I31
+ $I71 = $I32 + $I33
+ $I72 = $I34 + $I35
+ $I73 = $I36 + $I37
+ $I74 = $I38 + $I39
+
+ is($I0, 0, 'spill 1')
+ is($I1, 1, 'spill 1')
+ is($I2, 2, 'spill 1')
+ is($I3, 3, 'spill 1')
+ is($I4, 4, 'spill 1')
+ is($I5, 5, 'spill 1')
+ is($I6, 6, 'spill 1')
+ is($I7, 7, 'spill 1')
+ is($I8, 8, 'spill 1')
+ is($I9, 9, 'spill 1')
+ is($I10, 10, 'spill 1')
+ is($I11, 11, 'spill 1')
+ is($I12, 12, 'spill 1')
+ is($I13, 13, 'spill 1')
+ is($I14, 14, 'spill 1')
+ is($I15, 15, 'spill 1')
+ is($I16, 16, 'spill 1')
+ is($I17, 17, 'spill 1')
+ is($I18, 18, 'spill 1')
+ is($I19, 19, 'spill 1')
+ is($I20, 20, 'spill 1')
+ is($I21, 21, 'spill 1')
+ is($I22, 22, 'spill 1')
+ is($I23, 23, 'spill 1')
+ is($I24, 24, 'spill 1')
+ is($I25, 25, 'spill 1')
+ is($I26, 26, 'spill 1')
+ is($I27, 27, 'spill 1')
+ is($I28, 28, 'spill 1')
+ is($I29, 29, 'spill 1')
+ is($I30, 30, 'spill 1')
+ is($I31, 31, 'spill 1')
+ is($I32, 32, 'spill 1')
+ is($I33, 33, 'spill 1')
+ is($I34, 34, 'spill 1')
+ is($I35, 35, 'spill 1')
+ is($I36, 36, 'spill 1')
+ is($I37, 37, 'spill 1')
+ is($I38, 38, 'spill 1')
+ is($I39, 39, 'spill 1')
+ is($I40, 1, 'spill 1')
+ is($I41, 5, 'spill 1')
+ is($I42, 9, 'spill 1')
+ is($I43, 13, 'spill 1')
+ is($I44, 17, 'spill 1')
+ is($I50, 21, 'spill 1')
+ is($I51, 25, 'spill 1')
+ is($I52, 29, 'spill 1')
+ is($I53, 33, 'spill 1')
+ is($I54, 37, 'spill 1')
+ is($I60, 41, 'spill 1')
+ is($I61, 45, 'spill 1')
+ is($I62, 49, 'spill 1')
+ is($I63, 53, 'spill 1')
+ is($I64, 57, 'spill 1')
+ is($I70, 61, 'spill 1')
+ is($I71, 65, 'spill 1')
+ is($I72, 69, 'spill 1')
+ is($I73, 73, 'spill 1')
+ is($I74, 77, 'spill 1')
.end
-CODE
-0123456789
-10111213141516171819
-20212223242526272829
-30313233343536373839
-1591317
-2125293337
-4145495357
-6165697377
-OUT
-pir_output_is( <<'CODE', <<'OUT', "pcc arg overflow 1" );
+.sub test_pcc_arg_overflow_1
#
# Test the ability of the register allocator in
# combination with PCC calling convention and overflow arguments.
# Slightly redundant with tests in t/syn/pcc.t but please leave.
#
-.sub test :main
- _foo(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40)
- end
+ _foo(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40)
.end
+
.sub _foo
- .param int i1
- .param int i2
- .param int i3
- .param int i4
- .param int i5
- .param int i6
- .param int i7
- .param int i8
- .param int i9
- .param int i10
- .param int i11
- .param int i12
- .param int i13
- .param int i14
- .param int i15
- .param int i16
- .param int i17
- .param int i18
- .param int i19
- .param int i20
- .param int i21
- .param int i22
- .param int i23
- .param int i24
- .param int i25
- .param int i26
- .param int i27
- .param int i28
- .param int i29
- .param int i30
- .param int i31
- .param int i32
- .param int i33
- .param int i34
- .param int i35
- .param int i36
- .param int i37
- .param int i38
- .param int i39
- .param int i40
- print i1
- print "\n"
- print i2
- print "\n"
- print i3
- print "\n"
- print i4
- print "\n"
- print i5
- print "\n"
- print i10
- print "\n"
- print i15
- print "\n"
- print i20
- print "\n"
- print i25
- print "\n"
- print i30
- print "\n"
- print i35
- print "\n"
- print i40
- print "\n"
- end
+ .param int i1
+ .param int i2
+ .param int i3
+ .param int i4
+ .param int i5
+ .param int i6
+ .param int i7
+ .param int i8
+ .param int i9
+ .param int i10
+ .param int i11
+ .param int i12
+ .param int i13
+ .param int i14
+ .param int i15
+ .param int i16
+ .param int i17
+ .param int i18
+ .param int i19
+ .param int i20
+ .param int i21
+ .param int i22
+ .param int i23
+ .param int i24
+ .param int i25
+ .param int i26
+ .param int i27
+ .param int i28
+ .param int i29
+ .param int i30
+ .param int i31
+ .param int i32
+ .param int i33
+ .param int i34
+ .param int i35
+ .param int i36
+ .param int i37
+ .param int i38
+ .param int i39
+ .param int i40
+ is(i1, 1, 'pcc arg overflow 1')
+ is(i2, 2, 'pcc arg overflow 1')
+ is(i3, 3, 'pcc arg overflow 1')
+ is(i4, 4, 'pcc arg overflow 1')
+ is(i5, 5, 'pcc arg overflow 1')
+ is(i10, 10, 'pcc arg overflow 1')
+ is(i15, 15, 'pcc arg overflow 1')
+ is(i20, 20, 'pcc arg overflow 1')
+ is(i25, 25, 'pcc arg overflow 1')
+ is(i30, 30, 'pcc arg overflow 1')
+ is(i35, 35, 'pcc arg overflow 1')
+ is(i40, 40, 'pcc arg overflow 1')
.end
-CODE
-1
-2
-3
-4
-5
-10
-15
-20
-25
-30
-35
-40
-OUT
-pir_output_is( <<'CODE', <<'OUT', "spill 4" );
+.sub test_spill_4
#
# Another spill test
#
-.sub test :main
- $I0 = 0
- $I1 = 1
- $I2 = 2
- $I3 = 3
- $I4 = 4
- $I5 = 5
- $I6 = 6
- $I7 = 7
- $I8 = 8
- $I9 = 9
-
- $I10 = 10
- $I11 = 11
- $I12 = 12
- $I13 = 13
- $I14 = 14
- $I15 = 15
- $I16 = 16
- $I17 = 17
- $I18 = 18
- $I19 = 19
-
- $I20 = 20
- $I21 = 21
- $I22 = 22
- $I23 = 23
- $I24 = 24
- $I25 = 25
- $I26 = 26
- $I27 = 27
- $I28 = 28
- $I29 = 29
-
- $I30 = 30
- $I31 = 31
- $I32 = 32
- $I33 = 33
- $I34 = 34
- $I35 = 35
- $I36 = 36
- $I37 = 37
- $I38 = 38
- $I39 = 39
-
- if $I0 != 0 goto err
- if $I1 != 1 goto err
- if $I2 != 2 goto err
- if $I3 != 3 goto err
- if $I4 != 4 goto err
- if $I5 != 5 goto err
- if $I6 != 6 goto err
- if $I7 != 7 goto err
- if $I8 != 8 goto err
- if $I9 != 9 goto err
- if $I10 != 10 goto err
- if $I11 != 11 goto err
- if $I12 != 12 goto err
- if $I13 != 13 goto err
- if $I14 != 14 goto err
- if $I15 != 15 goto err
- if $I16 != 16 goto err
- if $I17 != 17 goto err
- if $I18 != 18 goto err
- if $I19 != 19 goto err
- if $I20 != 20 goto err
- if $I21 != 21 goto err
- if $I22 != 22 goto err
- if $I23 != 23 goto err
- if $I24 != 24 goto err
- if $I25 != 25 goto err
- if $I26 != 26 goto err
- if $I27 != 27 goto err
- if $I28 != 28 goto err
- if $I29 != 29 goto err
- if $I30 != 30 goto err
- if $I31 != 31 goto err
- if $I32 != 32 goto err
- if $I33 != 33 goto err
- if $I34 != 34 goto err
- if $I35 != 35 goto err
- if $I36 != 36 goto err
- if $I37 != 37 goto err
- if $I38 != 38 goto err
- if $I39 != 39 goto err
-
- print "ok\n"
- end
-err:
- print "nok\n"
- end
-.end
-CODE
-ok
-OUT
-
-pir_output_is( <<'CODE', <<'OUT', "bug #32996" );
-
-.namespace ["Foo"]
-
-.sub __biginit :main
- $S0 = "Foo"
- newclass $P0, $S0
- $P1 = new $S0
- $P1.'method1'()
- $P1.'method2'()
-
- $P2 = new $S0
- $P2.'method1'()
- $P2.'method2'()
-
- $P3 = new $S0
- $P3.'method1'()
- $P3.'method2'()
-
- $P4 = new $S0
- $P4.'method1'()
- $P4.'method2'()
-
- $P5 = new $S0
- $P5.'method1'()
- $P5.'method2'()
-
- $P6 = new $S0
- $P6.'method1'()
- $P6.'method2'()
-
- $P7 = new $S0
- $P7.'method1'()
- $P7.'method2'()
-
- $P8 = new $S0
- $P8.'method1'()
- $P8.'method2'()
-
- $P9 = new $S0
- $P9.'method1'()
- $P9.'method2'()
-
- $P10 = new $S0
- $P10.'method1'()
- $P10.'method2'()
-
- $P11 = new $S0
- $P11.'method1'()
- $P11.'method2'()
-
- $P12 = new $S0
- $P12.'method1'()
- $P12.'method2'()
-
- $P13 = new $S0
- $P13.'method1'()
- $P13.'method2'()
-
- $P14 = new $S0
- $P14.'method1'()
- $P14.'method2'()
-
- $P15 = new $S0
- $P15.'method1'()
- $P15.'method2'()
-
- $P1.'method1'()
- $P1.'method2'()
- $P2.'method1'()
- $P2.'method2'()
- $P3.'method1'()
- $P3.'method2'()
- $P4.'method1'()
- $P4.'method2'()
- $P5.'method1'()
- $P5.'method2'()
- $P6.'method1'()
- $P6.'method2'()
- $P7.'method1'()
- $P7.'method2'()
- $P8.'method1'()
- $P8.'method2'()
- $P9.'method1'()
- $P9.'method2'()
- $P10.'method1'()
- $P10.'method2'()
- $P11.'method1'()
- $P11.'method2'()
- $P12.'method1'()
- $P12.'method2'()
- $P13.'method1'()
- $P13.'method2'()
- $P14.'method1'()
- $P14.'method2'()
- $P15.'method1'()
- $P15.'method2'()
-
- end
-.end
+ $I0 = 0
+ $I1 = 1
+ $I2 = 2
+ $I3 = 3
+ $I4 = 4
+ $I5 = 5
+ $I6 = 6
+ $I7 = 7
+ $I8 = 8
+ $I9 = 9
+
+ $I10 = 10
+ $I11 = 11
+ $I12 = 12
+ $I13 = 13
+ $I14 = 14
+ $I15 = 15
+ $I16 = 16
+ $I17 = 17
+ $I18 = 18
+ $I19 = 19
+
+ $I20 = 20
+ $I21 = 21
+ $I22 = 22
+ $I23 = 23
+ $I24 = 24
+ $I25 = 25
+ $I26 = 26
+ $I27 = 27
+ $I28 = 28
+ $I29 = 29
+
+ $I30 = 30
+ $I31 = 31
+ $I32 = 32
+ $I33 = 33
+ $I34 = 34
+ $I35 = 35
+ $I36 = 36
+ $I37 = 37
+ $I38 = 38
+ $I39 = 39
+
+ if $I0 != 0 goto err
+ if $I1 != 1 goto err
+ if $I2 != 2 goto err
+ if $I3 != 3 goto err
+ if $I4 != 4 goto err
+ if $I5 != 5 goto err
+ if $I6 != 6 goto err
+ if $I7 != 7 goto err
+ if $I8 != 8 goto err
+ if $I9 != 9 goto err
+ if $I10 != 10 goto err
+ if $I11 != 11 goto err
+ if $I12 != 12 goto err
+ if $I13 != 13 goto err
+ if $I14 != 14 goto err
+ if $I15 != 15 goto err
+ if $I16 != 16 goto err
+ if $I17 != 17 goto err
+ if $I18 != 18 goto err
+ if $I19 != 19 goto err
+ if $I20 != 20 goto err
+ if $I21 != 21 goto err
+ if $I22 != 22 goto err
+ if $I23 != 23 goto err
+ if $I24 != 24 goto err
+ if $I25 != 25 goto err
+ if $I26 != 26 goto err
+ if $I27 != 27 goto err
+ if $I28 != 28 goto err
+ if $I29 != 29 goto err
+ if $I30 != 30 goto err
+ if $I31 != 31 goto err
+ if $I32 != 32 goto err
+ if $I33 != 33 goto err
+ if $I34 != 34 goto err
+ if $I35 != 35 goto err
+ if $I36 != 36 goto err
+ if $I37 != 37 goto err
+ if $I38 != 38 goto err
+ if $I39 != 39 goto err
-.sub method1 :method
- print "In method 1\n"
- .begin_return
- .end_return
-.end
-
-.sub method2 :method
- print "In method 2\n"
- .begin_return
- .end_return
-.end
-CODE
-In method 1
-In method 2
-In method 1
-In method 2
-In method 1
-In method 2
-In method 1
-In method 2
-In method 1
-In method 2
-In method 1
-In method 2
-In method 1
-In method 2
-In method 1
-In method 2
-In method 1
-In method 2
-In method 1
-In method 2
-In method 1
-In method 2
-In method 1
-In method 2
-In method 1
-In method 2
-In method 1
-In method 2
-In method 1
-In method 2
-In method 1
-In method 2
-In method 1
-In method 2
-In method 1
-In method 2
-In method 1
-In method 2
-In method 1
-In method 2
-In method 1
-In method 2
-In method 1
-In method 2
-In method 1
-In method 2
-In method 1
-In method 2
-In method 1
-In method 2
-In method 1
-In method 2
-In method 1
-In method 2
-In method 1
-In method 2
-In method 1
-In method 2
-In method 1
-In method 2
-OUT
-
-sub repeat {
- my ( $template, $count, %substs ) = @_;
- my ( $code, $n, $start );
- foreach ( split( /\n/, $template ) ) {
- $n = $count;
- $start = 0;
- if (/^(.*)=(\w+)=(.*)/) {
- my ( $pre, $key, $post ) = ( $1, $2, $3 );
- if ( $key eq 'ARGS' ) {
- my @params;
- for my $i ( 0 .. $n - 1 ) {
- ( my $new = $substs{$key} ) =~ s/\<index\>/$i/g;
- push @params, $new;
- }
- $code .= $pre . join( ',', @params ) . "$post\n";
- next;
- }
- $start = $n / 2 if ( $key eq 'TESTS2' );
- for my $i ( $start .. $n - 1 ) {
- ( my $new = $substs{$key} ) =~ s/\<index\>/$i/g;
- $code .= "$pre$new$post\n";
- }
- }
- else {
- $code .= "$_\n";
- }
- }
-
- return $code;
-}
-my $template2 = <<'TEMPLATE';
-.sub _main
- =LOCALS=
- =INITS=
- _sub(=ARGS=)
- =TESTS2=
- end
-fail:
- print "failed\n"
- end
-.end
-.sub _sub
- =PARAMS=
- =TESTS=
- print "all params ok\n"
+ ok(1, 'spill 4')
.return()
-fail:
- print "failed\n"
- end
+ err:
+ ok(0, 'spill 4')
.end
-TEMPLATE
-
-my $code = repeat(
- $template2, 18,
- LOCALS => ".local pmc a<index>\n\ta<index> = new 'Integer'",
- INITS => 'a<index> = <index>',
- ARGS => 'a<index>',
- PARAMS => '.param pmc a<index>',
- TESTS => "set \$I0, a<index>\nne \$I0, <index>, fail",
- TESTS2 => "set \$I0, a<index>\nne \$I0, <index>, fail"
-);
-
-pir_output_is( $code, <<'OUT', "overflow pmcs 18 spill" );
-all params ok
-OUT
-
-$code = repeat(
- $template2, 22,
- LOCALS => ".local pmc a<index>\n\ta<index> = new 'Integer'",
- INITS => 'a<index> = <index>',
- ARGS => 'a<index>',
- PARAMS => '.param pmc a<index>',
- TESTS => "set \$I0, a<index>\nne \$I0, <index>, fail",
- TESTS2 => "set \$I0, a<index>\nne \$I0, <index>, fail"
-);
-
-pir_output_is( $code, <<'OUT', "overflow pmcs 22 spill" );
-all params ok
-OUT
-
-$code = repeat(
- $template2, 40,
- LOCALS => ".local pmc a<index>\n\ta<index> = new 'Integer'",
- INITS => 'a<index> = <index>',
- ARGS => 'a<index>',
- PARAMS => '.param pmc a<index>',
- TESTS => "set \$I0, a<index>\nne \$I0, <index>, fail",
- TESTS2 => "set \$I0, a<index>\nne \$I0, <index>, fail"
-);
-
-pir_output_is( $code, <<'OUT', "overflow pmcs 40 spill" );
-all params ok
-OUT
-
-$code = repeat(
- $template2, 60,
- LOCALS => ".local pmc a<index>\n\ta<index> = new 'Integer'",
- INITS => 'a<index> = <index>',
- ARGS => 'a<index>',
- PARAMS => '.param pmc a<index>',
- TESTS => "set \$I0, a<index>\nne \$I0, <index>, fail",
- TESTS2 => "set \$I0, a<index>\nne \$I0, <index>, fail"
-);
-
-pir_output_is( $code, <<'OUT', "overflow pmcs 60 spill" );
-all params ok
-OUT
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4:
+# vim: expandtab shiftwidth=4 ft=pir:
Copied: branches/rm_cflags/t/compilers/imcc/reg/spill_old.t (from r44451, trunk/t/compilers/imcc/reg/spill_old.t)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/rm_cflags/t/compilers/imcc/reg/spill_old.t Wed Feb 24 08:11:58 2010 (r44452, copy of r44451, trunk/t/compilers/imcc/reg/spill_old.t)
@@ -0,0 +1,298 @@
+#!perl
+# Copyright (C) 2001-2008, Parrot Foundation.
+# $Id$
+
+use strict;
+use warnings;
+use lib qw( . lib ../lib ../../lib );
+use Parrot::Test tests => 5;
+
+pir_output_is( <<'CODE', <<'OUT', "bug #32996" );
+
+.namespace ["Foo"]
+
+.sub __biginit :main
+ $S0 = "Foo"
+ newclass $P0, $S0
+ $P1 = new $S0
+ $P1.'method1'()
+ $P1.'method2'()
+
+ $P2 = new $S0
+ $P2.'method1'()
+ $P2.'method2'()
+
+ $P3 = new $S0
+ $P3.'method1'()
+ $P3.'method2'()
+
+ $P4 = new $S0
+ $P4.'method1'()
+ $P4.'method2'()
+
+ $P5 = new $S0
+ $P5.'method1'()
+ $P5.'method2'()
+
+ $P6 = new $S0
+ $P6.'method1'()
+ $P6.'method2'()
+
+ $P7 = new $S0
+ $P7.'method1'()
+ $P7.'method2'()
+
+ $P8 = new $S0
+ $P8.'method1'()
+ $P8.'method2'()
+
+ $P9 = new $S0
+ $P9.'method1'()
+ $P9.'method2'()
+
+ $P10 = new $S0
+ $P10.'method1'()
+ $P10.'method2'()
+
+ $P11 = new $S0
+ $P11.'method1'()
+ $P11.'method2'()
+
+ $P12 = new $S0
+ $P12.'method1'()
+ $P12.'method2'()
+
+ $P13 = new $S0
+ $P13.'method1'()
+ $P13.'method2'()
+
+ $P14 = new $S0
+ $P14.'method1'()
+ $P14.'method2'()
+
+ $P15 = new $S0
+ $P15.'method1'()
+ $P15.'method2'()
+
+ $P1.'method1'()
+ $P1.'method2'()
+ $P2.'method1'()
+ $P2.'method2'()
+ $P3.'method1'()
+ $P3.'method2'()
+ $P4.'method1'()
+ $P4.'method2'()
+ $P5.'method1'()
+ $P5.'method2'()
+ $P6.'method1'()
+ $P6.'method2'()
+ $P7.'method1'()
+ $P7.'method2'()
+ $P8.'method1'()
+ $P8.'method2'()
+ $P9.'method1'()
+ $P9.'method2'()
+ $P10.'method1'()
+ $P10.'method2'()
+ $P11.'method1'()
+ $P11.'method2'()
+ $P12.'method1'()
+ $P12.'method2'()
+ $P13.'method1'()
+ $P13.'method2'()
+ $P14.'method1'()
+ $P14.'method2'()
+ $P15.'method1'()
+ $P15.'method2'()
+
+ end
+.end
+
+.sub method1 :method
+ print "In method 1\n"
+ .begin_return
+ .end_return
+.end
+
+.sub method2 :method
+ print "In method 2\n"
+ .begin_return
+ .end_return
+.end
+CODE
+In method 1
+In method 2
+In method 1
+In method 2
+In method 1
+In method 2
+In method 1
+In method 2
+In method 1
+In method 2
+In method 1
+In method 2
+In method 1
+In method 2
+In method 1
+In method 2
+In method 1
+In method 2
+In method 1
+In method 2
+In method 1
+In method 2
+In method 1
+In method 2
+In method 1
+In method 2
+In method 1
+In method 2
+In method 1
+In method 2
+In method 1
+In method 2
+In method 1
+In method 2
+In method 1
+In method 2
+In method 1
+In method 2
+In method 1
+In method 2
+In method 1
+In method 2
+In method 1
+In method 2
+In method 1
+In method 2
+In method 1
+In method 2
+In method 1
+In method 2
+In method 1
+In method 2
+In method 1
+In method 2
+In method 1
+In method 2
+In method 1
+In method 2
+In method 1
+In method 2
+OUT
+
+sub repeat {
+ my ( $template, $count, %substs ) = @_;
+ my ( $code, $n, $start );
+ foreach ( split( /\n/, $template ) ) {
+ $n = $count;
+ $start = 0;
+ if (/^(.*)=(\w+)=(.*)/) {
+ my ( $pre, $key, $post ) = ( $1, $2, $3 );
+ if ( $key eq 'ARGS' ) {
+ my @params;
+ for my $i ( 0 .. $n - 1 ) {
+ ( my $new = $substs{$key} ) =~ s/\<index\>/$i/g;
+ push @params, $new;
+ }
+ $code .= $pre . join( ',', @params ) . "$post\n";
+ next;
+ }
+ $start = $n / 2 if ( $key eq 'TESTS2' );
+ for my $i ( $start .. $n - 1 ) {
+ ( my $new = $substs{$key} ) =~ s/\<index\>/$i/g;
+ $code .= "$pre$new$post\n";
+ }
+ }
+ else {
+ $code .= "$_\n";
+ }
+ }
+
+ return $code;
+}
+my $template2 = <<'TEMPLATE';
+.sub _main
+ =LOCALS=
+ =INITS=
+ _sub(=ARGS=)
+ =TESTS2=
+ end
+fail:
+ print "failed\n"
+ end
+.end
+.sub _sub
+ =PARAMS=
+ =TESTS=
+ print "all params ok\n"
+ .return()
+fail:
+ print "failed\n"
+ end
+.end
+TEMPLATE
+
+my $code = repeat(
+ $template2, 18,
+ LOCALS => ".local pmc a<index>\n\ta<index> = new 'Integer'",
+ INITS => 'a<index> = <index>',
+ ARGS => 'a<index>',
+ PARAMS => '.param pmc a<index>',
+ TESTS => "set \$I0, a<index>\nne \$I0, <index>, fail",
+ TESTS2 => "set \$I0, a<index>\nne \$I0, <index>, fail"
+);
+
+pir_output_is( $code, <<'OUT', "overflow pmcs 18 spill" );
+all params ok
+OUT
+
+$code = repeat(
+ $template2, 22,
+ LOCALS => ".local pmc a<index>\n\ta<index> = new 'Integer'",
+ INITS => 'a<index> = <index>',
+ ARGS => 'a<index>',
+ PARAMS => '.param pmc a<index>',
+ TESTS => "set \$I0, a<index>\nne \$I0, <index>, fail",
+ TESTS2 => "set \$I0, a<index>\nne \$I0, <index>, fail"
+);
+
+pir_output_is( $code, <<'OUT', "overflow pmcs 22 spill" );
+all params ok
+OUT
+
+$code = repeat(
+ $template2, 40,
+ LOCALS => ".local pmc a<index>\n\ta<index> = new 'Integer'",
+ INITS => 'a<index> = <index>',
+ ARGS => 'a<index>',
+ PARAMS => '.param pmc a<index>',
+ TESTS => "set \$I0, a<index>\nne \$I0, <index>, fail",
+ TESTS2 => "set \$I0, a<index>\nne \$I0, <index>, fail"
+);
+
+pir_output_is( $code, <<'OUT', "overflow pmcs 40 spill" );
+all params ok
+OUT
+
+$code = repeat(
+ $template2, 60,
+ LOCALS => ".local pmc a<index>\n\ta<index> = new 'Integer'",
+ INITS => 'a<index> = <index>',
+ ARGS => 'a<index>',
+ PARAMS => '.param pmc a<index>',
+ TESTS => "set \$I0, a<index>\nne \$I0, <index>, fail",
+ TESTS2 => "set \$I0, a<index>\nne \$I0, <index>, fail"
+);
+
+pir_output_is( $code, <<'OUT', "overflow pmcs 60 spill" );
+all params ok
+OUT
+
+# Local Variables:
+# mode: cperl
+# cperl-indent-level: 4
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:
Modified: branches/rm_cflags/t/compilers/imcc/syn/hll.t
==============================================================================
--- branches/rm_cflags/t/compilers/imcc/syn/hll.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/compilers/imcc/syn/hll.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -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/rm_cflags/t/compilers/imcc/syn/labels.t
==============================================================================
--- branches/rm_cflags/t/compilers/imcc/syn/labels.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/compilers/imcc/syn/labels.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!parrot
-# Copyright (C) 2001-2009, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
.sub main :main
@@ -41,9 +41,9 @@
.end
CODE
.end
+
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4 filetype=pir:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/compilers/imcc/syn/objects.t
==============================================================================
--- branches/rm_cflags/t/compilers/imcc/syn/objects.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/compilers/imcc/syn/objects.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!parrot
-# Copyright (C) 2001-2009, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
.sub main :main
@@ -29,7 +29,7 @@
.namespace [ ]
.namespace []
-.sub test
+.sub test
$I0 = 42
.end
CODE
@@ -291,8 +291,7 @@
.end
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4 filetype=pir:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/compilers/imcc/syn/op.t
==============================================================================
--- branches/rm_cflags/t/compilers/imcc/syn/op.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/compilers/imcc/syn/op.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!parrot
-# Copyright (C) 2001-2009, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
.sub test :main
@@ -320,8 +320,7 @@
.end
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4 filetype=pir:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/compilers/imcc/syn/scope.t
==============================================================================
--- branches/rm_cflags/t/compilers/imcc/syn/scope.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/compilers/imcc/syn/scope.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!parrot
-# Copyright (C) 2001-2009, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
.sub main :main
@@ -20,8 +20,8 @@
.end
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4 filetype=pir:
+# vim: expandtab shiftwidth=4 ft=pir:
+
Modified: branches/rm_cflags/t/compilers/imcc/syn/subflags.t
==============================================================================
--- branches/rm_cflags/t/compilers/imcc/syn/subflags.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/compilers/imcc/syn/subflags.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,10 +1,10 @@
#!./parrot
-# Copyright (C) 2001-2008, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
=head1 NAME
-t/compilers/imcc/syn/subflags.t
+t/compilers/imcc/syn/subflags.t
=head1 SYNOPSIS
@@ -185,3 +185,9 @@
.sub 'anon4' :subid('subid4')
.return ('anon4')
.end
+
+# Local Variables:
+# mode: pir
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/compilers/imcc/syn/veracity.t
==============================================================================
--- branches/rm_cflags/t/compilers/imcc/syn/veracity.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/compilers/imcc/syn/veracity.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!parrot
-# Copyright (C) 2001-2009, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
.sub test :main
@@ -21,7 +21,7 @@
ok(1, "1 is true")
.return()
not_one:
- ok(0, "1 is true")
+ ok(0, "1 is true")
.end
.sub test_negative_integers
@@ -88,7 +88,7 @@
goto neg_zero
not_zero:
ok(0, "0.0 is false")
- neg_zero:
+ neg_zero:
$N0 = -0.0
if $N0 goto not_neg_zero
ok(1, "-0.0 is false")
@@ -108,8 +108,7 @@
.end
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4 filetype=pir:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/compilers/json/from_parrot.t
==============================================================================
--- branches/rm_cflags/t/compilers/json/from_parrot.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/compilers/json/from_parrot.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!parrot
-# Copyright (C) 2001-2009, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -452,8 +452,7 @@
.end
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4 filetype=pir:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/compilers/pct/past.t
==============================================================================
--- branches/rm_cflags/t/compilers/pct/past.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/compilers/pct/past.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -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/rm_cflags/t/compilers/pge/00-basic.t
==============================================================================
--- branches/rm_cflags/t/compilers/pge/00-basic.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/compilers/pge/00-basic.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,6 @@
#!./parrot
-# Copyright (C) 2006-2008, Parrot Foundation.
+# Copyright (C) 2006-2010, Parrot Foundation.
+# $Id$
=head1 NAME
Modified: branches/rm_cflags/t/compilers/pge/02-match.t
==============================================================================
--- branches/rm_cflags/t/compilers/pge/02-match.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/compilers/pge/02-match.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!parrot
-# Copyright (C) 2006-2009, Parrot Foundation.
+# Copyright (C) 2006-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -56,8 +56,7 @@
.end
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4 filetype=pir:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/compilers/pge/03-optable.t
==============================================================================
--- branches/rm_cflags/t/compilers/pge/03-optable.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/compilers/pge/03-optable.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,8 +1,7 @@
#!parrot
+# Copyright (C) 2006-2010, Parrot Foundation.
# $Id$
-# Copyright (C) 2006-2009, Parrot Foundation.
-
.sub main :main
.include 'test_more.pir'
plan(37)
@@ -184,8 +183,7 @@
.end
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4 filetype=pir:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/compilers/pge/04-compile.t
==============================================================================
--- branches/rm_cflags/t/compilers/pge/04-compile.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/compilers/pge/04-compile.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,4 +1,5 @@
#!parrot
+# Copyright (C) 2007-2009, Parrot Foundation.
# $Id$
# Copyright (C) 2007-2009, Parrot Foundation.
@@ -76,10 +77,8 @@
is($P3, 'ok 1', 'compile into a new grammar, 2x')
.end
-
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4 filetype=pir:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/compilers/pge/06-grammar.t
==============================================================================
--- branches/rm_cflags/t/compilers/pge/06-grammar.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/compilers/pge/06-grammar.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,6 @@
#!./parrot
-# Copyright (C) 2006-2008, Parrot Foundation.
+# Copyright (C) 2006-2010, Parrot Foundation.
+# $Id$
=head1 NAME
Modified: branches/rm_cflags/t/compilers/pge/pge-hs.t
==============================================================================
--- branches/rm_cflags/t/compilers/pge/pge-hs.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/compilers/pge/pge-hs.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
-#!parrot
-# Copyright (C) 2001-2009, Parrot Foundation.
+#!parrot
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -43,8 +43,7 @@
.end
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4 filetype=pir:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/compilers/tge/basic.t
==============================================================================
--- branches/rm_cflags/t/compilers/tge/basic.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/compilers/tge/basic.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!parrot
-# Copyright (C) 2005-2009, Parrot Foundation.
+# Copyright (C) 2005-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -70,15 +70,14 @@
.sub test_malformed_string_in_r11890_under_linux_i386
lives_ok(<<'CODE', '"Malformed string" in r11890 under Linux i386')
-.sub main
+.sub main
load_bytecode "TGE.pbc"
.end
CODE
.end
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4 filetype=pir:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/compilers/tge/parser.t
==============================================================================
--- branches/rm_cflags/t/compilers/tge/parser.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/compilers/tge/parser.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!parrot
-# Copyright (C) 2005-2009, Parrot Foundation.
+# Copyright (C) 2005-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -59,7 +59,7 @@
.sub test_parse_failure
$S0 = "Syntax error at line 4, near \"transform \"\n"
throws_substring(<<'CODE', $S0, 'parse failure')
-.sub main
+.sub main
load_bytecode 'TGE.pbc'
.local string source
source = <<'GRAMMAR'
@@ -79,8 +79,7 @@
.end
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4 filetype=pir:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/configure/008-file_based_configuration.t
==============================================================================
--- branches/rm_cflags/t/configure/008-file_based_configuration.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/configure/008-file_based_configuration.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! perl
-# Copyright (C) 2007, Parrot Foundation.
+# Copyright (C) 2007-2010, Parrot Foundation.
# $Id$
# 008-file_based_configuration.t
@@ -20,17 +20,17 @@
my $configfile = q{examples/config/file/configwithfatalstep};
my ($args, $steps_list_ref) = _test_good_config_file($configfile);
- ok(! defined $args->{maintainer},
+ ok(! defined $args->{maintainer},
"Configuring from testfoobar: 'maintainer' not defined, as expected");
is($args->{'verbose-step'}, 'init::hints',
"Configuring from testfoobar: 'init::hints' is verbose step");
is($args->{'fatal-step'}, 'init::hints',
"Configuring from testfoobar: 'init::hints' is fatal step");
- ok($args->{nomanicheck},
+ ok($args->{nomanicheck},
"Configuring from testfoobar: will omit check of MANIFEST");
is($args->{file}, $configfile,
"Configuring from testfoobar: config file correctly stored");
- ok($args->{debugging},
+ ok($args->{debugging},
"Configuring from testfoobar: debugging turned on");
my %steps_seen = map {$_ => 1} @{ $steps_list_ref };
ok(exists $steps_seen{'init::manifest'},
@@ -42,18 +42,18 @@
{
my $configfile = q{examples/config/file/configcompiler};
my ($args, $steps_list_ref) = _test_good_config_file($configfile);
-
+
my $c_compiler = '/usr/bin/gcc';
my $cplusplus_compiler = '/usr/bin/g++';
- ok(! defined $args->{maintainer},
+ ok(! defined $args->{maintainer},
"Configuring from yourfoobar: 'maintainer' not defined as expected");
is($args->{'verbose-step'}, 'init::hints',
"Configuring from yourfoobar: 'init::hints' is verbose step");
- ok($args->{nomanicheck},
+ ok($args->{nomanicheck},
"Configuring from yourfoobar: will omit check of MANIFEST");
is($args->{file}, $configfile,
"Configuring from yourfoobar: config file correctly stored");
- ok($args->{debugging},
+ ok($args->{debugging},
"Configuring from yourfoobar: debugging turned on");
is($args->{cc}, $c_compiler,
"Configuring from yourfoobar: C compiler is $c_compiler");
@@ -76,13 +76,13 @@
my $configfile = q{t/configure/testlib/verbosefoobar};
my ($args, $steps_list_ref) = _test_good_config_file($configfile);
- ok(! defined $args->{maintainer},
+ ok(! defined $args->{maintainer},
"Configuring from verbosefoobar: 'maintainer' not defined as expected");
- ok($args->{nomanicheck},
+ ok($args->{nomanicheck},
"Configuring from verbosefoobar: will omit check of MANIFEST");
is($args->{file}, $configfile,
"Configuring from verbosefoobar: config file correctly stored");
- ok($args->{debugging},
+ ok($args->{debugging},
"Configuring from verbosefoobar: debugging turned on");
is($args->{verbose}, 1,
"Configuring from verbosefoobar: verbose output is on");
Modified: branches/rm_cflags/t/distro/meta_yml.t
==============================================================================
--- branches/rm_cflags/t/distro/meta_yml.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/distro/meta_yml.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -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/rm_cflags/t/dynoplibs/math.t
==============================================================================
--- branches/rm_cflags/t/dynoplibs/math.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/dynoplibs/math.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2009, Parrot Foundation.
+# Copyright (C) 2009-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -179,8 +179,7 @@
.end
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4 filetype=pir:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/dynoplibs/obscure.t
==============================================================================
--- branches/rm_cflags/t/dynoplibs/obscure.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/dynoplibs/obscure.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2009, Parrot Foundation.
+# Copyright (C) 2009-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -99,8 +99,7 @@
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4 filetype=pir:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/dynpmc/foo2.t
==============================================================================
--- branches/rm_cflags/t/dynpmc/foo2.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/dynpmc/foo2.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2009, Parrot Foundation.
+# Copyright (C) 2009-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -23,7 +23,7 @@
test_dynpmcs_can_use_super()
.end
-.sub test_dynpmcs_can_use_super
+.sub test_dynpmcs_can_use_super
$P0 = loadlib 'foo_group'
$P1 = new "Foo2"
@@ -32,8 +32,7 @@
.end
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4: filetype=pir:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/dynpmc/gdbmhash.t
==============================================================================
--- branches/rm_cflags/t/dynpmc/gdbmhash.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/dynpmc/gdbmhash.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,21 +1,14 @@
-#! perl
-# Copyright (C) 2005-2008, Parrot Foundation.
+#! parrot
+# Copyright (C) 2005-2010, Parrot Foundation.
# $Id$
-use strict;
-use warnings;
-use lib qw( . lib ../lib ../../lib );
-use Test::More;
-use Parrot::Test;
-use Parrot::Config;
-
=head1 NAME
t/dynpmc/gdbmhash.t - test the GDBMHash PMC
=head1 SYNOPSIS
- % prove t/dynpmc/gdbmhash.t
+ % parrot t/dynpmc/gdbmhash.t
=head1 DESCRIPTION
@@ -23,77 +16,95 @@
=cut
-if ( $PConfig{has_gdbm} ) {
- plan tests => 13;
-}
-else {
- plan skip_all => "No gdbm library available";
-}
+.sub main
+ .include 'test_more.pir'
+ .include 'iglobals.pasm'
+ .local pmc config_hash, interp
+
+ plan(48)
+ interp = getinterp
+ config_hash = interp[.IGLOBALS_CONFIG_HASH]
+ $S0 = config_hash['has_gdbm']
+ unless $S0 goto no_gdbm
+
+ test_typeof()
+ test_interface()
+ test_get_integer()
+ test_get_bool()
+ test_modify_an_entry()
+ test_exists_keyed()
+ test_set_string_with_string_key()
+ test_set_string_with_pmc_key()
+ test_set_pmc_with_string_key()
+ test_set_pmc_with_pmc_key()
+ test_set_intval_with_string_key()
+ test_set_floatval_with_pmc_key()
+ test_delete_keyed()
+ .return()
+ no_gdbm:
+ skip(48, 'No gdbm library available')
+.end
+
+.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
-# PIR fragment for setting up a GDBM Hash
-my $new_hash_1 = << 'CODE';
-.sub test :main
+.sub test_typeof
.local pmc gdbmhash_lib
gdbmhash_lib = loadlib "gdbmhash"
.local pmc hash_1
hash_1 = new "GDBMHash"
-CODE
-
-pir_output_is( $new_hash_1 . << 'CODE', << 'OUTPUT', "typeof" );
-
.local string type
type = typeof hash_1
- print type
- print "\n"
+ is(type, 'GDBMHash', 'typeof')
.end
-CODE
-GDBMHash
-OUTPUT
-unlink('gdbm_hash_1');
-pir_output_is( $new_hash_1 . << 'CODE', << 'OUTPUT', "check whether interface is done" );
+.sub test_interface
+ .local pmc gdbmhash_lib
+ gdbmhash_lib = loadlib "gdbmhash"
+ .local pmc hash_1
+ hash_1 = new "GDBMHash"
.local int bool1
does bool1, hash_1, "scalar"
- print bool1
- print "\n"
+ is(bool1, 0, 'check whether interface is done')
does bool1, hash_1, "hash"
- print bool1
- print "\n"
+ is(bool1, 1, 'check whether interface is done')
does bool1, hash_1, "no_interface"
- print bool1
- print "\n"
+ is(bool1, 0, 'check whether interface is done')
.end
-CODE
-0
-1
-0
-OUTPUT
-unlink('gdbm_hash_1');
-pir_output_is( $new_hash_1 . << 'CODE', << 'OUTPUT', "get_integer" );
+.sub test_get_integer
+ .local pmc gdbmhash_lib
+ gdbmhash_lib = loadlib "gdbmhash"
+ .local pmc hash_1
+ hash_1 = new "GDBMHash"
.local int hash_size
hash_size = hash_1
- print "An unitialized GDBMHash has size "
- print hash_size
- print ".\n"
+ is(hash_size, 0, 'An unitialized GDBMHash has size 0')
hash_1 = "gdbm_hash_1"
hash_size = hash_1
- print "An GDBMHash for a new file has size "
- print hash_size
- print ".\n"
+ is(hash_size, 0, 'An GDBMHash for a new file has size 0')
hash_1["key1"] = "val1"
hash_size = hash_1
- print "After one assignment GDBMHash has size "
- print hash_size
- print ".\n"
+ is(hash_size, 1, 'After one assignment GDBMHash has size 1')
hash_1["key2"] = "val2"
hash_size = hash_1
- print "After two assignments GDBMHash has size "
- print hash_size
- print ".\n"
+ is(hash_size, 2, 'After two assignments GDBMHash has size 2')
hash_1["key3"] = "val3"
hash_1["key4"] = "val4"
@@ -109,225 +120,201 @@
hash_1["key14"] = "val14"
hash_1["key15"] = "val15"
hash_size = hash_1
- print "After 15 assignments GDBMHash has size "
- print hash_size
- print ".\n"
+ is(hash_size, 15, 'After 15 assignments GDBMHash has size 15')
delete hash_1["key7"]
delete hash_1["key9"]
hash_size = hash_1
- print "After 15 assignments and 2 deletes GDBMHash has size "
- print hash_size
- print ".\n"
-
+ is(hash_size, 13, 'After 15 assignments and 2 deletes GDBMHash has size 13')
+ unlink('gdbm_hash_1')
.end
-CODE
-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.
-After 15 assignments and 2 deletes GDBMHash has size 13.
-OUTPUT
-unlink('gdbm_hash_1');
-pir_output_is( $new_hash_1 . << 'CODE', << 'OUTPUT', "get_bool" );
- print "An uninitialized GDBMHash is"
+.sub test_get_bool
+ .local pmc gdbmhash_lib
+ gdbmhash_lib = loadlib "gdbmhash"
+ .local pmc hash_1
+ hash_1 = new "GDBMHash"
if hash_1 goto HASH1_IS_1
- print " not"
+ ok(1, 'An uninitialized GDBMHash is not')
HASH1_IS_1:
- print ".\n"
- hash_1 = "gdbm_hash_1"
- print "An GDBMHash for a new file is"
+ hash_1 = "gdbm_hash_2"
if hash_1 goto HASH1_IS_2
- print " not"
+ ok(1, 'A GDBMHash for a new file is not')
HASH1_IS_2:
- print ".\n"
hash_1["key1"] = "val1"
- print "After one insert the GDBMHash is"
if hash_1 goto HASH1_IS_3
- print " not"
+ ok(0, 'After one insert the GDBMHash is not')
HASH1_IS_3:
- print ".\n"
+ ok(1, 'After one insert the GDBMHash is')
+ unlink('gdbm_hash_2')
.end
-CODE
-An uninitialized GDBMHash is not.
-An GDBMHash for a new file is not.
-After one insert the GDBMHash is.
-OUTPUT
-unlink('gdbm_hash_1');
# The value is a STRING, with umlaut
# The key used for insertion is a STRING.
-pir_output_is( $new_hash_1 . << 'CODE', << 'OUTPUT', "modify an entry" );
- hash_1 = "gdbm_hash_1"
+.sub test_modify_an_entry
+ .local pmc gdbmhash_lib
+ gdbmhash_lib = loadlib "gdbmhash"
+ .local pmc hash_1
+ hash_1 = new "GDBMHash"
+ hash_1 = "gdbm_hash_3"
.local pmc val_pmc
- hash_1["Schluessel"] = "Wert urspruenglich\n"
+ hash_1["Schluessel"] = "Wert urspruenglich"
val_pmc = hash_1["Schluessel"]
- print val_pmc
- hash_1["Schluessel"] = "Wert geaendert\n"
+ is(val_pmc, 'Wert urspruenglich', 'modify an entry')
+ hash_1["Schluessel"] = "Wert geaendert"
val_pmc = hash_1["Schluessel"]
- print val_pmc
- hash_1["Schluessel"] = "Wert nocheinmal geaendert\n"
+ is(val_pmc, 'Wert geaendert', 'modify an entry')
+ hash_1["Schluessel"] = "Wert nocheinmal geaendert"
val_pmc = hash_1["Schluessel"]
- print val_pmc
- hash_1["Schluessel"] = "Wert urspruenglich\n"
+ is(val_pmc, 'Wert nocheinmal geaendert', 'modify an entry')
+ hash_1["Schluessel"] = "Wert urspruenglich"
val_pmc = hash_1["Schluessel"]
- print val_pmc
+ is(val_pmc, 'Wert urspruenglich', 'modify an entry')
+
+ unlink('gdbm_hash_3')
.end
-CODE
-Wert urspruenglich
-Wert geaendert
-Wert nocheinmal geaendert
-Wert urspruenglich
-OUTPUT
-unlink('gdbm_hash_1');
# The value is a STRING.
# The key used for insertion is a STRING.
-pir_output_is( $new_hash_1 . << 'CODE', << 'OUTPUT', "exists_keyed" );
- hash_1 = "gdbm_hash_1"
+.sub test_exists_keyed
+ .local pmc gdbmhash_lib
+ gdbmhash_lib = loadlib "gdbmhash"
+ .local pmc hash_1
+ hash_1 = new "GDBMHash"
+ hash_1 = "gdbm_hash_4"
- hash_1["Schluessel"] = "Wert\n"
+ hash_1["Schluessel"] = "Wert"
.local int exist_flag
exist_flag = exists hash_1["a"]
- print exist_flag
- print "\n"
+ is(exist_flag, 0, 'exists keyed')
exist_flag = exists hash_1["Schluessel"]
- print exist_flag
- print "\n"
+ is(exist_flag, 1, 'exists keyed')
.local pmc key_out
key_out = new 'String'
key_out = "b"
exist_flag = exists hash_1[key_out]
- print exist_flag
- print "\n"
+ is(exist_flag, 0, 'exists keyed')
key_out = "Schluessel"
exist_flag = exists hash_1[key_out]
- print exist_flag
- print "\n"
+ is(exist_flag, 1, 'exists keyed')
+
+ unlink('gdbm_hash_4')
.end
-CODE
-0
-1
-0
-1
-OUTPUT
-unlink('gdbm_hash_1');
# The value is a STRING.
# The key used for insertion is a STRING.
-pir_output_is( $new_hash_1 . << 'CODE', << 'OUTPUT', "set STRING with STRING key" );
- hash_1 = "gdbm_hash_1"
+.sub test_set_string_with_string_key
+ .local pmc gdbmhash_lib
+ gdbmhash_lib = loadlib "gdbmhash"
+ .local pmc hash_1
+ hash_1 = new "GDBMHash"
+ hash_1 = "gdbm_hash_5"
- hash_1["Schluessel"] = "Wert\n"
+ hash_1["Schluessel"] = "Wert"
.local pmc val_pmc
.local string val_string
val_string = hash_1["Schluessel"]
- print val_string
+ is(val_string, 'Wert', 'set string with string key')
val_pmc = hash_1["Schluessel"]
- print val_pmc
+ is(val_pmc, 'Wert', 'set string with string key')
.local pmc key_out
key_out = new 'String'
key_out = "Schluessel"
val_string = hash_1[key_out]
- print val_string
+ is(val_string, 'Wert', 'set string with string key')
val_pmc = hash_1[key_out]
- print val_pmc
+ is(val_pmc, 'Wert', 'set string with string key')
+
+ unlink('gdbm_hash_5')
.end
-CODE
-Wert
-Wert
-Wert
-Wert
-OUTPUT
-unlink('gdbm_hash_1');
# The value is a STRING.
# The key used for insertion is a PMC.
-pir_output_is( $new_hash_1 . << 'CODE', << 'OUTPUT', "set STRING with a PMC key" );
- hash_1 = "gdbm_hash_1"
+.sub test_set_string_with_pmc_key
+ .local pmc gdbmhash_lib
+ gdbmhash_lib = loadlib "gdbmhash"
+ .local pmc hash_1
+ hash_1 = new "GDBMHash"
+ hash_1 = "gdbm_hash_6"
.local pmc key_pmc
key_pmc = new 'String'
key_pmc = "Schluessel"
- hash_1[key_pmc] = "Wert\n"
+ hash_1[key_pmc] = "Wert"
.local pmc val_pmc
.local string val_string
val_string = hash_1["Schluessel"]
- print val_string
+ is(val_string, 'Wert', 'set string with pmc key')
val_pmc = hash_1["Schluessel"]
- print val_pmc
+ is(val_pmc, 'Wert', 'set string with pmc key')
.local pmc key2
key2 = new 'String'
key2 = "Schluessel"
val_string = hash_1[key2]
- print val_string
+ is(val_string, 'Wert', 'set string with pmc key')
val_pmc = hash_1[key2]
- print val_pmc
+ is(val_pmc, 'Wert', 'set string with pmc key')
+
+ unlink('gdbm_hash_6')
.end
-CODE
-Wert
-Wert
-Wert
-Wert
-OUTPUT
-unlink('gdbm_hash_1');
# The value is a PMC.
# The key used for insertion is a STRING.
-pir_output_is( $new_hash_1 . << 'CODE', << 'OUTPUT', "set PMC with STRING key" );
- hash_1 = "gdbm_hash_1"
+.sub test_set_pmc_with_string_key
+ .local pmc gdbmhash_lib
+ gdbmhash_lib = loadlib "gdbmhash"
+ .local pmc hash_1
+ hash_1 = new "GDBMHash"
+ hash_1 = "gdbm_hash_7"
.local pmc val
val = new 'String'
- val = "Wert\n"
+ val = "Wert"
hash_1["Schluessel"] = val
.local pmc val_pmc
.local string val_string
val_string = hash_1["Schluessel"]
- print val_string
+ is(val_string, 'Wert', 'set pmc with string key')
val_pmc = hash_1["Schluessel"]
- print val_pmc
+ is(val_pmc, 'Wert', 'set pmc with string key')
.local pmc key_out
key_out = new 'String'
key_out = "Schluessel"
val_string = hash_1[key_out]
- print val_string
+ is(val_string, 'Wert', 'set pmc with string key')
val_pmc = hash_1[key_out]
- print val_pmc
+ is(val_pmc, 'Wert', 'set pmc with string key')
+
+ unlink('gdbm_hash_7')
.end
-CODE
-Wert
-Wert
-Wert
-Wert
-OUTPUT
-unlink('gdbm_hash_1');
# The value is a PMC.
# The key used for insertion is a PMC.
-pir_output_is( $new_hash_1 . << 'CODE', << 'OUTPUT', "set PMC with a PMC key" );
- hash_1 = "gdbm_hash_1"
+.sub test_set_pmc_with_pmc_key
+ .local pmc gdbmhash_lib
+ gdbmhash_lib = loadlib "gdbmhash"
+ .local pmc hash_1
+ hash_1 = new "GDBMHash"
+ hash_1 = "gdbm_hash_8"
.local pmc val
val = new 'String'
- val = "Wert\n"
+ val = "Wert"
.local pmc key_pmc
key_pmc = new 'String'
key_pmc = "Schluessel"
@@ -337,29 +324,28 @@
.local string val_string
val_string = hash_1["Schluessel"]
- print val_string
+ is(val_string, 'Wert', 'set pmc with pmc key')
val_pmc = hash_1["Schluessel"]
- print val_pmc
+ is(val_pmc, 'Wert', 'set pmc with pmc key')
.local pmc key2
key2 = new 'String'
key2 = "Schluessel"
val_string = hash_1[key2]
- print val_string
+ is(val_string, 'Wert', 'set pmc with pmc key')
val_pmc = hash_1[key2]
- print val_pmc
+ is(val_pmc, 'Wert', 'set pmc with pmc key')
+
+ unlink('gdbm_hash_8')
.end
-CODE
-Wert
-Wert
-Wert
-Wert
-OUTPUT
-unlink('gdbm_hash_1');
# The value is an INTVAL
# The key used for insertion is a STRING.
-pir_output_is( $new_hash_1 . << 'CODE', << 'OUTPUT', "set INTVAL with STRING key" );
- hash_1 = "gdbm_hash_1"
+.sub test_set_intval_with_string_key
+ .local pmc gdbmhash_lib
+ gdbmhash_lib = loadlib "gdbmhash"
+ .local pmc hash_1
+ hash_1 = new "GDBMHash"
+ hash_1 = "gdbm_hash_9"
hash_1["Schluessel"] = -11012005
@@ -367,33 +353,28 @@
.local string val_string
val_string = hash_1["Schluessel"]
- print val_string
- print "\n"
+ is(val_string, -11012005, 'set intval with a string key')
val_pmc = hash_1["Schluessel"]
- print val_pmc
- print "\n"
+ is(val_pmc, -11012005, 'set intval with a string key')
.local pmc key_out
key_out = new 'String'
key_out = "Schluessel"
val_string = hash_1[key_out]
- print val_string
- print "\n"
+ is(val_string, -11012005, 'set intval with a string key')
val_pmc = hash_1[key_out]
- print val_pmc
- print "\n"
+ is(val_pmc, -11012005, 'set intval with a string key')
+
+ unlink('gdbm_hash_9')
.end
-CODE
--11012005
--11012005
--11012005
--11012005
-OUTPUT
-unlink('gdbm_hash_1');
# The value is a FLOATVAL.
# The key used for insertion is a PMC.
-pir_output_is( $new_hash_1 . << 'CODE', << 'OUTPUT', "set FLOATVAL with a PMC key" );
- hash_1 = "gdbm_hash_1"
+.sub test_set_floatval_with_pmc_key
+ .local pmc gdbmhash_lib
+ gdbmhash_lib = loadlib "gdbmhash"
+ .local pmc hash_1
+ hash_1 = new "GDBMHash"
+ hash_1 = "gdbm_hash_10"
.local pmc key_pmc
key_pmc = new 'String'
@@ -404,62 +385,46 @@
.local string val_string
val_string = hash_1["Schluessel"]
- print val_string
- print "\n"
+ is(val_string, -1101.2005, 'set float with a pmc key')
val_pmc = hash_1["Schluessel"]
- print val_pmc
- print "\n"
+ is(val_pmc, -1101.2005, 'set float with a pmc key')
.local pmc key2
key2 = new 'String'
key2 = "Schluessel"
val_string = hash_1[key2]
- print val_string
- print "\n"
+ is(val_string, -1101.2005, 'set float with a pmc key')
val_pmc = hash_1[key2]
- print val_pmc
- print "\n"
+ is(val_pmc, -1101.2005, 'set float with a pmc key')
+
+ unlink('gdbm_hash_10')
.end
-CODE
--1101.2005
--1101.2005
--1101.2005
--1101.2005
-OUTPUT
-unlink('gdbm_hash_1');
-pir_output_is( $new_hash_1 . << 'CODE', << 'OUTPUT', "delete_keyed" );
- hash_1 = "gdbm_hash_1"
+.sub test_delete_keyed
+ .local pmc gdbmhash_lib
+ gdbmhash_lib = loadlib "gdbmhash"
+ .local pmc hash_1
+ hash_1 = new "GDBMHash"
+ hash_1 = "gdbm_hash_11"
.local int exist_flag
.local int hash_size
exist_flag = exists hash_1["a"]
- print '"a" exists: '
- print exist_flag
- print "\n"
+ is(exist_flag, 0, 'delete keyed')
hash_1["a"] = "A"
exist_flag = exists hash_1["a"]
- print '"a" exists: '
- print exist_flag
- print "\n"
+ is(exist_flag, 1, 'delete keyed')
delete hash_1["a"]
exist_flag = exists hash_1["a"]
- print '"a" exists: '
- print exist_flag
- print "\n"
-.end
-CODE
-"a" exists: 0
-"a" exists: 1
-"a" exists: 0
-OUTPUT
-unlink('gdbm_hash_1');
+ is(exist_flag, 0, 'delete keyed')
+
+ unlink('gdbm_hash_11')
+.end
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/dynpmc/rational.t
==============================================================================
--- branches/rm_cflags/t/dynpmc/rational.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/dynpmc/rational.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -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/rm_cflags/t/dynpmc/subproxy.t
==============================================================================
--- branches/rm_cflags/t/dynpmc/subproxy.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/dynpmc/subproxy.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2005-2009, Parrot Foundation.
+# Copyright (C) 2005-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -65,8 +65,7 @@
.end
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4 filetype=pir:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/examples/catchall.t
==============================================================================
--- branches/rm_cflags/t/examples/catchall.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/examples/catchall.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!perl
-# Copyright (C) 2007-2008 Parrot Foundation.
+# Copyright (C) 2007-2010, Parrot Foundation.
# $Id$
use strict;
@@ -30,7 +30,7 @@
my $manifest = maniread('MANIFEST');
my %files;
foreach my $file (keys %$manifest) {
- next unless $file =~ m{^examples/.*(pir|pasm)$};
+ next unless $file =~ m{^examples/.*(pir|pasm)$};
next if $file =~ m{^examples/tutorial}; # all are tested in tutorial.t
next if $file =~ m{^examples/pir/befunge}; # language, not testable here
next if $file =~ m{^examples/languages}; # language, not testable here
@@ -43,7 +43,7 @@
plan tests => scalar keys %files;
foreach my $file (sort keys %files) {
- my $cmd = File::Spec->curdir() . $PConfig{slash} .
+ my $cmd = File::Spec->curdir() . $PConfig{slash} .
$PConfig{test_prog} . " -o " . File::Spec->devnull() . " " .
$file;
Modified: branches/rm_cflags/t/examples/pod.t
==============================================================================
--- branches/rm_cflags/t/examples/pod.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/examples/pod.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! perl
-# Copyright (C) 2009, The Perl Foundation.
+# Copyright (C) 2009-2010, Parrot Foundation.
# $Id$
use strict;
@@ -58,27 +58,27 @@
my $cmd = File::Spec->curdir() . $PConfig{slash} .
$PConfig{test_prog} . " -o " . File::Spec->devnull() . " " .
$tempfile . ' 2> ' . $err_tempfile;
-
+
my $description = join (':', map {$snippet->{$_}}
qw(file line type modifier));
my $rc = system($cmd);
open my $errout_fh, '<', $err_tempfile;
- my $error_output;
+ my $error_output;
{
undef local $/;
$error_output = <$errout_fh>;
}
-
+
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);
- }
+ }
}
sub get_samples {
@@ -112,7 +112,7 @@
$snippet->{line} = $.;
$snippet->{type} = $2;
$snippet->{modifier} = defined($4) ? $4 : '';
- $target = $1;
+ $target = $1;
}
}
@@ -152,7 +152,7 @@
C<PASM> and C<PIR> are both valid target languages.
-Additionally, you can add the following modifiers (prepending with an
+Additionally, you can add the following modifiers (prepending with an
underscore).
=over 4
@@ -173,7 +173,7 @@
to be updated:
=begin PIR_FRAGMENT_INVALID
-
+
find_type $I1, 'Integer'
=end PIR_FRAGMENT_INVALID
Modified: branches/rm_cflags/t/examples/tutorial.t
==============================================================================
--- branches/rm_cflags/t/examples/tutorial.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/examples/tutorial.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!perl
-# Copyright (C) 2007-2008 Parrot Foundation.
+# Copyright (C) 2007-2010, Parrot Foundation.
# $Id$
use strict;
@@ -27,7 +27,7 @@
my $manifest = maniread('MANIFEST');
my %files;
foreach my $file (keys %$manifest) {
- next unless $file =~ m{examples/tutorial/.*pir$};
+ next unless $file =~ m{examples/tutorial/.*pir$};
$files{$file}=undef;
}
@@ -244,7 +244,8 @@
@todo = (todo => $reason) if defined $reason;
}
example_output_is( $tutorial, $expected, @todo );
- } else {
+ }
+ else {
fail($tutorial);
}
}
Modified: branches/rm_cflags/t/library/cgi_query_hash.t
==============================================================================
--- branches/rm_cflags/t/library/cgi_query_hash.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/library/cgi_query_hash.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,6 @@
#!./parrot
-# Copyright (C) 2006-2008, Parrot Foundation.
+# Copyright (C) 2006-2010, Parrot Foundation.
+# $Id$
=head1 NAME
Modified: branches/rm_cflags/t/library/configure.t
==============================================================================
--- branches/rm_cflags/t/library/configure.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/library/configure.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!parrot
-# Copyright (C) 2009, Parrot Foundation.
+# Copyright (C) 2009-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -159,8 +159,7 @@
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/library/getopt_obj.t
==============================================================================
--- branches/rm_cflags/t/library/getopt_obj.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/library/getopt_obj.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!perl
-# Copyright (C) 2001-2008, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
use strict;
Modified: branches/rm_cflags/t/library/md5.t
==============================================================================
--- branches/rm_cflags/t/library/md5.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/library/md5.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!parrot
-# Copyright (C) 2001-2009, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -682,8 +682,7 @@
.end
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4 filetype=pir:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/library/mime_base64.t
==============================================================================
--- branches/rm_cflags/t/library/mime_base64.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/library/mime_base64.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,6 @@
#!./parrot
-# Copyright (C) 2006-2008, Parrot Foundation.
+# Copyright (C) 2006-2010, Parrot Foundation.
+# $Id$
=head1 NAME
Modified: branches/rm_cflags/t/library/p6object.t
==============================================================================
--- branches/rm_cflags/t/library/p6object.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/library/p6object.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!./parrot
-# Copyright (C) 2001-2009, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -165,7 +165,7 @@
jklobj = new ['Foo';'JKL']
$S0 = jklobj.'bar'()
is($S0, 'ABC::foo', 'JKL.bar via add_method')
-
+
.local pmc hll_tests
hll_tests = get_root_global ['myhll'], 'hll_tests'
hll_tests()
@@ -174,7 +174,7 @@
$P0 = p6meta.'new_class'('OMG::Lol')
omgproto = get_hll_global ['OMG'], 'Lol'
omgprotoexport = get_hll_global ['OMG';'EXPORT';'ALL'], 'Lol'
- is_same(omgproto,omgprotoexport,'protoobject added to ["EXPORT";"ALL"] subnamespace')
+ is_same(omgproto,omgprotoexport,'protoobject added to ["EXPORT";"ALL"] subnamespace')
.return ()
.end
@@ -496,7 +496,7 @@
p6obj_tests(wxyproto, 'WXY', 'isa'=>'WXY P6object', 'can'=>'foo', 'who'=>wxyns)
## build a Parrotclass
- .local pmc vwx_nsarray, vwx_ns, vwx_parrotclass, vwx_proto
+ .local pmc vwx_nsarray, vwx_ns, vwx_parrotclass, vwx_proto
vwx_nsarray = new 'ResizablePMCArray'
push vwx_nsarray, 'VWX'
vwx_ns = get_hll_namespace vwx_nsarray
@@ -523,3 +523,9 @@
=back
=cut
+
+# Local Variables:
+# mode: pir
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/library/parrotlib.t
==============================================================================
--- branches/rm_cflags/t/library/parrotlib.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/library/parrotlib.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!parrot
-# Copyright (C) 2001-2009, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -107,8 +107,7 @@
=cut
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4 filetype=pir:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/library/pg.t
==============================================================================
--- branches/rm_cflags/t/library/pg.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/library/pg.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!./parrot
-# Copyright (C) 2006-2008, Parrot Foundation.
+# Copyright (C) 2006-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -226,7 +226,7 @@
test.'ok'($I0, 'con is false after finish')
test.'finish'()
end
-no_pg:
+no_pg:
.local pmc ex
.local string msg
.get_results(ex)
Modified: branches/rm_cflags/t/library/protoobject.t
==============================================================================
--- branches/rm_cflags/t/library/protoobject.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/library/protoobject.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!parrot
-# Copyright (C) 2001-2009, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -146,8 +146,7 @@
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4 filetype=pir:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/library/rand.t
==============================================================================
--- branches/rm_cflags/t/library/rand.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/library/rand.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!parrot
-# Copyright (C) 2009, Parrot Foundation.
+# Copyright (C) 2009-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -55,8 +55,7 @@
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/library/tcl_glob.t
==============================================================================
--- branches/rm_cflags/t/library/tcl_glob.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/library/tcl_glob.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!./parrot
-# Copyright (C) 2008, Parrot Foundation.
+# Copyright (C) 2008-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -106,3 +106,9 @@
.return(boolean)
.end
+
+# Local Variables:
+# mode: pir
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/library/test_class.t
==============================================================================
--- branches/rm_cflags/t/library/test_class.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/library/test_class.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,4 +1,6 @@
#! parrot
+# Copyright (C) 2008-2010, Parrot Foundation.
+# $Id$
.sub 'init_test_builder_tester'
load_bytecode 'Test/Builder/Tester.pbc'
@@ -96,3 +98,9 @@
ok( 4, 'bar second' )
ok( 5, 'bar third' )
.end
+
+# Local Variables:
+# mode: pir
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/library/test_more.t
==============================================================================
--- branches/rm_cflags/t/library/test_more.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/library/test_more.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!parrot
-# Copyright (C) 2005-2009, Parrot Foundation.
+# Copyright (C) 2005-2010, Parrot Foundation.
# $Id$
.sub _main :main
@@ -371,13 +371,13 @@
test_diag( expected )
is( left, right, 'comparing two pmcs' )
test_test( 'failing test is() for pmcs with description' )
-
+
test_pass( 'comparing two nulls' )
null left
null right
is( left, right, 'comparing two nulls' )
test_test( 'passing test is() for nulls')
-
+
test_fail('comparing null with Int')
null left
right = box 1
@@ -385,7 +385,7 @@
test_diag( 'Have: null' )
test_diag( 'Want: 1' )
test_test('failing test is() for null vs. pmc 1')
-
+
test_fail('comparing Int with null')
left = box 10
null right
@@ -401,7 +401,7 @@
test_diag( 'Have: null' )
test_diag( 'Want: 1.01' )
test_test('failing test is() for null vs. pmc 1.01')
-
+
test_fail('comparing Float with null')
left = box 2.787
null right
@@ -417,7 +417,7 @@
test_diag( 'Have: null' )
test_diag( 'Want: September, when it comes' )
test_test('failing test is() for null vs. String pmc')
-
+
test_fail('comparing String with null')
left = box 'I cannot move a mountain now'
null right
@@ -873,6 +873,7 @@
test_diag( "Want: null" )
test_test( 'failing test is_null for String pmc')
.end
+
# Local Variables:
# mode: pir
# fill-column: 100
Modified: branches/rm_cflags/t/library/uuid.t
==============================================================================
--- branches/rm_cflags/t/library/uuid.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/library/uuid.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!parrot
-# Copyright (C) 2008-2009, Parrot Foundation.
+# Copyright (C) 2008-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -124,8 +124,7 @@
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4 filetype=pir:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/manifest/01-basic.t
==============================================================================
--- branches/rm_cflags/t/manifest/01-basic.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/manifest/01-basic.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! perl
-# Copyright (C) 2007, Parrot Foundation.
+# Copyright (C) 2007-2010, Parrot Foundation.
# $Id$
# 01-basic.t
@@ -19,22 +19,22 @@
unless (-e 'DEVELOPING');
use_ok('Parrot::Manifest');
-
+
my $script = $0;
my $file = q{MANIFEST};
my $skip = q{MANIFEST.SKIP};
-
+
my $mani = Parrot::Manifest->new( { script => $script, } );
isa_ok( $mani, 'Parrot::Manifest' );
-
+
ok( scalar( @{ $mani->{dirs} } ),
"Parrot::Manifest constructor used 'status' command to find at least 1 directory." );
ok( scalar( @{ $mani->{versioned_files} } ),
"Parrot::Manifest constructor used 'status' command to find at least 1 versioned file." );
-
+
my $manifest_lines_ref = $mani->prepare_manifest();
is( ref($manifest_lines_ref), q{HASH}, "prepare_manifest() returned hash ref" );
-
+
my $cwd = cwd();
{
my $tdir = tempdir( CLEANUP => 1 );
@@ -46,10 +46,10 @@
chdir $cwd
or croak "Unable to change back from temporary directory after testing";
}
-
+
my $print_str = $mani->prepare_manifest_skip();
ok( $print_str, "prepare_manifest_skip() returned" );
-
+
{
my $tdir = tempdir( CLEANUP => 1 );
chdir $tdir
Modified: branches/rm_cflags/t/manifest/02-regenerate_file.t
==============================================================================
--- branches/rm_cflags/t/manifest/02-regenerate_file.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/manifest/02-regenerate_file.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! perl
-# Copyright (C) 2007, Parrot Foundation.
+# Copyright (C) 2007-2010, Parrot Foundation.
# $Id$
# 02-regenerate_file.t
@@ -21,17 +21,17 @@
unless (-e 'DEVELOPING');
use_ok('Parrot::Manifest');
-
+
my $script = $0;
my $mani = Parrot::Manifest->new( { script => $script, } );
isa_ok( $mani, 'Parrot::Manifest' );
-
+
my $cwd = cwd();
my $f = q{MANIFEST};
-
+
my $manifest_lines_ref = $mani->prepare_manifest();
ok( $manifest_lines_ref, "prepare_manifest_skip() returned" );
-
+
# 1: Copy the real MANIFEST unaltered to the tempdir.
# Assuming the real MANIFEST was correct going in to this test, the
# absence of any change in it will mean that there will be no need to
@@ -49,7 +49,7 @@
or croak "Unable to change back from temporary directory after testing";
unlink qq{$tdir/$f} or croak "Unable to delete file from tempdir";
}
-
+
# 2: Copy the real MANIFEST to the tempdir but mangle it there.
# The alteration in the copied MANIFEST will be sufficient to require
# regeneration of MANIFEST. And for good measure, toss in a line of all
@@ -64,7 +64,7 @@
my @lines;
tie @lines, 'Tie::File', qq{$tdir/$f}
or croak "Unable to tie to $f in tempdir";
-
+
for ( 1 .. 10 ) {
if ( defined( $lines[-1] ) ) {
pop @lines;
@@ -81,7 +81,7 @@
chdir $cwd
or croak "Unable to change back from temporary directory after testing";
}
-
+
# 3: Go to a tempdir which lacks a MANIFEST. Confirm that you need to
# regenerate MANIFEST (but do not bother to actually do it there).
{
Modified: branches/rm_cflags/t/manifest/03-regenerate_skip.t
==============================================================================
--- branches/rm_cflags/t/manifest/03-regenerate_skip.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/manifest/03-regenerate_skip.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! perl
-# Copyright (C) 2007, Parrot Foundation.
+# Copyright (C) 2007-2010, Parrot Foundation.
# $Id$
# 03-regenerate_skip.t
@@ -21,16 +21,16 @@
unless (-e 'DEVELOPING');
use_ok('Parrot::Manifest');
-
+
my $script = $0;
my $mani = Parrot::Manifest->new( { script => $script, } );
isa_ok( $mani, 'Parrot::Manifest' );
-
+
my $cwd = cwd();
my $sk = q{MANIFEST.SKIP};
my $print_str = $mani->prepare_manifest_skip();
ok( $print_str, "prepare_manifest_skip() returned" );
-
+
# 1: Copy the real MANIFEST.SKIP unaltered to the tempdir.
# Assuming the real MANIFEST.SKIP was correct going in to this test, the
# absence of any change in it will mean that there will be no need to
@@ -48,7 +48,7 @@
chdir $cwd
or croak "Unable to change back from temporary directory after testing";
}
-
+
# 2: Copy the real MANIFEST.SKIP to the tempdir but mangle it there.
# The alteration in the copied MANIFEST.SKIP will be sufficient to require
# regeneration of MANIFEST.SKIP.
@@ -62,7 +62,7 @@
my @lines;
tie @lines, 'Tie::File', qq{$tdir/$sk}
or croak "Unable to tie to $sk in tempdir";
-
+
for ( 1 .. 10 ) {
if ( defined( $lines[-1] ) ) {
pop @lines;
Modified: branches/rm_cflags/t/manifest/04-alt_file.t
==============================================================================
--- branches/rm_cflags/t/manifest/04-alt_file.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/manifest/04-alt_file.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! perl
-# Copyright (C) 2007, Parrot Foundation.
+# Copyright (C) 2007-2010, Parrot Foundation.
# $Id$
# 04-alt_file.t
@@ -17,10 +17,10 @@
unless (-e 'DEVELOPING');
use_ok('Parrot::Manifest');
-
+
my $script = $0;
my $g = q{something_other_than_MANIFEST};
-
+
my $mani = Parrot::Manifest->new(
{
script => $script,
@@ -28,10 +28,10 @@
}
);
isa_ok( $mani, 'Parrot::Manifest' );
-
+
my $manifest_lines_ref = $mani->prepare_manifest();
ok( $manifest_lines_ref, "prepare_manifest_skip() returned" );
-
+
ok( !-f $g, "No $g found" );
my $need_for_file = $mani->determine_need_for_manifest($manifest_lines_ref);
ok( $need_for_file, "Need to regenerate $g" );
Modified: branches/rm_cflags/t/manifest/05-alt_skip.t
==============================================================================
--- branches/rm_cflags/t/manifest/05-alt_skip.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/manifest/05-alt_skip.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! perl
-# Copyright (C) 2007, Parrot Foundation.
+# Copyright (C) 2007-2010, Parrot Foundation.
# $Id$
# 05-alt_skip.t
@@ -17,10 +17,10 @@
unless (-e 'DEVELOPING');
use_ok('Parrot::Manifest');
-
+
my $script = $0;
my $g = q{something_other_than_MANIFEST.SKIP};
-
+
my $mani = Parrot::Manifest->new(
{
script => $script,
@@ -28,10 +28,10 @@
}
);
isa_ok( $mani, 'Parrot::Manifest' );
-
+
my $print_str = $mani->prepare_manifest_skip();
ok( $print_str, "prepare_manifest_skip() returned" );
-
+
ok( !-f $g, "No $g found" );
my $need_for_skip = $mani->determine_need_for_manifest_skip($print_str);
ok( $need_for_skip, "Need to regenerate $g" );
Modified: branches/rm_cflags/t/native_pbc/header.t
==============================================================================
--- branches/rm_cflags/t/native_pbc/header.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/native_pbc/header.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! perl
-# Copyright (C) 2001-2005, 2009 Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
use strict;
Modified: branches/rm_cflags/t/native_pbc/integer.t
==============================================================================
--- branches/rm_cflags/t/native_pbc/integer.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/native_pbc/integer.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! perl
-# Copyright (C) 2001-2005,2009 Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
use strict;
@@ -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/rm_cflags/t/native_pbc/number.t
==============================================================================
--- branches/rm_cflags/t/native_pbc/number.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/native_pbc/number.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -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/rm_cflags/t/native_pbc/string.t
==============================================================================
--- branches/rm_cflags/t/native_pbc/string.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/native_pbc/string.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! perl
-# Copyright (C) 2001-2005,2009 Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
use strict;
@@ -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/rm_cflags/t/oo/attributes.t
==============================================================================
--- branches/rm_cflags/t/oo/attributes.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/oo/attributes.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2008, Parrot Foundation.
+# Copyright (C) 2008-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -71,3 +71,9 @@
is(message, "No such attribute 'data'", 'class attribute deleted')
.end
+
+# Local Variables:
+# mode: pir
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/oo/composition.t
==============================================================================
--- branches/rm_cflags/t/oo/composition.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/oo/composition.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2007, Parrot Foundation.
+# Copyright (C) 2007-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -173,7 +173,7 @@
eh = new 'ExceptionHandler'
eh.'handle_types'(.EXCEPTION_ROLE_COMPOSITION_METHOD_CONFLICT)
set_addr eh, catch
-
+
push_eh eh
$P1.'add_role'($P0)
$I0 = 1
Modified: branches/rm_cflags/t/oo/inheritance.t
==============================================================================
--- branches/rm_cflags/t/oo/inheritance.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/oo/inheritance.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2008, Parrot Foundation.
+# Copyright (C) 2008-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -121,3 +121,9 @@
ok( $I1, 'diamond')
fail:
.end
+
+# Local Variables:
+# mode: pir
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/oo/metamodel.t
==============================================================================
--- branches/rm_cflags/t/oo/metamodel.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/oo/metamodel.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!parrot
-# Copyright (C) 2007-2008, Parrot Foundation.
+# Copyright (C) 2007-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -71,9 +71,9 @@
unless $I0 goto FAILTAIL
is($P1, "long", "tail attribute has expected value")
goto NEXTTAIL
-FAILTAIL:
+FAILTAIL:
fail("no attribute")
-NEXTTAIL:
+NEXTTAIL:
$P1 = getattribute $P0, "bark"
$I0 = defined $P1
@@ -81,9 +81,9 @@
unless $I0 goto FAIL
is($P1, "Wooof", "bark attribute has expected value")
goto NEXT
-FAIL:
+FAIL:
fail("no attribute")
-NEXT:
+NEXT:
todo(0, "new opcode makes working objects", "not implemented")
# $P0 = new "Dog"
Modified: branches/rm_cflags/t/oo/methods.t
==============================================================================
--- branches/rm_cflags/t/oo/methods.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/oo/methods.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2007 - 2008, Parrot Foundation.
+# Copyright (C) 2007-2010, Parrot Foundation.
# $Id$
=head1 NAME
Modified: branches/rm_cflags/t/oo/mro-c3.t
==============================================================================
--- branches/rm_cflags/t/oo/mro-c3.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/oo/mro-c3.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2007, Parrot Foundation.
+# Copyright (C) 2007-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -95,24 +95,24 @@
.sub multiple_inheritance
.local pmc A, B, C
-
+
A = newclass 'MIA'
$P0 = get_global 'method_A'
A.'add_method'('foo', $P0)
A.'add_method'('bar', $P0)
A.'add_method'('baz', $P0)
-
+
B = newclass 'MIB'
$P0 = get_global 'method_B'
B.'add_method'('foo', $P0)
B.'add_method'('bar', $P0)
-
+
C = newclass 'MIC'
C.'add_parent'(B)
C.'add_parent'(A)
$P0 = get_global 'method_C'
C.'add_method'('foo', $P0)
-
+
$P0 = C.'new'()
$S0 = $P0.'foo'()
$S1 = $P0.'bar'()
@@ -187,7 +187,7 @@
$P0 = A.'new'()
$S0 = $P0.'bar'()
is($S0, 'Method from B', 'Merge Two Pairs - Method A.bar added from B')
-
+
.return ()
test_fail:
Modified: branches/rm_cflags/t/oo/names.t
==============================================================================
--- branches/rm_cflags/t/oo/names.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/oo/names.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2007-2008, Parrot Foundation.
+# Copyright (C) 2007-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -46,12 +46,12 @@
$S0 = $P0
ok (1, 'HLL obj created w/ same name as parrot obj')
.return()
-OK_1:
+OK_1:
ok (0, 'HLL obj w/ same name as parrot obj not created')
.end
# Local Variables:
-# mode: pir
+# mode: pir
# fill-column: 100
# End:
# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/oo/new-old.t
==============================================================================
--- branches/rm_cflags/t/oo/new-old.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/oo/new-old.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! perl
-# Copyright (C) 2009, Parrot Foundation.
+# Copyright (C) 2009-2010, Parrot Foundation.
# $Id$
use strict;
@@ -19,7 +19,7 @@
=head1 DESCRIPTION
-Tests instantiation
+Tests instantiation
=cut
@@ -56,3 +56,10 @@
CODE
ok #test exception from init vtable
OUT
+
+# Local Variables:
+# mode: cperl
+# cperl-indent-level: 4
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:
Modified: branches/rm_cflags/t/oo/new.t
==============================================================================
--- branches/rm_cflags/t/oo/new.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/oo/new.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2007-2009, Parrot Foundation.
+# Copyright (C) 2007-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -52,7 +52,7 @@
#
.sub _test_instance
.param pmc obj
- .param string in_str
+ .param string in_str
# Set up local variables
.local pmc key_pmc
@@ -467,7 +467,7 @@
$P0 = new [ 'Foo'; 'Bar'; 'Baz' ]
$I0 = 1
goto finally
-
+
catch:
.local pmc exception
.get_results(exception)
Modified: branches/rm_cflags/t/oo/ops.t
==============================================================================
--- branches/rm_cflags/t/oo/ops.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/oo/ops.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2007, Parrot Foundation.
+# Copyright (C) 2007-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -18,7 +18,7 @@
.sub main :main
.include 'except_types.pasm'
- .include 'test_more.pir'
+ .include 'test_more.pir'
plan(18)
@@ -91,7 +91,7 @@
.end
-.sub op_get_class_p_p
+.sub op_get_class_p_p
$P0 = new 'Hash'
$P4 = new 'String'
$P4 = 'Ape'
@@ -177,7 +177,7 @@
.namespace ["Baz"]
.sub bar :method
- .return (1)
+ .return (1)
.end
# Local Variables:
Modified: branches/rm_cflags/t/oo/root_new.t
==============================================================================
--- branches/rm_cflags/t/oo/root_new.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/oo/root_new.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2007-2009, Parrot Foundation.
+# Copyright (C) 2007-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -33,7 +33,7 @@
#
.sub _test_instance
.param pmc obj
- .param string in_str
+ .param string in_str
# Set up local variables
.local pmc key_pmc
@@ -92,4 +92,10 @@
$P0 = root_new ['parrot';'Integer']
_test_instance($P0, 'Integer')
.end
-
+
+
+# Local Variables:
+# mode: pir
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/oo/subclass.t
==============================================================================
--- branches/rm_cflags/t/oo/subclass.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/oo/subclass.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2007-2008, Parrot Foundation.
+# Copyright (C) 2007-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -55,13 +55,13 @@
parent_class = newclass "PreFoo"
foo_class = subclass parent_class, "Foo"
- $S1 = typeof foo_class
+ $S1 = typeof foo_class
is ($S1, 'Class', 'created Foo as subclass of Pre')
$I3 = isa foo_class, "Class"
ok ($I3, 'Foo isa Class')
- foo_object = new foo_class
+ foo_object = new foo_class
$S1 = typeof foo_object
is ($S1, 'Foo', 'instance is typeof Foo')
@@ -142,7 +142,7 @@
.sub instance_from_class_object_method
# instantiate from class object method
- .local pmc parent_class, baz_class, baz_object
+ .local pmc parent_class, baz_class, baz_object
parent_class = newclass "PreBaz"
baz_class = subclass "PreBaz", "Baz"
baz_object = baz_class.'new'()
@@ -160,7 +160,7 @@
.sub instance_from_string_name
# instantiate from string name
- .local pmc parent_class, qux_class, qux_object
+ .local pmc parent_class, qux_class, qux_object
parent_class = newclass "PreQux"
qux_class = subclass "PreQux", "Qux"
qux_object = new 'Qux'
@@ -239,7 +239,7 @@
.end
-.sub instance_from_key_pmc_name
+.sub instance_from_key_pmc_name
# instantiate from key PMC name
.local pmc parent_class, barbaz_class, barbaz_object
parent_class = newclass "Snork"
Modified: branches/rm_cflags/t/op/00ff-dos.t
==============================================================================
--- branches/rm_cflags/t/op/00ff-dos.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/op/00ff-dos.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!parrot
-# Copyright (C) 2001-2009, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -42,8 +42,7 @@
.end
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4 filetype=pir:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/op/00ff-unix.t
==============================================================================
--- branches/rm_cflags/t/op/00ff-unix.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/op/00ff-unix.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!parrot
-# Copyright (C) 2001-2009, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -32,8 +32,7 @@
.end
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4 filetype=pir:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/op/64bit.t
==============================================================================
--- branches/rm_cflags/t/op/64bit.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/op/64bit.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!parrot
-# Copyright (C) 2001-2009, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -26,7 +26,7 @@
interp = getinterp
.local pmc config
config = interp[.IGLOBALS_CONFIG_HASH]
- .local int intvalsize
+ .local int intvalsize
intvalsize = config['intvalsize']
plan(5)
@@ -47,14 +47,14 @@
set $I0, 0xffffffffffffffff
is( $I0, -1, 'bitops64' )
-
+
set $I1, 0x00000000ffffffff
is( $I1, 4294967295, 'bitops64' )
-
+
set $I0, $I1
shl $I0, $I0, 32
is( $I0, -4294967296, 'bitops64' )
-
+
band $I2, $I0, $I1
is( $I2, 0, 'bitops64' )
@@ -64,7 +64,6 @@
# Local Variables:
# mode: pir
-# cperl-indent-level: 4
# fill-column: 100
# End:
# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/op/annotate.t
==============================================================================
--- branches/rm_cflags/t/op/annotate.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/op/annotate.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2009, Parrot Foundation.
+# Copyright (C) 2009-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -218,7 +218,7 @@
.get_results($P3)
pop_eh
$P3 = $P3.'backtrace'()
-
+
$P4 = $P3[0]
$P4 = $P4['annotations']
$S0 = $P4['file']
@@ -236,7 +236,7 @@
# Local Variables:
-# mode: pir
+# mode: pir
# fill-column: 100
# End:
# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/op/arithmetics.t
==============================================================================
--- branches/rm_cflags/t/op/arithmetics.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/op/arithmetics.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!parrot
-# Copyright (C) 2001-2009, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -567,7 +567,6 @@
# Local Variables:
# mode: pir
-# cperl-indent-level: 4
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4 ft=pir :
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/op/arithmetics_pmc.t
==============================================================================
--- branches/rm_cflags/t/op/arithmetics_pmc.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/op/arithmetics_pmc.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!parrot
-# Copyright (C) 2001-2009, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -391,7 +391,6 @@
# Local Variables:
# mode: pir
-# cperl-indent-level: 4
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4 ft=pir :
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/op/box.t
==============================================================================
--- branches/rm_cflags/t/op/box.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/op/box.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!parrot
-# Copyright (C) 2008-2009, Parrot Foundation.
+# Copyright (C) 2008-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -176,8 +176,7 @@
.end
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/op/calling.t
==============================================================================
--- branches/rm_cflags/t/op/calling.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/op/calling.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -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/rm_cflags/t/op/cc_params.t
==============================================================================
--- branches/rm_cflags/t/op/cc_params.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/op/cc_params.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!parrot
-# Copyright (C) 2009, Parrot Foundation.
+# Copyright (C) 2009-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -67,7 +67,7 @@
.namespace ['OMGClass']
.sub 'lolmethod' :method
.param pmc sig :call_sig
-
+
# Self is set up correctly.
$S0 = typeof self
is('OMGClass', $S0)
@@ -88,7 +88,7 @@
.sub 'wtfmethod' :method
.param pmc sig :call_sig
-
+
# Self is set up correctly.
$S0 = typeof self
is('OMGClass', $S0)
@@ -120,7 +120,6 @@
# Local Variables:
# mode: pir
-# cperl-indent-level: 4
# fill-column: 100
# End:
# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/op/comp.t
==============================================================================
--- branches/rm_cflags/t/op/comp.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/op/comp.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!parrot
-# Copyright (C) 2001-2009, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -160,8 +160,7 @@
.end
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4 filetype=pir:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/op/errorson.t
==============================================================================
--- branches/rm_cflags/t/op/errorson.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/op/errorson.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -42,7 +42,6 @@
# Local Variables:
# mode: pir
-# cperl-indent-level: 4
# fill-column: 100
# End:
# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/op/exit.t
==============================================================================
--- branches/rm_cflags/t/op/exit.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/op/exit.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -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/rm_cflags/t/op/fetch.t
==============================================================================
--- branches/rm_cflags/t/op/fetch.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/op/fetch.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!parrot
-# Copyright (C) 2009, Parrot Foundation.
+# Copyright (C) 2009-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -102,7 +102,6 @@
# Local Variables:
# mode: pir
-# cperl-indent-level: 4
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4 ft=pir :
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/op/gc-leaky.t
==============================================================================
--- branches/rm_cflags/t/op/gc-leaky.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/op/gc-leaky.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -70,4 +70,4 @@
# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/op/gc.t
==============================================================================
--- branches/rm_cflags/t/op/gc.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/op/gc.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2001-2009, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -542,8 +542,7 @@
F<examples/benchmarks/primes2.py>.
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4 filetype=pir:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/op/inf_nan.t
==============================================================================
--- branches/rm_cflags/t/op/inf_nan.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/op/inf_nan.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2009, Parrot Foundation.
+# Copyright (C) 2009-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -500,8 +500,7 @@
.end
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4 filetype=pir:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/op/integer.t
==============================================================================
--- branches/rm_cflags/t/op/integer.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/op/integer.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!parrot
-# Copyright (C) 2001-2009, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -691,7 +691,7 @@
$I2 = xor $I1, $I1
is($I2, 0, 'xor - nilpotent on 2')
-
+
$I2 = xor $I2, $I2
is($I2, 0, 'xor - nilpotent on other')
.end
Modified: branches/rm_cflags/t/op/literal.t
==============================================================================
--- branches/rm_cflags/t/op/literal.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/op/literal.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!parrot
-# Copyright (C) 2001-2005, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -33,7 +33,6 @@
# Local Variables:
# mode: pir
-# cperl-indent-level: 4
# fill-column: 100
# End:
# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/op/number.t
==============================================================================
--- branches/rm_cflags/t/op/number.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/op/number.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!parrot
-# Copyright (C) 2001-2009, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -935,7 +935,6 @@
# Local Variables:
# mode: pir
-# cperl-indent-level: 4
# fill-column: 100
# End:
# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/op/sprintf2.t
==============================================================================
--- branches/rm_cflags/t/op/sprintf2.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/op/sprintf2.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2001-2009, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -120,7 +120,6 @@
# Local Variables:
# mode: pir
-# cperl-indent-level: 4
# fill-column: 100
# End:
# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/op/string.t
==============================================================================
--- branches/rm_cflags/t/op/string.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/op/string.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!parrot
-# Copyright (C) 2001-2009, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -182,25 +182,25 @@
.sub set_s_s_sc
set $S4, "JAPH"
set $S5, $S4
-
+
is( $S4, "JAPH", '' )
is( $S5, "JAPH", '' )
.end
-
+
.sub test_clone
set $S0, "Foo1"
clone $S1, $S0
-
+
is( $S0, "Foo1", '' )
is( $S1, "Foo1", '' )
-
+
clone $S1, "Bar1"
is( $S1, "Bar1", '' )
- chopn $S1, 1
+ chopn $S1, 1
is( $S1, "Bar", 'the contents of $S1 are no longer constant' )
.end
-
+
.sub clone_null
null $S0
clone $S1, $S0
@@ -235,7 +235,7 @@
is( $S5, "japh", '' )
is( $S3, "JAPHxyzw", '' )
.end
-
+
.sub chopn_with_set
set $S4, "JAPHxyzw"
set $S5, "japhXYZW"
@@ -265,44 +265,44 @@
chopn $S1, 1000
is( $S1, "", '' )
.end
-
+
.sub three_argument_chopn
set $S1, "Parrot"
chopn $S2, $S1, 0
is( $S1, "Parrot", '' )
is( $S2, "Parrot", '' )
-
+
chopn $S2, $S1, 1
is( $S1, "Parrot", '' )
is( $S2, "Parro", '' )
-
+
set $I0, 2
chopn $S2, $S1, $I0
is( $S1, "Parrot", '' )
is( $S2, "Parr", '' )
-
+
chopn $S2, "Parrot", 3
is( $S2, "Par", '' )
-
+
chopn $S1, $S1, 5
is( $S1, "P", '' )
-
+
set $S1, "Parrot"
set $S3, $S1
chopn $S2, $S1, 3
is( $S3, "Parrot", '' )
-
+
set $S3, $S1
chopn $S1, 3
is( $S3, "Par", '' )
.end
-#
+#
.sub three_argument_chopn__oob_values
set $S1, "Parrot"
chopn $S2, $S1, 7
is( $S1, "Parrot", '' )
is( $S2, "", '' )
-
+
chopn $S2, $S1, -1
is( $S1, "Parrot", '' )
is( $S2, "P", '' )
@@ -347,7 +347,7 @@
is( $S0, "A string of length 21", '' )
is( $S1, "length", '' )
.end
-
+
# This asks for substring that shouldn't be allowed...
.sub exception_substr_oob
set $S0, "A string of length 21"
@@ -389,7 +389,7 @@
is( $S0, "A string of length 21", '' )
is( $S1, "length 21", '' )
.end
-
+
.sub five_arg_substr_w_rep_eq_length
set $S0, "abcdefghijk"
set $S1, "xyz"
@@ -890,20 +890,20 @@
repeat $S1, $S0, 12
is( $S0, "x", 'repeat_s_s|sc_i|ic' )
is( $S1, "xxxxxxxxxxxx", 'repeat_s_s|sc_i|ic' )
-
+
set $I0, 12
set $S2, "X"
repeat $S3, $S2, $I0
is( $S2, "X", 'repeat_s_s|sc_i|ic' )
is( $S3, "XXXXXXXXXXXX", 'repeat_s_s|sc_i|ic' )
-
+
repeat $S4, "~", 12
is( $S4, "~~~~~~~~~~~~", 'repeat_s_s|sc_i|ic' )
-
+
repeat $S5, "~", $I0
is( $S5, "~~~~~~~~~~~~", 'repeat_s_s|sc_i|ic' )
-
-
+
+
repeat $S6, "***", 0
is( $S6, "", 'repeat_s_s|sc_i|ic' )
.end
@@ -951,7 +951,7 @@
set $S1, "rot"
index $I1, $S0, $S1
is( $I1, "3", 'index, 3-arg form' )
-
+
set $S1, "bar"
index $I1, $S0, $S1
is( $I1, "-1", 'index, 3-arg form' )
@@ -962,10 +962,10 @@
set $S1, "ar"
index $I1, $S0, $S1, 0
is( $I1, "1", 'index, 4-arg form' )
-
+
index $I1, $S0, $S1, 2
is( $I1, "4", 'index, 4-arg form' )
-
+
set $S1, "qwx"
index $I1, $S0, $S1, 0
is( $I1, "-1", 'index, 4-arg form' )
@@ -976,7 +976,7 @@
set $S0, " is "
index $I0, $S1, $S0, 0
is( $I0, "4", 'index, 4-arg form, bug 22718' )
-
+
set $S0, "is"
index $I0, $S1, $S0, 0
is( $I0, "2", 'index, 4-arg form, bug 22718' )
@@ -987,29 +987,29 @@
set $S1, ""
index $I1, $S0, $S1
is( $I1, "-1", 'index, null strings' )
-
+
index $I1, $S0, $S1, 0
is( $I1, "-1", 'index, null strings' )
-
+
index $I1, $S0, $S1, 5
is( $I1, "-1", 'index, null strings' )
-
+
index $I1, $S0, $S1, 6
is( $I1, "-1", 'index, null strings' )
-
+
set $S0, ""
set $S1, "a"
index $I1, $S0, $S1
is( $I1, "-1", 'index, null strings' )
-
+
index $I1, $S0, $S1, 0
is( $I1, "-1", 'index, null strings' )
-
+
set $S0, "Parrot"
null $S1
index $I1, $S0, $S1
is( $I1, "-1", 'index, null strings' )
-
+
null $S0
null $S1
index $I1, $S0, $S1
@@ -1021,7 +1021,7 @@
set $S1, "\0"
index $I1, $S0, $S1
is( $I1, "3", 'index, embedded nulls' )
-
+
index $I1, $S0, $S1, 4
is( $I1, "4", 'index, embedded nulls' )
.end
@@ -1033,10 +1033,10 @@
repeat $S1, $S1, 500
index $I1, $S0, $S1
is( $I1, "0", 'index, big strings' )
-
+
index $I1, $S0, $S1, 1234
is( $I1, "1234", 'index, big strings' )
-
+
index $I1, $S0, $S1, 9501
is( $I1, "-1", 'index, big strings' )
.end
@@ -1148,15 +1148,15 @@
set $S0, " 1"
set $I0, $S0
is( $I0, "1", 'string to int' )
-
+
set $S0, "-1"
set $I0, $S0
is( $I0, "-1", 'string to int' )
-
+
set $S0, "Not a number"
set $I0, $S0
is( $I0, "0", 'string to int' )
-
+
set $S0, ""
set $I0, $S0
is( $I0, "0", 'string to int' )
@@ -1169,7 +1169,7 @@
concat $S2, $S2, $S0
concat $S2, $S2, $S1
is( $S2, "<JAPH>", 'concat/substr (COW)' )
-
+
substr $S0, $S2, 1, 4
is( $S0, "JAPH", 'concat/substr (COW)' )
.end
@@ -1422,7 +1422,7 @@
interp = getinterp
.local pmc config
config = interp[.IGLOBALS_CONFIG_HASH]
- .local int intvalsize
+ .local int intvalsize
intvalsize = config['intvalsize']
$S0 = ''
@@ -1436,7 +1436,7 @@
concat $S0, ' '
inc $I0
le $I0, 20, padding_loop
-
+
# Now see what sprintf comes up with
$P0 = new 'ResizablePMCArray'
$P0[0] = -1
@@ -1450,7 +1450,7 @@
exchange $S0, $S1
is( $S0, "String #1", 'exchange' )
is( $S1, "String #0", 'exchange' )
-
+
set $S2, "String #2"
exchange $S2, $S2
is( $S2, "String #2", 'exchange' )
@@ -1529,13 +1529,13 @@
set $S1, ""
bands $S1, $S2
nok( $S1, 'ok2' )
-
+
null $S2
set $S1, "abc"
bands $S1, $S2
null $S3
is( $S1, $S3, 'ok3' )
-
+
set $S2, ""
bands $S1, $S2
nok( $S1, 'ok4' )
@@ -1577,7 +1577,7 @@
bors $S1, $S2
null $S3
is( $S1, $S3, 'bors NULL string' )
-
+
bors $S2, $S1
is( $S2, $S3, 'bors NULL string' )
@@ -1687,7 +1687,7 @@
bxors $S1, $S2
is( $S1, "%Ec", 'bxors 2' )
is( $S2, "Dw", 'bxors 2' )
-
+
set $S1, "abc"
set $S2, " X"
bxors $S1, $S2
@@ -1702,7 +1702,7 @@
is( $S0, "%Ec", 'bxors 3' )
is( $S1, "a2c", 'bxors 3' )
is( $S2, "Dw", 'bxors 3' )
-
+
set $S1, "abc"
set $S2, " Y"
bxors $S0, $S1, $S2
@@ -1730,7 +1730,7 @@
bnots $S1, $S2
null $S3
is( $S1, $S3, 'bnots NULL string' )
-
+
bnots $S2, $S1
is( $S2, $S3, 'bnots NULL string' )
.end
@@ -1744,10 +1744,10 @@
# bnots $S2, $S1
# is( $S1, "a2c", 'bnots 2' )
# is( $S2, "\xC2\x9E\xC3\x8D\xC2\x9C", 'bnots 2' )
- #
+ #
# bnots $S1, $S1
# is( $S1, "\xC2\x9E\xC3\x8D\xC2\x9C", 'bnots 2' )
- #
+ #
# bnots $S1, $S1
# is( $S1, "a2c", 'bnots 2' )
.end
@@ -1782,14 +1782,14 @@
split $P1, "", ""
set $I1, $P1
is( $I1, "0", 'split on empty string' )
-
+
split $P0, "", "ab"
set $I0, $P0
is( $I0, "2", 'split on empty string' )
-
+
set $S0, $P0[0]
is( $S0, "a", 'split on empty string' )
-
+
set $S0, $P0[1]
is( $S0, "b", 'split on empty string' )
.end
@@ -1798,7 +1798,7 @@
split $P0, "a", "afooabara"
set $I0, $P0
is( $I0, "5", 'split on non-empty string' )
-
+
set $S0, $P0[0]
is( $S0, "", 'split on non-empty string' )
set $S0, $P0[1]
@@ -1819,7 +1819,7 @@
push $P0, "a"
join $S0, "--", $P0
is( $S0, "a", 'join' )
-
+
new $P0, 'ResizablePMCArray'
push $P0, "a"
push $P0, "b"
@@ -1883,21 +1883,21 @@
if_null $S0, ERROR
$I99 = 1
ERROR:
- ok($I99, 'if_null s_ic' )
+ ok($I99, 'if_null s_ic' )
null $S0
$I99 = 1
if_null $S0, OK
$I99 = 0
- OK:
- ok($I99, 'if_null s_ic' )
+ OK:
+ ok($I99, 'if_null s_ic' )
.end
.sub test_upcase
set $S0, "abCD012yz"
upcase $S1, $S0
is( $S1, "ABCD012YZ", 'upcase' )
-
+
upcase $S0
is( $S0, "ABCD012YZ", 'upcase inplace' )
@@ -1932,7 +1932,7 @@
set $S0, "ABcd012YZ"
downcase $S1, $S0
is( $S1, "abcd012yz", 'downcase' )
-
+
downcase $S0
is( $S0, "abcd012yz", 'downcase inplace' )
@@ -1967,7 +1967,7 @@
set $S0, "aBcd012YZ"
titlecase $S1, $S0
is( $S1, "Abcd012yz", 'titlecase' )
-
+
titlecase $S0
is( $S0, "Abcd012yz", 'titlecase inplace' )
@@ -2111,7 +2111,7 @@
is( s, "Foo/Bar", 'bug 60030' )
.end
.sub constant_string_and_modify_in_situ_op_rt_bug_60030
-
+
doit_sub_for_but_60030('Foo::Bar')
# repeat to prove that the constant 'Foo4::Bar4' remains unchanged
doit_sub_for_but_60030('Foo::Bar')
@@ -2177,7 +2177,6 @@
# Local Variables:
# mode: pir
-# cperl-indent-level: 4
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4 ft=pir :
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/op/string_cmp.t
==============================================================================
--- branches/rm_cflags/t/op/string_cmp.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/op/string_cmp.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2001-2009, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -98,7 +98,7 @@
ok( 1, 'eq_s_s_ic' )
goto END
ERROR:
- ok( 0, 'eq_s_s_ic' )
+ ok( 0, 'eq_s_s_ic' )
END:
.end
@@ -141,7 +141,7 @@
ok( 1, 'eq_sc_s_ic' )
goto END
ERROR:
- ok( 0, 'eq_sc_s_ic' )
+ ok( 0, 'eq_sc_s_ic' )
END:
.end
@@ -184,7 +184,7 @@
ok( 1, 'eq_s_sc_ic' )
goto END
ERROR:
- ok( 0, 'eq_s_sc_ic' )
+ ok( 0, 'eq_s_sc_ic' )
END:
.end
@@ -216,7 +216,7 @@
ok( 1, 'eq_sc_sc_ic' )
goto END
ERROR:
- ok( 0, 'eq_sc_sc_ic' )
+ ok( 0, 'eq_sc_sc_ic' )
END:
.end
@@ -277,7 +277,7 @@
ok( 1, 'ne_s_s_ic' )
goto END
ERROR:
- ok( 0, 'ne_s_s_ic' )
+ ok( 0, 'ne_s_s_ic' )
END:
.end
@@ -327,7 +327,7 @@
ok( 1, 'ne_sc_s_ic' )
goto END
ERROR:
- ok( 0, 'ne_sc_s_ic' )
+ ok( 0, 'ne_sc_s_ic' )
END:
.end
@@ -377,7 +377,7 @@
ok( 1, 'ne_s_sc_ic' )
goto END
ERROR:
- ok( 0, 'ne_s_sc_ic' )
+ ok( 0, 'ne_s_sc_ic' )
END:
.end
@@ -416,7 +416,7 @@
ok( 1, 'ne_sc_sc_ic' )
goto END
ERROR:
- ok( 0, 'ne_sc_sc_ic' )
+ ok( 0, 'ne_sc_sc_ic' )
END:
.end
@@ -472,7 +472,7 @@
ok( 1, 'lt_s_s_ic' )
goto END
ERROR:
- ok( 0, 'lt_s_s_ic' )
+ ok( 0, 'lt_s_s_ic' )
END:
.end
@@ -517,7 +517,7 @@
ok( 1, 'lt_sc_s_ic' )
goto END
ERROR:
- ok( 0, 'lt_sc_s_ic' )
+ ok( 0, 'lt_sc_s_ic' )
END:
.end
@@ -562,7 +562,7 @@
ok( 1, 'lt_s_sc_ic' )
goto END
ERROR:
- ok( 0, 'lt_s_sc_ic' )
+ ok( 0, 'lt_s_sc_ic' )
END:
.end
@@ -596,7 +596,7 @@
ok( 1, 'lt_sc_sc_ic' )
goto END
ERROR:
- ok( 0, 'lt_sc_sc_ic' )
+ ok( 0, 'lt_sc_sc_ic' )
END:
.end
@@ -654,7 +654,7 @@
ok( 1, 'le_s_s_ic' )
goto END
ERROR:
- ok( 0, 'le_s_s_ic' )
+ ok( 0, 'le_s_s_ic' )
END:
.end
@@ -701,7 +701,7 @@
ok( 1, 'le_sc_s_ic' )
goto END
ERROR:
- ok( 0, 'le_sc_s_ic' )
+ ok( 0, 'le_sc_s_ic' )
END:
.end
@@ -748,7 +748,7 @@
ok( 1, 'le_s_sc_ic' )
goto END
ERROR:
- ok( 0, 'le_s_sc_ic' )
+ ok( 0, 'le_s_sc_ic' )
END:
.end
@@ -784,7 +784,7 @@
ok( 1, 'le_sc_sc_ic' )
goto END
ERROR:
- ok( 0, 'le_sc_sc_ic' )
+ ok( 0, 'le_sc_sc_ic' )
END:
.end
@@ -841,7 +841,7 @@
ok( 1, 'gt_s_s_ic' )
goto END
ERROR:
- ok( 0, 'gt_s_s_ic' )
+ ok( 0, 'gt_s_s_ic' )
END:
.end
@@ -887,7 +887,7 @@
ok( 1, 'gt_sc_s_ic' )
goto END
ERROR:
- ok( 0, 'gt_sc_s_ic' )
+ ok( 0, 'gt_sc_s_ic' )
END:
.end
@@ -933,7 +933,7 @@
ok( 1, 'gt_s_sc_ic' )
goto END
ERROR:
- ok( 0, 'gt_s_sc_ic' )
+ ok( 0, 'gt_s_sc_ic' )
END:
.end
@@ -968,7 +968,7 @@
ok( 1, 'gt_sc_sc_ic' )
goto END
ERROR:
- ok( 0, 'gt_sc_sc_ic' )
+ ok( 0, 'gt_sc_sc_ic' )
END:
.end
@@ -1027,7 +1027,7 @@
ok( 1, 'ge_s_s_ic' )
goto END
ERROR:
- ok( 0, 'ge_s_s_ic' )
+ ok( 0, 'ge_s_s_ic' )
END:
.end
@@ -1075,7 +1075,7 @@
ok( 1, 'ge_sc_s_ic' )
goto END
ERROR:
- ok( 0, 'ge_sc_s_ic' )
+ ok( 0, 'ge_sc_s_ic' )
END:
.end
@@ -1123,7 +1123,7 @@
ok( 1, 'ge_s_sc_ic' )
goto END
ERROR:
- ok( 0, 'ge_s_sc_ic' )
+ ok( 0, 'ge_s_sc_ic' )
END:
.end
@@ -1166,7 +1166,6 @@
# Local Variables:
# mode: pir
-# cperl-indent-level: 4
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4 ft=pir :
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/op/string_mem.t
==============================================================================
--- branches/rm_cflags/t/op/string_mem.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/op/string_mem.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!./parrot
-# Copyright (C) 2008, Parrot Foundation.
+# Copyright (C) 2008-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -145,4 +145,4 @@
# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/op/stringu.t
==============================================================================
--- branches/rm_cflags/t/op/stringu.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/op/stringu.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -96,7 +96,7 @@
print $S0
print "\n"
end
-.end
+.end
CODE
aaaaaa\xf0\x9d\x90\x80-aaaaaa
OUTPUT
Modified: branches/rm_cflags/t/op/sysinfo.t
==============================================================================
--- branches/rm_cflags/t/op/sysinfo.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/op/sysinfo.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -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
@@ -55,31 +55,31 @@
my @setup = (
{ pconfig_key => 'intvalsize',
pasm_key => 1,
- pir_key => 'SYSINFO_PARROT_INTSIZE',
+ pir_key => 'SYSINFO_PARROT_INTSIZE',
desc => 'integer size',
reg_type => 'I',
},
{ pconfig_key => 'doublesize',
pasm_key => 2,
- pir_key => 'SYSINFO_PARROT_FLOATSIZE',
+ pir_key => 'SYSINFO_PARROT_FLOATSIZE',
desc => 'float size',
reg_type => 'I',
},
{ pconfig_key => 'ptrsize',
pasm_key => 3,
- pir_key => 'SYSINFO_PARROT_POINTERSIZE',
+ pir_key => 'SYSINFO_PARROT_POINTERSIZE',
desc => 'pointer size',
reg_type => 'I',
},
{ pconfig_key => 'osname',
pasm_key => 4,
- pir_key => 'SYSINFO_PARROT_OS',
+ pir_key => 'SYSINFO_PARROT_OS',
desc => 'osname',
reg_type => 'S',
},
{ pconfig_key => 'cpuarch',
pasm_key => 7,
- pir_key => 'SYSINFO_CPU_ARCH',
+ pir_key => 'SYSINFO_CPU_ARCH',
desc => 'CPU Arch Family',
reg_type => 'S',
},
@@ -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/rm_cflags/t/op/time.t
==============================================================================
--- branches/rm_cflags/t/op/time.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/op/time.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!parrot
-# Copyright (C) 2001-2009, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -165,8 +165,7 @@
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4 filetype=pir:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/op/trans.t
==============================================================================
--- branches/rm_cflags/t/op/trans.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/op/trans.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -125,3 +125,9 @@
is($N0, 1.557408, "tan(1)", epsilon)
.end
+# Local Variables:
+# mode: pir
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4 ft=pir:
+
Modified: branches/rm_cflags/t/op/vivify.t
==============================================================================
--- branches/rm_cflags/t/op/vivify.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/op/vivify.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!parrot
-# Copyright (C) 2009, Parrot Foundation.
+# Copyright (C) 2009-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -134,7 +134,6 @@
# Local Variables:
# mode: pir
-# cperl-indent-level: 4
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4 ft=pir :
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/perl/Parrot_IO.t
==============================================================================
--- branches/rm_cflags/t/perl/Parrot_IO.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/perl/Parrot_IO.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -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/rm_cflags/t/perl/Parrot_Test.t
==============================================================================
--- branches/rm_cflags/t/perl/Parrot_Test.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/perl/Parrot_Test.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! perl
-# Copyright (C) 2001-2008, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -286,11 +286,12 @@
test_test($desc);
$desc = 'pir_error_output_like: todo';
-$line = line_num(+21);
+$line = line_num(+22);
my $location;
if ($Test::Builder::VERSION <= eval '0.33') {
$location = "in $0 at line $line";
-} else {
+}
+else {
$location = "at $0 line $line";
}
test_out("not ok 1 - $desc # TODO foo");
@@ -316,7 +317,8 @@
OUTPUT
if($Test::Builder::VERSION == 0.84) {
test_test(title => $desc, skip_err => 1);
-} else {
+}
+else {
test_test($desc);
}
Modified: branches/rm_cflags/t/pir/macro.t
==============================================================================
--- branches/rm_cflags/t/pir/macro.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pir/macro.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2001-2009, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -36,8 +36,8 @@
.end
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4 filetype=pir:
+# vim: expandtab shiftwidth=4 ft=pir:
+
Modified: branches/rm_cflags/t/pmc/arrayiterator.t
==============================================================================
--- branches/rm_cflags/t/pmc/arrayiterator.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/arrayiterator.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2001-2009, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -132,10 +132,8 @@
DONE:
.end
-
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/pmc/bigint.t
==============================================================================
--- branches/rm_cflags/t/pmc/bigint.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/bigint.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -987,7 +987,6 @@
# Local Variables:
# mode: pir
-# cperl-indent-level: 4
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4 filetype=pir:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/pmc/capture.t
==============================================================================
--- branches/rm_cflags/t/pmc/capture.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/capture.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2001-2008, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -79,7 +79,7 @@
$I0 = capt[11]
is($I0, 7, 'get_integer_keyed_int')
-
+
$P0 = capt[10]
is($P0, 'six', 'get_pmc_keyed_int')
@@ -106,13 +106,13 @@
$I0 = shift capt
is($I0, 11, 'shift an integer')
-
+
$P0 = shift capt
is($P0, 'ten', 'shift a PMC')
-
+
$N0 = shift capt
is($N0, 9.5, 'shift a number')
-
+
$S0 = shift capt
is($S0, '8', 'shift a string')
@@ -136,7 +136,7 @@
$P0 = capt['gamma']
is($P0, 'fourteen', 'get_pmc_keyed_str')
-
+
$N0 = capt['beta']
is($N0, 13.5, 'get_number_keyed_str')
Modified: branches/rm_cflags/t/pmc/class.t
==============================================================================
--- branches/rm_cflags/t/pmc/class.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/class.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2007-2008, Parrot Foundation.
+# Copyright (C) 2007-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -17,7 +17,7 @@
=cut
-.const int TESTS = 63
+.const int TESTS = 63
.sub 'main' :main
Modified: branches/rm_cflags/t/pmc/complex.t
==============================================================================
--- branches/rm_cflags/t/pmc/complex.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/complex.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2001-2009, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -1178,8 +1178,7 @@
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4 filetype=pir:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/pmc/continuation.t
==============================================================================
--- branches/rm_cflags/t/pmc/continuation.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/continuation.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2006-2007, Parrot Foundation.
+# Copyright (C) 2006-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -45,7 +45,6 @@
# Local Variables:
# mode: pir
-# cperl-indent-level: 4
# fill-column: 100
# End:
# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/pmc/default.t
==============================================================================
--- branches/rm_cflags/t/pmc/default.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/default.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!parrot
-# Copyright (C) 2006-2009, Parrot Foundation.
+# Copyright (C) 2006-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -45,8 +45,7 @@
.end
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/pmc/env.t
==============================================================================
--- branches/rm_cflags/t/pmc/env.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/env.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2001-2008, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -184,7 +184,6 @@
# Local Variables:
# mode: pir
-# cperl-indent-level: 4
# fill-column: 100
# End:
# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/pmc/eventhandler.t
==============================================================================
--- branches/rm_cflags/t/pmc/eventhandler.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/eventhandler.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,6 +1,6 @@
#! parrot
-# Copyright (C) 2007-2008, Parrot Foundation.
-# $Id $
+# Copyright (C) 2007-2010, Parrot Foundation.
+# $Id$
=head1 NAME
Modified: branches/rm_cflags/t/pmc/exception.t
==============================================================================
--- branches/rm_cflags/t/pmc/exception.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/exception.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2009, Parrot Foundation.
+# Copyright (C) 2009-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -172,8 +172,7 @@
.end
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/pmc/exporter.t
==============================================================================
--- branches/rm_cflags/t/pmc/exporter.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/exporter.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -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/rm_cflags/t/pmc/filehandle.t
==============================================================================
--- branches/rm_cflags/t/pmc/filehandle.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/filehandle.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!perl
-# Copyright (C) 2006-2008, Parrot Foundation.
+# Copyright (C) 2006-2010, Parrot Foundation.
# $Id$
use strict;
@@ -258,7 +258,7 @@
counter = 0
read_loop:
- inc counter
+ inc counter
# read in the file one line at a time...
\$I0 = filehandle.'eof'()
if \$I0 goto end_read_loop
@@ -444,7 +444,7 @@
\$P0.'print'(1234567890)
\$P0.'print'("\\n")
- \$S0 = iso-8859-1:"TÖTSCH"
+ \$S0 = iso-8859-1:"TÖTSCH"
\$P0.'print'(\$S0)
\$P0.'close'()
@@ -551,7 +551,7 @@
.local pmc ifh
ifh = new ['FileHandle']
ifh.'encoding'('utf8')
-
+
\$S0 = ifh.'readall'('$temp_file')
\$I0 = encoding \$S0
Modified: branches/rm_cflags/t/pmc/fixedbooleanarray.t
==============================================================================
--- branches/rm_cflags/t/pmc/fixedbooleanarray.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/fixedbooleanarray.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2001-2009, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -334,8 +334,7 @@
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/pmc/fixedintegerarray.t
==============================================================================
--- branches/rm_cflags/t/pmc/fixedintegerarray.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/fixedintegerarray.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2001-2008, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -164,7 +164,7 @@
$P0[1023] = $P1
$P2 = new ['Key']
-
+
$P2 = 25
$I0 = $P0[$P2]
is($I0, 125, "Get INTVAL via Key works")
@@ -218,7 +218,7 @@
a2 = new ['FixedIntegerArray']
is(a1, a2, "Empty arrays are equal")
-
+
a1 = 3
isnt(a1, a2, "Different size arrays aren't equal")
@@ -230,15 +230,14 @@
a1[1] = 84
isnt(a1, a2, "Not equal when second element differ")
-
+
a2[1] = 84
is(a1, a2, "Equal when second element same")
.end
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/pmc/fixedpmcarray.t
==============================================================================
--- branches/rm_cflags/t/pmc/fixedpmcarray.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/fixedpmcarray.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2001-2009, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -19,7 +19,7 @@
.sub main :main
.include 'test_more.pir'
- plan(76)
+ plan(78)
test_setting_array_size()
test_assign_from_another()
test_assign_self()
@@ -27,6 +27,7 @@
test_resize_exception()
test_truthiness()
test_tt991()
+ test_tt1039()
test_setting_first_elem()
test_setting_second_elem()
test_negative_index()
@@ -555,6 +556,48 @@
CODE
.end
+.sub test_tt1039
+ .local pmc arr
+ arr = new 'FixedPMCArray'
+ arr = 4
+ arr[0] = 'just'
+ arr[1] = 'another'
+ arr[2] = 'perl'
+ arr[3] = 'hacker'
+
+ .local pmc sorted_arr
+ sorted_arr = new 'FixedPMCArray'
+ sorted_arr = 4
+ sorted_arr[0] = 'another'
+ sorted_arr[1] = 'hacker'
+ sorted_arr[2] = 'just'
+ sorted_arr[3] = 'perl'
+
+ $P0 = get_global 'cmpfn1'
+ $P1 = clone arr
+ $P1.'sort'($P0)
+ is_deeply($P1, sorted_arr, 'fpa.sort called with normal Sub')
+
+ $P0 = get_global 'cmpfn2'
+ $P1 = clone arr
+ $P1.'sort'($P0)
+ is_deeply($P1, sorted_arr, 'fpa.sort called with MultiSub')
+.end
+
+.sub 'cmpfn1'
+ .param pmc a
+ .param pmc b
+ $I0 = cmp_str a, b
+ .return ($I0)
+.end
+
+.sub 'cmpfn2' :multi(_, _)
+ .param pmc a
+ .param pmc b
+ $I0 = cmp_str a, b
+ .return ($I0)
+.end
+
.sub test_resize_exception
throws_substring(<<'CODE',"FixedPMCArray: Can't resize",'cannot resize FixedPMCArray')
.sub main
@@ -624,8 +667,7 @@
.end
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/pmc/fixedstringarray.t
==============================================================================
--- branches/rm_cflags/t/pmc/fixedstringarray.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/fixedstringarray.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2001-2009, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -19,7 +19,7 @@
.sub 'main' :main
.include 'test_more.pir'
- plan(44)
+ plan(46)
'test_set_size'() # 2 tests
'test_reset_size'() # 1 test
@@ -37,6 +37,7 @@
'test_get_string'() # 1 test
'test_equality'() # 5 tests
'test_gc'() # 4 tests
+ 'test_number'() # 2 tests
.end
.sub 'test_set_size'
@@ -364,9 +365,20 @@
.end
+.sub 'test_number'
+ .local pmc fsa
+ fsa = new ['FixedStringArray']
+ fsa = 3
+
+ $I0 = fsa
+ is($I0, 3, "get_integer returns correct size")
+ $N0 = fsa
+ is($N0, 3.0, "get_number returns correct size")
+.end
+
+
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/pmc/handle.t
==============================================================================
--- branches/rm_cflags/t/pmc/handle.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/handle.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2001-2008, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -29,8 +29,7 @@
.end
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/pmc/hash.t
==============================================================================
--- branches/rm_cflags/t/pmc/hash.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/hash.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2001-2008, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -678,7 +678,7 @@
s1 = get_repr h
s2 = get_repr cloned
if s1 != s2 goto fail
-
+
goto end
fail:
all_ok = 0
@@ -755,7 +755,7 @@
s1 = get_repr h
s2 = get_repr cloned
if s1 != s2 goto fail
-
+
goto end
fail:
all_ok = 0
@@ -1437,7 +1437,7 @@
types[$S0] = 1
goto loop
done:
-
+
$I0 = elements types
is($I0, 3, "Got 3 different types of PMC keys")
$I0 = types['ResizableStringArray']
Modified: branches/rm_cflags/t/pmc/hashiterator.t
==============================================================================
--- branches/rm_cflags/t/pmc/hashiterator.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/hashiterator.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2001-2008, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
=head1 NAME
Modified: branches/rm_cflags/t/pmc/hashiteratorkey.t
==============================================================================
--- branches/rm_cflags/t/pmc/hashiteratorkey.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/hashiteratorkey.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!./parrot
-# Copyright (C) 2001-2006, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -37,8 +37,7 @@
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/pmc/imageio.t
==============================================================================
--- branches/rm_cflags/t/pmc/imageio.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/imageio.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -76,4 +76,4 @@
# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4 ft=pir
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/pmc/imageiosize.t
==============================================================================
--- branches/rm_cflags/t/pmc/imageiosize.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/imageiosize.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -71,4 +71,4 @@
# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4 ft=pir
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/pmc/integer.t
==============================================================================
--- branches/rm_cflags/t/pmc/integer.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/integer.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!parrot
-# Copyright (C) 2001-2009, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -416,8 +416,7 @@
.end
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/pmc/iterator.t
==============================================================================
--- branches/rm_cflags/t/pmc/iterator.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/iterator.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -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/rm_cflags/t/pmc/lexinfo.t
==============================================================================
--- branches/rm_cflags/t/pmc/lexinfo.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/lexinfo.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2006-2007, Parrot Foundation.
+# Copyright (C) 2006-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -39,7 +39,7 @@
.sub inspect_test
.lex "$a", $P0
.lex "$b", $P1
-
+
$P2 = new 'ParrotInterpreter'
$P2 = $P2['sub']
$P2 = $P2.'get_lexinfo'()
@@ -72,7 +72,6 @@
# Local Variables:
# mode: pir
-# cperl-indent-level: 4
# fill-column: 100
# End:
# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/pmc/lexpad.t
==============================================================================
--- branches/rm_cflags/t/pmc/lexpad.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/lexpad.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2006-2007, Parrot Foundation.
+# Copyright (C) 2006-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -70,7 +70,6 @@
# Local Variables:
# mode: pir
-# cperl-indent-level: 4
# fill-column: 100
# End:
# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/pmc/multidispatch.t
==============================================================================
--- branches/rm_cflags/t/pmc/multidispatch.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/multidispatch.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -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/rm_cflags/t/pmc/namespace.t
==============================================================================
--- branches/rm_cflags/t/pmc/namespace.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/namespace.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2006-2007, Parrot Foundation.
+# Copyright (C) 2006-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -701,3 +701,9 @@
.sub 'baz'
.return("MyHLL")
.end
+
+# Local Variables:
+# mode: pir
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/pmc/objects.t
==============================================================================
--- branches/rm_cflags/t/pmc/objects.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/objects.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2001-2009, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -1790,8 +1790,7 @@
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4 filetype=pir:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/pmc/opcode.t
==============================================================================
--- branches/rm_cflags/t/pmc/opcode.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/opcode.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2001-2009, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -27,3 +27,9 @@
ok(1)
create_end:
.end
+
+# Local Variables:
+# mode: pir
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/pmc/oplib.t
==============================================================================
--- branches/rm_cflags/t/pmc/oplib.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/oplib.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2001-2009, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -32,3 +32,9 @@
end:
.end
+# Local Variables:
+# mode: pir
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4 ft=pir:
+
Modified: branches/rm_cflags/t/pmc/orderedhashiterator.t
==============================================================================
--- branches/rm_cflags/t/pmc/orderedhashiterator.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/orderedhashiterator.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!./parrot
-# Copyright (C) 2001-2006, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -41,8 +41,7 @@
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/pmc/os.t
==============================================================================
--- branches/rm_cflags/t/pmc/os.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/os.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -238,7 +238,8 @@
end
.end
CODE
-} else {
+}
+else {
SKIP: {
skip 'broken test TT #457', 1 if $solaris;
Modified: branches/rm_cflags/t/pmc/packfile.t
==============================================================================
--- branches/rm_cflags/t/pmc/packfile.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/packfile.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2006-2009, Parrot Foundation.
+# Copyright (C) 2006-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -308,8 +308,7 @@
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/pmc/packfileannotation.t
==============================================================================
--- branches/rm_cflags/t/pmc/packfileannotation.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/packfileannotation.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,6 @@
#!parrot
-# Copyright (C) 2006-2009, Parrot Foundation.
+# Copyright (C) 2006-2010, Parrot Foundation.
+# $Id$
=head1 NAME
@@ -49,8 +50,7 @@
.end
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/pmc/packfileannotations.t
==============================================================================
--- branches/rm_cflags/t/pmc/packfileannotations.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/packfileannotations.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,6 @@
#!parrot
-# Copyright (C) 2006-2009, Parrot Foundation.
+# Copyright (C) 2006-2010, Parrot Foundation.
+# $Id$
=head1 NAME
@@ -149,8 +150,7 @@
.end
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/pmc/packfileconstanttable.t
==============================================================================
--- branches/rm_cflags/t/pmc/packfileconstanttable.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/packfileconstanttable.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!parrot
-# Copyright (C) 2009, Parrot Foundation.
+# Copyright (C) 2009-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -195,8 +195,7 @@
.end
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/pmc/packfiledirectory.t
==============================================================================
--- branches/rm_cflags/t/pmc/packfiledirectory.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/packfiledirectory.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2009, Parrot Foundation.
+# Copyright (C) 2009-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -143,8 +143,7 @@
.end
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/pmc/packfilefixupentry.t
==============================================================================
--- branches/rm_cflags/t/pmc/packfilefixupentry.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/packfilefixupentry.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2009, Parrot Foundation.
+# Copyright (C) 2009-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -82,8 +82,7 @@
.end
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/pmc/packfilefixuptable.t
==============================================================================
--- branches/rm_cflags/t/pmc/packfilefixuptable.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/packfilefixuptable.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!parrot
-# Copyright (C) 2009, Parrot Foundation.
+# Copyright (C) 2009-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -62,8 +62,7 @@
.end
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/pmc/packfilerawsegment.t
==============================================================================
--- branches/rm_cflags/t/pmc/packfilerawsegment.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/packfilerawsegment.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!parrot
-# Copyright (C) 2009, Parrot Foundation.
+# Copyright (C) 2009-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -110,8 +110,7 @@
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/pmc/packfilesegment.t
==============================================================================
--- branches/rm_cflags/t/pmc/packfilesegment.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/packfilesegment.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!parrot
-# Copyright (C) 2009, Parrot Foundation.
+# Copyright (C) 2009-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -26,8 +26,7 @@
.end
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/pmc/parrotinterpreter.t
==============================================================================
--- branches/rm_cflags/t/pmc/parrotinterpreter.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/parrotinterpreter.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!parrot
-# Copyright (C) 2006-2009, Parrot Foundation.
+# Copyright (C) 2006-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -83,11 +83,11 @@
$P0 = interp['namespace';0]
$I0 = isa $P0, 'NameSpace'
ok($I0, 'Got ParrotInterp.namespace')
-
+
$P0 = interp['continuation';0]
$I0 = isa $P0, 'Continuation'
ok($I0, 'Got ParrotInterp.continuation')
-
+
$P0 = interp['annotations';1]
$S0 = $P0['foo']
is($S0, 'bar', 'Got ParrotInterp.annotations')
@@ -116,8 +116,7 @@
.end
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/pmc/prop.t
==============================================================================
--- branches/rm_cflags/t/pmc/prop.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/prop.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2001-2005, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -134,7 +134,6 @@
# Local Variables:
# mode: pir
-# cperl-indent-level: 4
# fill-column: 100
# End:
# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/pmc/ro.t
==============================================================================
--- branches/rm_cflags/t/pmc/ro.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/ro.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2006-2007, Parrot Foundation.
+# Copyright (C) 2006-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -225,7 +225,7 @@
=pod
-TT #1036: should this work?
+TT #1036: should this work?
.sub resizablepmcarray_recursive
.local pmc foo
Modified: branches/rm_cflags/t/pmc/scalar.t
==============================================================================
--- branches/rm_cflags/t/pmc/scalar.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/scalar.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2006-2007, Parrot Foundation.
+# Copyright (C) 2006-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -26,8 +26,7 @@
.end
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/pmc/scheduler.t
==============================================================================
--- branches/rm_cflags/t/pmc/scheduler.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/scheduler.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2007, Parrot Foundation.
+# Copyright (C) 2007-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -116,7 +116,6 @@
# Local Variables:
# mode: pir
-# cperl-indent-level: 4
# fill-column: 100
# End:
# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/pmc/string.t
==============================================================================
--- branches/rm_cflags/t/pmc/string.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/string.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2001-2008, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -1052,8 +1052,7 @@
.end
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4 filetype=pir:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/pmc/stringhandle.t
==============================================================================
--- branches/rm_cflags/t/pmc/stringhandle.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/stringhandle.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#!perl
-# Copyright (C) 2006-2008, Parrot Foundation.
+# Copyright (C) 2006-2010, Parrot Foundation.
# $Id$
use strict;
@@ -255,7 +255,7 @@
counter = 0
write_loop:
- inc counter
+ inc counter
if counter > 10000 goto end_write_loop
stringhandle.'print'(counter)
@@ -268,7 +268,7 @@
counter = 0
read_loop:
- inc counter
+ inc counter
# read in the file one line at a time...
$I0 = stringhandle.'eof'()
if $I0 goto end_read_loop
@@ -448,7 +448,7 @@
\$P0.'print'(1234567890)
\$P0.'print'("\\n")
- \$S0 = iso-8859-1:"TÖTSCH"
+ \$S0 = iso-8859-1:"TÖTSCH"
\$P0.'print'(\$S0)
\$P0.'close'()
@@ -549,7 +549,7 @@
.local pmc ifh
ifh = new ['StringHandle']
ifh.'encoding'('utf8')
-
+
\$S0 = ifh.'readall'('temp_file')
\$I0 = encoding \$S0
Modified: branches/rm_cflags/t/pmc/stringiterator.t
==============================================================================
--- branches/rm_cflags/t/pmc/stringiterator.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/stringiterator.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! parrot
-# Copyright (C) 2001-2008, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
=head1 NAME
@@ -97,8 +97,7 @@
.end
# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
+# mode: pir
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4 filetype=pir:
+# vim: expandtab shiftwidth=4 ft=pir:
Modified: branches/rm_cflags/t/pmc/sub.t
==============================================================================
--- branches/rm_cflags/t/pmc/sub.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/pmc/sub.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! perl
-# Copyright (C) 2001-2009, Parrot Foundation.
+# Copyright (C) 2001-2010, Parrot Foundation.
# $Id$
use strict;
@@ -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"
@@ -1425,12 +1432,12 @@
PIR
$P1 = compreg 'PIR'
$P1 = $P1($S1)
-
+
$P3 = new 'ParrotInterpreter'
$P3 = $P3['sub']
$P2 = $P1[0]
$P2.'set_outer'($P3)
-
+
$P1()
.end
CODE
@@ -1637,11 +1644,11 @@
pir_output_is( <<'CODE', <<'OUTPUT', 'init_pmc' );
.sub 'main'
.local pmc init, s, regs, arg_info
-
+
init = new ['Hash']
init['start_offs'] = 42
init['end_offs'] = 115200
-
+
regs = new ['FixedIntegerArray']
regs = 4
regs[0] = 1
@@ -1694,7 +1701,7 @@
$P0 = inspect s, 'pos_optional'
print 'pos_optional '
say $P0
-
+
$P0 = inspect s, 'pos_slurpy'
print 'pos_slurpy '
say $P0
Modified: branches/rm_cflags/t/steps/auto/snprintf-01.t
==============================================================================
--- branches/rm_cflags/t/steps/auto/snprintf-01.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/steps/auto/snprintf-01.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -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/rm_cflags/t/steps/init/hints/darwin-01.t
==============================================================================
--- branches/rm_cflags/t/steps/init/hints/darwin-01.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/steps/init/hints/darwin-01.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -96,7 +96,7 @@
$defaults{architectures}, $stored, $flagsref, $flag
);
like(
- $flagsref->{$flag},
+ $flagsref->{$flag},
qr{-someflag -someotherflag},
"_strip_arch_flags_engine(): '-arch' flags and extra whitespace removed",
);
@@ -162,7 +162,7 @@
like($flagsref->{$flag},
qr/-someflag -someotherflag/,
"_strip_arch_flags(): '-arch' flags and extra whitespace removed",
- );
+ );
my ($stdout, $stderr);
capture(
Modified: branches/rm_cflags/t/tools/dev/pmctree.t
==============================================================================
--- branches/rm_cflags/t/tools/dev/pmctree.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/tools/dev/pmctree.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! perl
-# Copyright (C) 202007, Parrot Foundation.
+# Copyright (C) 2007-2010, Parrot Foundation.
# $Id$
# pmctree.t
Modified: branches/rm_cflags/t/tools/install/02-install_files.t
==============================================================================
--- branches/rm_cflags/t/tools/install/02-install_files.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/tools/install/02-install_files.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -30,7 +30,7 @@
{
my ( $stdout, $stderr, $rv );
-
+
eval {
capture(
sub { $rv = install_files($tdir, 1); },
@@ -60,8 +60,8 @@
\$stderr,
);
like($stderr, qr/Bad reference passed in \$files/, "Catches non-HASH files");
-
- like( $stdout, qr/Installing \.\.\./,
+
+ like( $stdout, qr/Installing \.\.\./,
'Got expected installation message' );
}
}
@@ -87,7 +87,7 @@
\$stderr,
);
ok( $rv, 'install_files() completed successfully in dry-run case' );
-
+
my $files_created = 0;
foreach my $el (@$files_ref) {
$files_created++ if -f $tdir . $el->{Dest};
@@ -107,7 +107,7 @@
\$stderr,
);
ok( $rv, 'install_files() completed successfully in production case' );
-
+
my $files_created = 0;
foreach my $el (@$files_ref) {
$files_created++ if -f "$tdir$el->{Dest}";
@@ -152,7 +152,7 @@
\$stderr,
);
ok( $rv, 'install_files() completed successfully in mock-Cygwin case' );
-
+
my $files_created = 0;
foreach my $el (@$files_ref) {
$files_created++ if -f "$tdir$el->{Dest}";
@@ -202,7 +202,7 @@
\$stderr,
);
ok( $rv, 'install_files() completed successfully in mock-Cygwin case' );
-
+
my $files_created = 0;
foreach my $el (@$files_ref) {
$files_created++ if -f "$tdir$el->{Dest}";
@@ -240,8 +240,8 @@
\$stderr,
);
ok( $rv, 'install_files() handled non-existent file as expected' );
-
- like( $stdout, qr/Installing \.\.\./,
+
+ like( $stdout, qr/Installing \.\.\./,
'Got expected installation message' );
}
}
Modified: branches/rm_cflags/t/tools/install/03-lines_to_files.t
==============================================================================
--- branches/rm_cflags/t/tools/install/03-lines_to_files.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/tools/install/03-lines_to_files.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -232,7 +232,7 @@
__END__
-# Can't safely run lines_to_files() more than once in a program until it's been fixed,
+# Can't safely run lines_to_files() more than once in a program until it's been fixed,
# and we can't fix it until its tested, so I've commented most of these out until we've
# fixed lines_to_files() not to use @ARGV
@@ -254,8 +254,8 @@
#
# # Second lines_to_files test
## eval { lines_to_files(
-## $metatransforms, $transformorder,
-## [qw(MANIFEST MANIFEST.generated)],
+## $metatransforms, $transformorder,
+## [qw(MANIFEST MANIFEST.generated)],
## $options, $parrotdir
## ); };
## ok($@ =~ /^Unknown install location in MANIFEST for file/, 'fails for install locations not specified in transforms');
@@ -282,8 +282,8 @@
# };
#
# ($files, $installable_exe, $directories) = lines_to_files(
-# $metatransforms, $othertransforms,
-# [qw(MANIFEST MANIFEST.generated)],
+# $metatransforms, $othertransforms,
+# [qw(MANIFEST MANIFEST.generated)],
# { packages => 'main' }, $parrotdir
# );
# ok((ref($files) and ref($installable_exe) and ref($directories)), 'lines_to_files returns something vaguely sensible');
Modified: branches/rm_cflags/t/tools/ops2pm/05-renum_op_map_file.t
==============================================================================
--- branches/rm_cflags/t/tools/ops2pm/05-renum_op_map_file.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/tools/ops2pm/05-renum_op_map_file.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -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/rm_cflags/t/tools/ops2pm/08-sort_ops.t
==============================================================================
--- branches/rm_cflags/t/tools/ops2pm/08-sort_ops.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/tools/ops2pm/08-sort_ops.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -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' );
}
Modified: branches/rm_cflags/t/tools/pbc_disassemble.t
==============================================================================
--- branches/rm_cflags/t/tools/pbc_disassemble.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/tools/pbc_disassemble.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -1,5 +1,5 @@
#! perl
-# Copyright (C) 2009, Parrot Foundation
+# Copyright (C) 2009-2010, Parrot Foundation.
# $Id$
=head1 NAME
Modified: branches/rm_cflags/t/tools/pmc2cutils/04-dump_pmc.t
==============================================================================
--- branches/rm_cflags/t/tools/pmc2cutils/04-dump_pmc.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/tools/pmc2cutils/04-dump_pmc.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -111,7 +111,7 @@
#create a dump for default.pmc
Parrot::Pmc2c::Pmc2cMain->new(
{
- include => \@include,
+ include => \@include,
opt=>\%opt,
args=>[qq{$temppmcdir/default.pmc}],
bin=>$Bin
@@ -215,7 +215,7 @@
#create a dump for default.pmc
Parrot::Pmc2c::Pmc2cMain->new(
{
- include => \@include,
+ include => \@include,
opt=>\%opt,
args=>[qq{$temppmcdir/default.pmc}],
bin=>$Bin
@@ -272,7 +272,7 @@
for my $pmc ( qq{$temppmcdir/default.pmc}, qq{$temppmcdir/scalar.pmc}, qq{$temppmcdir/integer.pmc} ) {
Parrot::Pmc2c::Pmc2cMain->new(
{
- include => \@include,
+ include => \@include,
opt=>\%opt,
args=>[$pmc],
bin=>$Bin
@@ -376,7 +376,7 @@
#create a dump for default.pmc
Parrot::Pmc2c::Pmc2cMain->new(
{
- include => \@include,
+ include => \@include,
opt=>\%opt,
args=>[qq{$temppmcdir/default.pmc}],
bin=>$Bin
@@ -470,7 +470,7 @@
#create a dump for default.pmc
Parrot::Pmc2c::Pmc2cMain->new(
{
- include => \@include,
+ include => \@include,
opt=>\%opt,
args=>[qq{$temppmcdir/default.pmc}],
bin=>$Bin
@@ -538,7 +538,7 @@
#create a dump for default.pmc
Parrot::Pmc2c::Pmc2cMain->new(
{
- include => \@include,
+ include => \@include,
opt=>\%opt,
args=>[qq{$temppmcdir/default.pmc}],
bin=>$Bin
Modified: branches/rm_cflags/t/tools/pmc2cutils/05-gen_c.t
==============================================================================
--- branches/rm_cflags/t/tools/pmc2cutils/05-gen_c.t Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/t/tools/pmc2cutils/05-gen_c.t Wed Feb 24 08:11:58 2010 (r44452)
@@ -119,7 +119,7 @@
#create a dump for default.pmc
Parrot::Pmc2c::Pmc2cMain->new(
{
- include => \@include,
+ include => \@include,
opt=>\%opt,
args=>[qq{$temppmcdir/default.pmc}],
bin=>$Bin
@@ -228,7 +228,7 @@
for my $pmc ( qq{$temppmcdir/default.pmc}, qq{$temppmcdir/class.pmc} ) {
Parrot::Pmc2c::Pmc2cMain->new(
{
- include => \@include,
+ include => \@include,
opt=>\%opt,
args=>[$pmc],
bin=>$Bin
Modified: branches/rm_cflags/tools/dev/nci_thunk_gen.pir
==============================================================================
--- branches/rm_cflags/tools/dev/nci_thunk_gen.pir Wed Feb 24 07:18:02 2010 (r44451)
+++ branches/rm_cflags/tools/dev/nci_thunk_gen.pir Wed Feb 24 08:11:58 2010 (r44452)
@@ -28,7 +28,7 @@
.macro_const VERSION 0.01
-.macro_const OPTS_GLOBAL_NAME 'options'
+.macro_const OPTS_GLOBAL_NAME 'options'
.sub 'main' :main
.param pmc argv
@@ -108,6 +108,7 @@
.macro_const LOADER_STORAGE_CLASS 'loader-storage-class'
.macro_const LOADER_NAME 'loader-name'
.macro_const CORE 'core'
+.macro_const NO_WARN_DUPS 'no-warn-dups'
.sub 'get_options'
.param pmc argv
@@ -118,6 +119,7 @@
getopt = new ['Getopt';'Obj']
push getopt, 'help|h'
push getopt, 'version|v'
+ push getopt, 'no-warn-dups|f'
push getopt, 'core'
push getopt, 'dynext'
push getopt, 'output|o=s'
@@ -163,10 +165,14 @@
Options
--help print this message and exit
--version print the version number of this utility
+ -f --no-warn-dups don't complain about duplicated signatures. Default is to warn.
--core output a thunks file suitable for inclusion in Parrot core. Default is no.
+ --dynext use default values for loader-name, loader-storage-class, and target
+ suitable for use in a Parrot dynext library.
-o --output <file> specify output file to use.
--target <target> select what to output (valid options are 'head', 'thunks',
- 'loader', 'coda', 'all', 'names', and 'signatures'). Default value is 'all'
+ 'loader', 'loader-dynext', 'coda', 'all', 'all-dynext', 'names', and
+ 'signatures'). Default value is 'all'
--thunk-storage-class <storage class>
set the storage class used for the thunks. Default value is 'static'.
--thunk-name-proto <printf prototype>
@@ -174,7 +180,8 @@
format with arity 1. Default value is 'pcf_%s'
--loader-storage-class
set the storage class used for the loader function. Default value is none.
- --loader-name set the name used for the loader function. Default value is 'Parrot_load_nci_thunks'.
+ --loader-name set the name used for the loader function. Default value is
+ 'Parrot_load_nci_thunks'.
USAGE
exit 0
.end
@@ -190,6 +197,11 @@
.sub 'fixup_opts'
.param pmc opts
+ $I0 = defined opts['no-warn-dups']
+ if $I0 goto end_no_warn_dups
+ opts['no-warn-dups'] = ''
+ end_no_warn_dups:
+
$I0 = defined opts['core']
if $I0 goto in_core
opts['core'] = ''
@@ -337,8 +349,6 @@
/* All our static functions that call in various ways. Yes, terribly
hackish, but that is just fine */
-PARROT_DYNEXT_EXPORT void Parrot_glut_nci_loader(PARROT_INTERP);
-
HEAD
.return (head)
.end
@@ -367,72 +377,58 @@
.sub 'get_loader'
.param pmc sigs
+ $S0 = 'get_loader_decl'(sigs)
+ $S1 = 'get_loader_body'(sigs)
+ $S2 = 'sprintf'(<<'LOADER', $S0, $S0, $S1)
+%s;
+%s {
+%s
+}
+LOADER
+ .return ($S2)
+.end
+
+.sub 'get_loader_decl'
+ .param pmc sigs
$S0 = 'read_from_opts'(.LOADER_STORAGE_CLASS)
$S1 = 'read_from_opts'(.LOADER_NAME)
- .local string code
- code = 'sprintf'(<<'FN_HEADER', $S0, $S1)
-
+ $S2 = 'sprintf'(<<'DECL', $S0, $S1)
%s void
%s(PARROT_INTERP)
-{
- PMC *iglobals;
- PMC *nci_funcs;
- PMC *temp_pmc;
-
- iglobals = interp->iglobals;
- PARROT_ASSERT(!(PMC_IS_NULL(iglobals)));
-
- nci_funcs = VTABLE_get_pmc_keyed_int(interp, iglobals,
- IGLOBALS_NCI_FUNCS);
- PARROT_ASSERT(!(PMC_IS_NULL(nci_funcs)));
-
-FN_HEADER
-
- .local int i, n
- i = 0
- n = sigs
- loop:
- if i >= n goto end_loop
-
- .local pmc sig
- sig = shift sigs
-
- .local string fn_name
- fn_name = 'sig_to_fn_name'(sig :flat)
-
- .local string key
- key = join '', sig
-
- $S0 = 'sprintf'(<<'TEMPLATE', fn_name, key)
- temp_pmc = Parrot_pmc_new(interp, enum_class_UnManagedStruct);
- VTABLE_set_pointer(interp, temp_pmc, (void *)%s);
- VTABLE_set_pmc_keyed_str(interp, nci_funcs, CONST_STRING(interp, "%s"), temp_pmc);
-
-TEMPLATE
- code = concat code, $S0
+DECL
+ .return ($S2)
+.end
- inc i
- goto loop
- end_loop:
+.sub 'get_dynext_loader'
+ .param pmc sigs
- code = concat code, <<'FN_FOOTER'
+ $S0 = 'get_dynext_loader_decl'(sigs)
+ $S1 = 'get_loader_body'(sigs)
+ $S2 = 'sprintf'(<<'LOADER', $S0, $S0, $S1)
+%s;
+%s {
+%s
}
-FN_FOOTER
-
- .return (code)
+LOADER
+ .return ($S2)
.end
-.sub 'get_dynext_loader'
+.sub 'get_dynext_loader_decl'
.param pmc sigs
$S0 = 'read_from_opts'(.LOADER_STORAGE_CLASS)
$S1 = 'read_from_opts'(.LOADER_NAME)
- .local string code
- code = 'sprintf'(<<'FN_HEADER', $S0, $S1)
-
+ $S2 = 'sprintf'(<<'DECL', $S0, $S1)
%s void
%s(PARROT_INTERP, SHIM(PMC *lib))
-{
+DECL
+ .return ($S2)
+.end
+
+.sub 'get_loader_body'
+ .param pmc sigs
+ .local string code
+ code = 'sprintf'(<<'HEADER', $S0, $S1)
PMC *iglobals;
PMC *nci_funcs;
PMC *temp_pmc;
@@ -444,7 +440,7 @@
IGLOBALS_NCI_FUNCS);
PARROT_ASSERT(!(PMC_IS_NULL(nci_funcs)));
-FN_HEADER
+HEADER
.local int i, n
i = 0
@@ -473,10 +469,6 @@
goto loop
end_loop:
- code = concat code, <<'FN_FOOTER'
-}
-FN_FOOTER
-
.return (code)
.end
@@ -717,6 +709,9 @@
seen = new ['Hash']
sigs = new ['ResizablePMCArray']
+ .local int no_warn_dups
+ no_warn_dups = 'read_from_opts'(.NO_WARN_DUPS)
+
.local int lineno
lineno = 0
read_loop:
@@ -733,8 +728,12 @@
# de-dup sigs
$I0 = seen[full_sig]
unless $I0 goto unseen
- $S0 = 'sprintf'("Ignored signature '%s' on line %d (previously seen on line %d)\n", full_sig, lineno, $I0)
- printerr $S0
+ if no_warn_dups goto end_dup_warn
+ $S0 = 'sprintf'(<<'ERROR', full_sig, lineno, $I0)
+Ignored signature '%s' on line %d (previously seen on line %d)
+ERROR
+ printerr $S0
+ end_dup_warn:
goto read_loop
unseen:
seen[full_sig] = lineno
@@ -765,18 +764,21 @@
end_comment:
# convert whitespace into spaces
- $S0 = '\t'
- whitespace_loop:
- $I0 = index line, $S0
- if $I0 < 0 goto end_whitespace_loop
- substr line, $I0, 1, ' '
- goto whitespace_loop
- end_whitespace_loop:
-
- if $S0 == "\n" goto end_whitespace
- $S0 = "\n"
- goto whitespace_loop
- end_whitespace:
+ .const 'Sub' $P0 = 'alternate_whitespaces'
+ $P1 = iter $P0
+ outer_whitespace_loop:
+ unless $P1 goto end_outer_whitespace_loop
+ $S0 = shift $P1
+
+ inner_whitespace_loop:
+ $I0 = index line, $S0
+ if $I0 < 0 goto end_inner_whitespace_loop
+ substr line, $I0, 1, ' '
+ goto inner_whitespace_loop
+ end_inner_whitespace_loop:
+
+ goto outer_whitespace_loop
+ end_outer_whitespace_loop:
# turn multiple spaces into a single space
multispace_loop:
@@ -1088,7 +1090,15 @@
.param pmc extns :slurpy
.local string dir, file, extn
- file = clone full_path
+
+ # replace native file separator with '/'
+ $S0 = 'native_file_separator'()
+ $P0 = split $S0, full_path
+ file = join "/", $P0
+
+ $P0 = split '/', file
+ file = pop $P0
+ dir = join '/', $P0
extn_loop:
unless extns goto end_extn_loop
@@ -1101,20 +1111,22 @@
substr file, $I1, $I0, ''
end_extn_loop:
- # TODO: make this portable
- .const string file_sep = '/'
+ .return (dir, file, extn)
+.end
- strip_dir_loop:
- $I0 = index file, file_sep
- if $I0 < 0 goto end_strip_dir_loop
- inc $I0
- $S0 = substr file, 0, $I0
- dir = concat dir, $S0
- file = substr file, $I0
- goto strip_dir_loop
- end_strip_dir_loop:
+.sub 'native_file_separator'
+ load_bytecode 'config.pbc'
+ $P0 = '_config'()
+ $S0 = $P0['slash']
+ .return ($S0)
+.end
- .return (dir, file, extn)
+.sub 'alternate_whitespaces' :anon :immediate
+ $P0 = new ['ResizableStringArray']
+ push $P0, "\t"
+ push $P0, "\n"
+ push $P0, "\r"
+ .return ($P0)
.end
# }}}
More information about the parrot-commits
mailing list