Author: bernhard
Date: Wed Oct 5 11:44:21 2005
New Revision: 9361
Added:
trunk/examples/pasm/
trunk/examples/pasm/fact.pasm
- copied unchanged from r9360, trunk/examples/assembly/fact.pasm
trunk/examples/pir/
trunk/examples/pir/mandel.pir
- copied, changed from r9360, trunk/examples/assembly/mandel.imc
trunk/t/examples/pasm.t
- copied, changed from r9360, trunk/t/examples/assembly.t
trunk/t/examples/pir.t
- copied, changed from r9360, trunk/t/examples/assembly.t
Removed:
trunk/examples/assembly/fact.pasm
trunk/examples/assembly/mandel.imc
trunk/t/examples/assembly.t
Modified:
trunk/MANIFEST
trunk/MANIFEST.SKIP
trunk/config/gen/makefiles/root.in
trunk/examples/README
trunk/examples/assembly/ (props changed)
Log:
Start with splitting up 'examples/assembly' [perl #37357]
Modified: trunk/MANIFEST
==============================================================================
--- trunk/MANIFEST (original)
+++ trunk/MANIFEST Wed Oct 5 11:44:21 2005
@@ -445,7 +445,6 @@ examples/assembly/bsr.pasm
examples/assembly/cat.pasm [main]doc
examples/assembly/coroutine.pasm [main]doc
examples/assembly/euclid.pasm [main]doc
-examples/assembly/fact.pasm [main]doc
examples/assembly/hanoi.pasm [main]doc
examples/assembly/hello.pasm [main]doc
examples/assembly/hello-dwim.imc [main]doc
@@ -457,7 +456,6 @@ examples/assembly/lexical2.pasm
examples/assembly/lexical3.pasm [main]doc
examples/assembly/life.pasm [main]doc
examples/assembly/local_label.pasm [main]doc
-examples/assembly/mandel.imc [main]doc
examples/assembly/mandel.pasm [main]doc
examples/assembly/md5sum.imc [main]doc
examples/assembly/mops.pasm [main]doc
@@ -600,6 +598,8 @@ examples/mops/mops.ps
examples/mops/mops.py [main]doc
examples/mops/mops.rb [main]doc
examples/mops/mops.scheme [main]doc
+examples/pasm/fact.pasm [main]doc
+examples/pir/mandel.pir [main]doc
examples/pni/PQt.C [main]doc
examples/pni/QtHelloWorld.pasm [main]doc
examples/pni/sdl_blue_rectangle.imc [main]doc
@@ -1792,9 +1792,10 @@ t/dynclass/pyclass.t
t/dynclass/pycomplex.t []
t/dynclass/pyfunc.t []
t/dynclass/pyint.t []
-t/examples/assembly.t []
t/examples/japh.t []
t/examples/library.t []
+t/examples/pasm.t []
+t/examples/pir.t []
t/examples/subs.t []
t/harness []
t/native_pbc/header.t []
Modified: trunk/MANIFEST.SKIP
==============================================================================
--- trunk/MANIFEST.SKIP (original)
+++ trunk/MANIFEST.SKIP Wed Oct 5 11:44:21 2005
@@ -1,5 +1,5 @@
# $Id$
-# generated by gen_manifest_skip.pl Wed Sep 28 18:38:40 2005
+# generated by gen_manifest_skip.pl Wed Oct 5 20:40:16 2005
#
# Please update t/src/manifest.t when adding patterns here
\B\.svn\b
@@ -160,6 +160,101 @@
^docs/packfile-perl\.pod$
^docs/packfile-perl\.pod/
# generated from svn:ignore of 'docs/dev/'
+# generated from svn:ignore of 'docs/html/'
+# generated from svn:ignore of 'docs/html/build_tools/'
+# generated from svn:ignore of 'docs/html/classes/'
+# generated from svn:ignore of 'docs/html/config/auto/'
+# generated from svn:ignore of 'docs/html/config/gen/'
+# generated from svn:ignore of 'docs/html/config/init/'
+# generated from svn:ignore of 'docs/html/config/inter/'
+# generated from svn:ignore of 'docs/html/docs/'
+# generated from svn:ignore of 'docs/html/docs/dev/'
+# generated from svn:ignore of 'docs/html/docs/pdds/'
+# generated from svn:ignore of 'docs/html/docs/pmc/'
+# generated from svn:ignore of 'docs/html/dynclasses/'
+# generated from svn:ignore of 'docs/html/dynoplibs/'
+# generated from svn:ignore of 'docs/html/editor/'
+# generated from svn:ignore of 'docs/html/encodings/'
+# generated from svn:ignore of 'docs/html/examples/assembly/'
+# generated from svn:ignore of 'docs/html/examples/benchmarks/'
+# generated from svn:ignore of 'docs/html/examples/c/'
+# generated from svn:ignore of 'docs/html/examples/io/'
+# generated from svn:ignore of 'docs/html/examples/mops/'
+# generated from svn:ignore of 'docs/html/examples/pni/'
+# generated from svn:ignore of 'docs/html/examples/streams/'
+# generated from svn:ignore of 'docs/html/examples/subs/'
+# generated from svn:ignore of 'docs/html/imcc/docs/'
+# generated from svn:ignore of 'docs/html/imcc/t/syn/'
+# generated from svn:ignore of 'docs/html/io/'
+# generated from svn:ignore of 'docs/html/languages/befunge/t/'
+# generated from svn:ignore of 'docs/html/languages/bf/t/'
+# generated from svn:ignore of 'docs/html/languages/conversion/examples/'
+# generated from svn:ignore of 'docs/html/languages/forth/'
+# generated from svn:ignore of 'docs/html/languages/jako/docs/'
+# generated from svn:ignore of 'docs/html/languages/jako/lib/Jako/Construct/'
+# generated from svn:ignore of 'docs/html/languages/m4/'
+# generated from svn:ignore of 'docs/html/languages/m4/M4/'
+# generated from svn:ignore of 'docs/html/languages/m4/Perl5/lib/Language/'
+# generated from svn:ignore of 'docs/html/languages/m4/Perl5/lib/Language/m4/'
+# generated from svn:ignore of 'docs/html/languages/m4/doc/'
+# generated from svn:ignore of 'docs/html/languages/m4/examples/'
+# generated from svn:ignore of 'docs/html/languages/m4/src/'
+# generated from svn:ignore of 'docs/html/languages/m4/t/'
+# generated from svn:ignore of 'docs/html/languages/m4/tools/'
+# generated from svn:ignore of 'docs/html/languages/miniperl/Miniperl/'
+# generated from svn:ignore of 'docs/html/languages/ook/t/'
+# generated from svn:ignore of
'docs/html/languages/parrot_compiler/lib/Parrot/Test/'
+# generated from svn:ignore of 'docs/html/languages/parrot_compiler/t/'
+# generated from svn:ignore of 'docs/html/languages/perl6/P6C/'
+# generated from svn:ignore of 'docs/html/languages/perl6/P6C/IMCC/'
+# generated from svn:ignore of 'docs/html/languages/perl6/P6C/IMCC/ExtRegex/'
+# generated from svn:ignore of 'docs/html/languages/perl6/P6C/Tree/'
+# generated from svn:ignore of 'docs/html/languages/perl6/doc/'
+# generated from svn:ignore of 'docs/html/languages/perl6/perl6re/'
+# generated from svn:ignore of 'docs/html/languages/python/t/'
+# generated from svn:ignore of 'docs/html/languages/regex/docs/'
+# generated from svn:ignore of 'docs/html/languages/regex/lib/Regex/'
+# generated from svn:ignore of 'docs/html/languages/regex/lib/Regex/Parse/'
+# generated from svn:ignore of 'docs/html/languages/ruby/Yacc/'
+# generated from svn:ignore of 'docs/html/languages/scheme/'
+# generated from svn:ignore of 'docs/html/languages/scheme/Scheme/'
+# generated from svn:ignore of 'docs/html/languages/scheme/t/'
+# generated from svn:ignore of 'docs/html/languages/tcl/'
+# generated from svn:ignore of 'docs/html/languages/tcl/classes/'
+# generated from svn:ignore of 'docs/html/languages/tcl/docs/'
+# generated from svn:ignore of 'docs/html/languages/tcl/lib/'
+# generated from svn:ignore of 'docs/html/languages/tcl/lib/commands/'
+# generated from svn:ignore of 'docs/html/languages/tcl/t/'
+# generated from svn:ignore of 'docs/html/lib/Parrot/'
+# generated from svn:ignore of 'docs/html/lib/Parrot/Configure/'
+# generated from svn:ignore of 'docs/html/lib/Parrot/Docs/'
+# generated from svn:ignore of 'docs/html/lib/Parrot/Docs/Section/'
+# generated from svn:ignore of 'docs/html/lib/Parrot/IO/'
+# generated from svn:ignore of 'docs/html/lib/Parrot/OpLib/'
+# generated from svn:ignore of 'docs/html/lib/Parrot/OpTrans/'
+# generated from svn:ignore of 'docs/html/ops/'
+# generated from svn:ignore of 'docs/html/pf/'
+# generated from svn:ignore of 'docs/html/runtime/parrot/include/'
+# generated from svn:ignore of 'docs/html/runtime/parrot/library/'
+# generated from svn:ignore of 'docs/html/runtime/parrot/library/Data/'
+# generated from svn:ignore of 'docs/html/runtime/parrot/library/Data/Dumper/'
+# generated from svn:ignore of 'docs/html/runtime/parrot/library/Digest/'
+# generated from svn:ignore of 'docs/html/runtime/parrot/library/Getopt/'
+# generated from svn:ignore of 'docs/html/runtime/parrot/library/PGE/'
+# generated from svn:ignore of 'docs/html/runtime/parrot/library/SDL/'
+# generated from svn:ignore of 'docs/html/runtime/parrot/library/Stream/'
+# generated from svn:ignore of 'docs/html/runtime/parrot/library/YAML/Parser/'
+# generated from svn:ignore of 'docs/html/src/'
+# generated from svn:ignore of 'docs/html/t/'
+# generated from svn:ignore of 'docs/html/t/native_pbc/'
+# generated from svn:ignore of 'docs/html/t/op/'
+# generated from svn:ignore of 'docs/html/t/pmc/'
+# generated from svn:ignore of 'docs/html/t/src/'
+# generated from svn:ignore of 'docs/html/t/stress/'
+# generated from svn:ignore of 'docs/html/tools/dev/'
+# generated from svn:ignore of 'docs/html/tools/docs/'
+# generated from svn:ignore of 'docs/html/types/'
+# generated from svn:ignore of 'docs/html/util/'
# generated from svn:ignore of 'docs/ops/'
^docs/ops/.*\.pod$
^docs/ops/.*\.pod/
@@ -199,24 +294,19 @@
^encodings/.*\.o/
# generated from svn:ignore of 'examples/'
# generated from svn:ignore of 'examples/assembly/'
-^examples/assembly/.*\.pbc$
-^examples/assembly/.*\.pbc/
-^examples/assembly/hello$
-^examples/assembly/hello/
-^examples/assembly/mops\.c$
-^examples/assembly/mops\.c/
-^examples/assembly/mops$
-^examples/assembly/mops/
# generated from svn:ignore of 'examples/benchmarks/'
# generated from svn:ignore of 'examples/c/'
# generated from svn:ignore of 'examples/compilers/'
# generated from svn:ignore of 'examples/io/'
# generated from svn:ignore of 'examples/japh/'
+# generated from svn:ignore of 'examples/library/'
# generated from svn:ignore of 'examples/mops/'
^examples/mops/.*\.o$
^examples/mops/.*\.o/
^examples/mops/mops$
^examples/mops/mops/
+# generated from svn:ignore of 'examples/pasm/'
+# generated from svn:ignore of 'examples/pir/'
# generated from svn:ignore of 'examples/pni/'
# generated from svn:ignore of 'examples/sdl/'
# generated from svn:ignore of 'examples/sdl/lcd/'
@@ -450,12 +540,6 @@
^languages/m4/runtime$
^languages/m4/runtime/
# generated from svn:ignore of 'languages/m4/M4/'
-# generated from svn:ignore of 'languages/m4/M4/t/'
-# generated from svn:ignore of 'languages/m4/Perl5/'
-# generated from svn:ignore of 'languages/m4/Perl5/lib/'
-# generated from svn:ignore of 'languages/m4/Perl5/lib/Language/'
-# generated from svn:ignore of 'languages/m4/Perl5/lib/Language/m4/'
-# generated from svn:ignore of 'languages/m4/Perl5/t/'
# generated from svn:ignore of 'languages/m4/doc/'
# generated from svn:ignore of 'languages/m4/examples/'
# generated from svn:ignore of 'languages/m4/lib/'
@@ -658,6 +742,10 @@
^languages/ruby/pm_to_blib$
^languages/ruby/pm_to_blib/
# generated from svn:ignore of 'languages/ruby/Yacc/'
+# generated from svn:ignore of 'languages/ruby/blib/arch/auto/Ruby/'
+# generated from svn:ignore of 'languages/ruby/blib/lib/'
+# generated from svn:ignore of 'languages/ruby/blib/lib/auto/Ruby/'
+# generated from svn:ignore of 'languages/ruby/blib/man3/'
# generated from svn:ignore of 'languages/ruby/t/'
# generated from svn:ignore of 'languages/scheme/'
^languages/scheme/Makefile$
@@ -714,6 +802,7 @@
^languages/tcl/lib/tcllib\.pir/
^languages/tcl/lib/.*\.pbc$
^languages/tcl/lib/.*\.pbc/
+# generated from svn:ignore of 'languages/tcl/lib/builtins/'
# generated from svn:ignore of 'languages/tcl/lib/commands/'
# generated from svn:ignore of 'languages/tcl/t/'
^languages/tcl/t/.*\.tcl$
Modified: trunk/config/gen/makefiles/root.in
==============================================================================
--- trunk/config/gen/makefiles/root.in (original)
+++ trunk/config/gen/makefiles/root.in Wed Oct 5 11:44:21 2005
@@ -1227,8 +1227,12 @@ test_prep : all
# Users have to look at only one report.
# Normal core
test : test_prep
- $(PERL) t/harness $(EXTRA_TEST_ARGS) $(PARROT_ARGS)
$(RUNCORE_TEST_FILES) \
- $(RUN_TEST_FILES) $(SRC_TEST_FILES) $(PERL_TEST_FILES)
$(TOOLS_TEST_FILES)
+ $(PERL) t/harness $(EXTRA_TEST_ARGS) $(PARROT_ARGS) \
+ $(RUNCORE_TEST_FILES) \
+ $(RUN_TEST_FILES) \
+ $(SRC_TEST_FILES) \
+ $(PERL_TEST_FILES) \
+ $(TOOLS_TEST_FILES)
# Test various run cores and other stuff
# 'testC', 'testg' and 'testj' are tested only
Modified: trunk/examples/README
==============================================================================
--- trunk/examples/README (original)
+++ trunk/examples/README Wed Oct 5 11:44:21 2005
@@ -1,10 +1,10 @@
# $Id$
-The directory 'examples' provides examples on the proper, and sometimes
clever, use
-of code for Parrot.
+The directory 'examples' provides examples of the proper,
+and sometimes hillarious, programs for Parrot.
assembly - Miscellaneous stuff in PASM and PIR
- This should be split in the dirs 'pir' and 'pasm'
+ The examples will be moved to the dirs 'pir' and 'pasm'.
benchmark - Contains benchmark. Run them with 'make testbench'
@@ -20,10 +20,14 @@ library - Examples on how to use PIR l
mops - Million ops per second
+pasm - Examples in PASM
+
+pir - Examples in PIR
+
pni - Native call interface
sdl - SDL
streams - Examples for the streams library
-subs - Parrot calling conventions
+subs - calling subroutines in PIR and PASM
Copied: trunk/examples/pir/mandel.pir (from r9360,
trunk/examples/assembly/mandel.imc)
==============================================================================
--- trunk/examples/assembly/mandel.imc (original)
+++ trunk/examples/pir/mandel.pir Wed Oct 5 11:44:21 2005
@@ -7,7 +7,7 @@ examples/assembly/mandel.imc - Print the
=head1 SYNOPSIS
- % ./parrot examples/assembly/mandel.imc
+ % ./parrot examples/pir/mandel.pir
=head1 DESCRIPTION
@@ -93,6 +93,4 @@ PRINT: $I1 = k % 16
print "\n"
dec y
if y > 0 goto YREDO
-
-END:
.end
Copied: trunk/t/examples/pasm.t (from r9360, trunk/t/examples/assembly.t)
==============================================================================
--- trunk/t/examples/assembly.t (original)
+++ trunk/t/examples/pasm.t Wed Oct 5 11:44:21 2005
@@ -4,13 +4,13 @@
=head1 NAME
-t/examples/assembly.t - Test examples in F<examples/assembly>
+t/examples/pasm.t - Test examples in F<examples/pasm>
=head1 SYNOPSIS
- % perl -Ilib t/examples/assembly.t
+ % perl -Ilib t/examples/pasm.t
- % perl t/harness t/examples/assembly.t
+ % perl t/harness t/examples/pasm.t
=head1 DESCRIPTION
@@ -51,7 +51,7 @@ my %test_func = ( pasm => \&pasm_output_
while ( my ( $example, $expected ) = each %expected )
{
- my $code_fn = "examples/assembly/$example";
+ my $code_fn = "examples/pasm/$example";
my $code = Parrot::Test::slurp_file($code_fn);
my ( $extension ) = $example =~ m{ [.] # introducing
extension
Copied: trunk/t/examples/pir.t (from r9360, trunk/t/examples/assembly.t)
==============================================================================
--- trunk/t/examples/assembly.t (original)
+++ trunk/t/examples/pir.t Wed Oct 5 11:44:21 2005
@@ -4,18 +4,17 @@
=head1 NAME
-t/examples/assembly.t - Test examples in F<examples/assembly>
+t/examples/pir.t - Test examples in F<examples/pir>
=head1 SYNOPSIS
- % perl -Ilib t/examples/assembly.t
+ % perl -Ilib t/examples/pir.t
- % perl t/harness t/examples/assembly.t
+ % perl t/harness t/examples/pir.t
=head1 DESCRIPTION
-Test the examples in F<examples/assambly>.
-For now only a fex examples are included here.
+Test the examples in F<examples/pir>.
=head1 TODO
@@ -23,7 +22,7 @@ Check on remaining examples.
=head1 SEE ALSO
-F<t/examples/japh.t>
+F<t/examples/pasm.t>
=cut
@@ -33,14 +32,37 @@ use Test::More;
# Set up expected output for examples
my %expected = (
- 'fact.pasm' => << 'END_EXPECTED',
-fact of 0 is: 1
-fact of 1 is: 1
-fact of 2 is: 2
-fact of 3 is: 6
-fact of 4 is: 24
-fact of 5 is: 120
-fact of 6 is: 720
+ 'mandel.pir' => << 'END_EXPECTED',
+................::::::::::::::::::::::::::::::::::::::::::::...............
+...........::::::::::::::::::::::::::::::::::::::::::::::::::::::..........
+........::::::::::::::::::::::::::::::::::,,,,,,,:::::::::::::::::::.......
+.....:::::::::::::::::::::::::::::,,,,,,,,,,,,,,,,,,,,,,:::::::::::::::....
+...::::::::::::::::::::::::::,,,,,,,,,,,,;;;!:H!!;;;,,,,,,,,:::::::::::::..
+:::::::::::::::::::::::::,,,,,,,,,,,,,;;;;!!/>&*|& !;;;,,,,,,,:::::::::::::
+::::::::::::::::::::::,,,,,,,,,,,,,;;;;;!!//)|.*#|>/!;;;;;,,,,,,:::::::::::
+::::::::::::::::::,,,,,,,,,,,,;;;;;;!!!!//>|: !:|//!!;;;;;,,,,,:::::::::
+:::::::::::::::,,,,,,,,,,;;;;;;;!!/>>I>>)||I# H&))>////*!;;,,,,::::::::
+::::::::::,,,,,,,,,,;;;;;;;;;!!!!/>H: #| IH&*I#/;;,,,,:::::::
+::::::,,,,,,,,,;;;;;!!!!!!!!!!//>|.H: #I>!!;;,,,,::::::
+:::,,,,,,,,,;;;;!/||>///>>///>>)|H %|&/;;,,,,,:::::
+:,,,,,,,,;;;;;!!//)& :;I*,H#&||&/ *)/!;;,,,,,::::
+,,,,,,;;;;;!!!//>)IH:, ## #&!!;;,,,,,::::
+,;;;;!!!!!///>)H%.** * )/!;;;,,,,,::::
+ &)/!!;;;,,,,,::::
+,;;;;!!!!!///>)H%.** * )/!;;;,,,,,::::
+,,,,,,;;;;;!!!//>)IH:, ## #&!!;;,,,,,::::
+:,,,,,,,,;;;;;!!//)& :;I*,H#&||&/ *)/!;;,,,,,::::
+:::,,,,,,,,,;;;;!/||>///>>///>>)|H %|&/;;,,,,,:::::
+::::::,,,,,,,,,;;;;;!!!!!!!!!!//>|.H: #I>!!;;,,,,::::::
+::::::::::,,,,,,,,,,;;;;;;;;;!!!!/>H: #| IH&*I#/;;,,,,:::::::
+:::::::::::::::,,,,,,,,,,;;;;;;;!!/>>I>>)||I# H&))>////*!;;,,,,::::::::
+::::::::::::::::::,,,,,,,,,,,,;;;;;;!!!!//>|: !:|//!!;;;;;,,,,,:::::::::
+::::::::::::::::::::::,,,,,,,,,,,,,;;;;;!!//)|.*#|>/!;;;;;,,,,,,:::::::::::
+:::::::::::::::::::::::::,,,,,,,,,,,,,;;;;!!/>&*|& !;;;,,,,,,,:::::::::::::
+...::::::::::::::::::::::::::,,,,,,,,,,,,;;;!:H!!;;;,,,,,,,,:::::::::::::..
+.....:::::::::::::::::::::::::::::,,,,,,,,,,,,,,,,,,,,,,:::::::::::::::....
+........::::::::::::::::::::::::::::::::::,,,,,,,:::::::::::::::::::.......
+...........::::::::::::::::::::::::::::::::::::::::::::::::::::::..........
END_EXPECTED
);
@@ -51,7 +73,7 @@ my %test_func = ( pasm => \&pasm_output_
while ( my ( $example, $expected ) = each %expected )
{
- my $code_fn = "examples/assembly/$example";
+ my $code_fn = "examples/pir/$example";
my $code = Parrot::Test::slurp_file($code_fn);
my ( $extension ) = $example =~ m{ [.] # introducing
extension