Author: bernhard
Date: Thu Oct 20 15:05:12 2005
New Revision: 9523
Added:
trunk/examples/pir/io.pir
- copied, changed from r9520, trunk/examples/assembly/io1.pasm
trunk/t/README
trunk/t/perl/manifest.t
- copied unchanged from r9520, trunk/t/src/manifest.t
Removed:
trunk/examples/assembly/io1.pasm
trunk/examples/assembly/io2.pasm
trunk/t/src/manifest.t
Modified:
trunk/MANIFEST
trunk/MANIFEST.SKIP
trunk/config/gen/makefiles/root.in
trunk/examples/pasm/ (props changed)
trunk/t/examples/pir.t
Log:
Merge the examples 'assembly/io1.pasm' and 'assembly/io2.pasm'
into 'pir/io.pir'.
Add a test for io.pir.
Add t/README, which refers to docs/tests.pod.
manifest.t in not a C-program test, so move it to t/perl
Detabify the root Makefile.
Tell SVN to ignore 'hello' and 'hello.pbc'.
Modified: trunk/MANIFEST
==============================================================================
--- trunk/MANIFEST (original)
+++ trunk/MANIFEST Thu Oct 20 15:05:12 2005
@@ -446,8 +446,6 @@ examples/README
examples/assembly/Makefile [main]doc
examples/assembly/acorn.l [main]doc
examples/assembly/hello-dwim.imc [main]doc
-examples/assembly/io1.pasm [main]doc
-examples/assembly/io2.pasm [main]doc
examples/assembly/jump.pasm [main]doc
examples/assembly/lexical.pasm [main]doc
examples/assembly/lexical2.pasm [main]doc
@@ -602,6 +600,7 @@ examples/pasm/hello.pasm
examples/pir/circle.pir [main]doc
examples/pir/euclid.pir [main]doc
examples/pir/hanoi.pir [main]doc
+examples/pir/io.pir [main]doc
examples/pir/mandel.pir [main]doc
examples/pir/sudoku.pir [main]doc
examples/pni/PQt.C [main]doc
@@ -1789,6 +1788,7 @@ src/tsq.c
src/utils.c []
src/vtables.c []
src/warnings.c []
+t/README []
t/benchmarks.t []
t/doc/pod.t []
t/dynclass/foo.t []
@@ -1864,6 +1864,7 @@ t/p6rules/ws.t
t/perl/Parrot_Distribution.t [devel]
t/perl/Parrot_Docs.t [devel]
t/perl/Parrot_IO.t [devel]
+t/perl/manifest.t []
t/pmc/array.t []
t/pmc/bigint.t []
t/pmc/boolean.t []
@@ -1952,7 +1953,6 @@ t/src/hash.t
t/src/intlist.t []
t/src/io.t []
t/src/list.t []
-t/src/manifest.t []
t/src/opcode-doc.t []
t/src/sprintf.t []
t/src/string.t []
Modified: trunk/MANIFEST.SKIP
==============================================================================
--- trunk/MANIFEST.SKIP (original)
+++ trunk/MANIFEST.SKIP Thu Oct 20 15:05:12 2005
@@ -1,5 +1,5 @@
# $Id$
-# generated by gen_manifest_skip.pl Mon Oct 17 20:11:22 2005
+# generated by gen_manifest_skip.pl Thu Oct 20 23:55:34 2005
#
# Please update t/src/manifest.t when adding patterns here
\B\.svn\b
@@ -218,6 +218,10 @@
^examples/mops/mops$
^examples/mops/mops/
# generated from svn:ignore of 'examples/pasm/'
+^examples/pasm/hello$
+^examples/pasm/hello/
+^examples/pasm/hello\.pbc$
+^examples/pasm/hello\.pbc/
# generated from svn:ignore of 'examples/pir/'
# generated from svn:ignore of 'examples/pni/'
# generated from svn:ignore of 'examples/sdl/'
Modified: trunk/config/gen/makefiles/root.in
==============================================================================
--- trunk/config/gen/makefiles/root.in (original)
+++ trunk/config/gen/makefiles/root.in Thu Oct 20 15:05:12 2005
@@ -671,38 +671,38 @@ parrot.def : build_tools\parrotdef.pl
perl build_tools/parrotdef.pl
$(PARROT) : $(IMCC_DIR)/main$(O) $(GEN_HEADERS) $(LIBPARROT) \
- lib/Parrot/OpLib/core.pm $(SRC_DIR)/parrot_config$(O) \
- $(MINIPARROT) ${parrot_exe_def}
+ lib/Parrot/OpLib/core.pm $(SRC_DIR)/parrot_config$(O) \
+ $(MINIPARROT) ${parrot_exe_def}
$(LINK) ${ld_out}$(PARROT) $(LINKFLAGS) $(LINK_DYNAMIC)
${ld_parrot_exe_def} \
- $(IMCC_DIR)/main$(O) $(ALL_PARROT_LIBS) $(SRC_DIR)/parrot_config$(O)
+ $(IMCC_DIR)/main$(O) $(ALL_PARROT_LIBS) $(SRC_DIR)/parrot_config$(O)
#
# TODO build the real miniparrot
#
$(MINIPARROT) : $(IMCC_DIR)/main$(O) $(GEN_HEADERS) $(LIBPARROT) \
- lib/Parrot/OpLib/core.pm $(SRC_DIR)/null_config$(O)
+ lib/Parrot/OpLib/core.pm $(SRC_DIR)/null_config$(O)
$(LINK) ${ld_out}$(MINIPARROT) $(LINKFLAGS) $(IMCC_DIR)/main$(O) \
- $(ALL_PARROT_LIBS) $(SRC_DIR)/null_config$(O)
+ $(ALL_PARROT_LIBS) $(SRC_DIR)/null_config$(O)
$(INSTALLABLEPARROT) : $(IMCC_DIR)/main$(O) $(GEN_HEADERS) $(LIBPARROT) \
- lib/Parrot/OpLib/core.pm $(SRC_DIR)/install_config$(O) \
- $(PARROT)
+ lib/Parrot/OpLib/core.pm $(SRC_DIR)/install_config$(O) \
+ $(PARROT)
$(LINK) ${ld_out}$(INSTALLABLEPARROT) $(LINKFLAGS) \
- $(IMCC_DIR)/main$(O) \
- $(ALL_PARROT_LIBS) $(SRC_DIR)/install_config$(O)
+ $(IMCC_DIR)/main$(O) \
+ $(ALL_PARROT_LIBS) $(SRC_DIR)/install_config$(O)
$(SRC_DIR)/parrot_config.c : runtime/parrot/include/config.fpmc \
- $(BUILD_TOOLS_DIR)/parrot_config_c.pl
+ $(BUILD_TOOLS_DIR)/parrot_config_c.pl
$(PERL) $(BUILD_TOOLS_DIR)/parrot_config_c.pl > \
- $(SRC_DIR)/parrot_config.c
+ $(SRC_DIR)/parrot_config.c
$(SRC_DIR)/install_config.c : install_config.fpmc \
- $(BUILD_TOOLS_DIR)/parrot_config_c.pl
+ $(BUILD_TOOLS_DIR)/parrot_config_c.pl
$(PERL) $(BUILD_TOOLS_DIR)/parrot_config_c.pl --install > \
- $(SRC_DIR)/install_config.c
+ $(SRC_DIR)/install_config.c
$(SRC_DIR)/null_config.c : myconfig $(BUILD_TOOLS_DIR)/parrot_config_c.pl
$(PERL) $(BUILD_TOOLS_DIR)/parrot_config_c.pl --mini > \
- $(SRC_DIR)/null_config.c
+ $(SRC_DIR)/null_config.c
install_config.fpmc : myconfig config_lib.pasm $(PARROT)
@echo Invoking Parrot to generate install_config.fpmc
@@ -774,9 +774,9 @@ $(SRC_DIR)/disassemble$(O) : $(GENERAL_H
$(DIS) : $(SRC_DIR)/disassemble$(O) $(LIBPARROT)
$(LINK) ${ld_out}$(DIS) \
- $(SRC_DIR)/disassemble$(O) \
- $(SRC_DIR)/null_config$(O) \
- $(LINKFLAGS) $(ALL_PARROT_LIBS)
+ $(SRC_DIR)/disassemble$(O) \
+ $(SRC_DIR)/null_config$(O) \
+ $(LINKFLAGS) $(ALL_PARROT_LIBS)
#
# Parrot Dump
@@ -784,17 +784,17 @@ $(DIS) : $(SRC_DIR)/disassemble$(O) $(LI
$(PDUMP) : $(SRC_DIR)/pdump$(O) $(SRC_DIR)/packdump$(O) $(LIBPARROT)
$(LINK) ${ld_out}$(PDUMP) \
- $(SRC_DIR)/pdump$(O) \
- $(SRC_DIR)/null_config$(O) \
- $(SRC_DIR)/packdump$(O) $(LINKFLAGS) $(ALL_PARROT_LIBS)
+ $(SRC_DIR)/pdump$(O) \
+ $(SRC_DIR)/null_config$(O) \
+ $(SRC_DIR)/packdump$(O) $(LINKFLAGS) $(ALL_PARROT_LIBS)
# pbc_info
$(PINFO) : $(SRC_DIR)/pbc_info$(O) $(LIBPARROT)
$(LINK) ${ld_out}$(PINFO) \
- $(SRC_DIR)/pbc_info$(O) \
- $(SRC_DIR)/null_config$(O) \
- $(LINKFLAGS) $(ALL_PARROT_LIBS)
+ $(SRC_DIR)/pbc_info$(O) \
+ $(SRC_DIR)/null_config$(O) \
+ $(LINKFLAGS) $(ALL_PARROT_LIBS)
#
# Parrot Bytecode File Merger
@@ -803,9 +803,9 @@ $(PINFO) : $(SRC_DIR)/pbc_info$(O) $(LIB
# pbc_info
$(PBCMERGE) : $(SRC_DIR)/pbc_merge$(O) $(LIBPARROT)
$(LINK) ${ld_out}$(PBCMERGE) \
- $(SRC_DIR)/pbc_merge$(O) \
- $(SRC_DIR)/null_config$(O) \
- $(LINKFLAGS) $(ALL_PARROT_LIBS)
+ $(SRC_DIR)/pbc_merge$(O) \
+ $(SRC_DIR)/null_config$(O) \
+ $(LINKFLAGS) $(ALL_PARROT_LIBS)
@@ -847,7 +847,7 @@ examples-clean:
examples/pasm/hello$(EXE)
# hello
-hello: test_prep examples/pasm/hello$(EXE)
+hello: test_prep examples/pasm/hello$(EXE)
$(CUR_DIR)/examples/pasm/hello$(EXE)
examples/pasm/hello.pbc: examples/pasm/hello.pasm
@@ -856,7 +856,7 @@ examples/pasm/hello.pbc: examples/pasm/h
examples/pasm/hello$(O): examples/pasm/hello.pbc
$(PARROT) -o examples/pasm/hello$(O) examples/pasm/hello.pbc
-examples/pasm/hello$(EXE): examples/pasm/hello$(O)
+examples/pasm/hello$(EXE): examples/pasm/hello$(O)
$(MAKE) EXEC=examples/pasm/hello exec
@@ -1366,9 +1366,9 @@ prog-clean :
$(PDB) $(SRC_DIR)/pdb$(O) \
$(PBCMERGE) $(SRC_DIR)/pbc_merge$(O) \
$(DIS) $(SRC_DIR)/disassemble$(O) \
- $(SRC_DIR)/null_config$(O) \
- $(SRC_DIR)/parrot_config$(O) \
- $(SRC_DIR)/install_config$(O) \
+ $(SRC_DIR)/null_config$(O) \
+ $(SRC_DIR)/parrot_config$(O) \
+ $(SRC_DIR)/install_config$(O) \
$(LIBNCI_TEST_SO) \
$(LIBPARROT)
$(PERL) build_tools/c2str.pl --init
@@ -1385,9 +1385,9 @@ dynext-clean :
# win32 program data base - contains debugging info
$(RM_F) *.pdb $(DYNEXT_DIR)/*.pdb
# win32 incremental link status files
- $(RM_F) *.ilk $(DYNEXT_DIR)/*.ilk
+ $(RM_F) *.ilk $(DYNEXT_DIR)/*.ilk
# win32 exported functions and data items
- $(RM_F) $(DYNEXT_DIR)/*.exp
+ $(RM_F) $(DYNEXT_DIR)/*.exp
# win32 export definition files
$(RM_F) *.def
@@ -1490,13 +1490,13 @@ lint2 : $(PARROT)
install : $(INSTALLABLEPARROT)
$(PERL) tools/dev/install_files.pl \
- --buildprefix=$(BUILDPREFIX) \
- --prefix=$(PREFIX) \
- --exec-prefix=$(EXEC_PREFIX) \
- --bindir=$(BIN_DIR) \
- --libdir=$(LIB_DIR) \
- --includedir=$(INCLUDE_DIR) \
- MANIFEST MANIFEST.generated
+ --buildprefix=$(BUILDPREFIX) \
+ --prefix=$(PREFIX) \
+ --exec-prefix=$(EXEC_PREFIX) \
+ --bindir=$(BIN_DIR) \
+ --libdir=$(LIB_DIR) \
+ --includedir=$(INCLUDE_DIR) \
+ MANIFEST MANIFEST.generated
###############################################################################
#
@@ -1555,12 +1555,12 @@ exec_so : $(SRC_DIR)/exec_start$(O) blib
# for use by t/pmc/nci.t
$(LIBNCI_TEST_SO): $(SRC_DIR)/nci_test$(O)
$(LD) $(LD_LOAD_FLAGS) ${ncilib_link_extra} $(LDFLAGS) \
- ${ld_out}$@ $(SRC_DIR)/nci_test$(O) $(C_LIBS)
+ ${ld_out}$@ $(SRC_DIR)/nci_test$(O) $(C_LIBS)
# vim ctags
# this needs exuberant-ctags
-tags: tags.dummy
+tags: tags.dummy
$(RM_F) tags
ctags -R --links=no $(CUR_DIR)
$(PERL) editor/addtags ops/*.ops
Copied: trunk/examples/pir/io.pir (from r9520, trunk/examples/assembly/io1.pasm)
==============================================================================
--- trunk/examples/assembly/io1.pasm (original)
+++ trunk/examples/pir/io.pir Thu Oct 20 15:05:12 2005
@@ -1,37 +1,44 @@
-# Copyright (C) 2001-2003 The Perl Foundation. All rights reserved.
+# Copyright (C) 2001-2005 The Perl Foundation. All rights reserved.
# $Id$
=head1 NAME
-examples/assembly/io1.pasm - IO Example
+examples/pir/io.pir - IO Example
=head1 SYNOPSIS
- % ./parrot examples/assembly/io1.pasm
+ % ./parrot examples/pir/io.pir
=head1 DESCRIPTION
-Simple open/seek/write/close on a file. No output. You should check
-where the file is going to be before you run this.
+Simple open/seek/write/close on a file. After the file is written it is read
in again
+and printed to STDOUT.
+You should check where the file is going to be before you run this.
=cut
-#open P0, "/tmp/seektest.dat", ">"
-open P0, "seektest.dat", ">"
-seek P0, 300, 0
-# 64bit version of seek with high 32bits = 0
-#seek IO, P0, 0, 400, 0
-print P0, "test1\n"
-print P0, "test2\n"
-print P0, "test3\n"
-seek P0, 0, 0
-print P0, "test4\n"
-print P0, "test5\n"
-close P0
-end
+.sub 'example' :main
+ .local string test_fn
+ test_fn = "tmp_example_io.tmp"
+ P0 = open test_fn, ">"
+ seek P0, 300, 0
+ # 64bit version of seek with high 32bits = 0
+ #seek IO, P0, 0, 400, 0
+ print P0, "test1\n"
+ print P0, "test2\n"
+ print P0, "test3\n"
+ seek P0, 0, 0
+ print P0, "test4\n"
+ print P0, "test5\n"
+ close P0
+
+ P0 = open test_fn, "<"
+ S0 = read P0, 1024
+ print S0
+.end
-=head1 SEE ASLO
+=head1 SEE ALSO
-F<examples/assembly/io2.pasm>.
+F<examples/io>.
=cut
Added: trunk/t/README
==============================================================================
--- (empty file)
+++ trunk/t/README Thu Oct 20 15:05:12 2005
@@ -0,0 +1,5 @@
+# Copyright: 2005 The Perl Foundation. All Rights Reserved.
+# $Id$
+
+The directory contains part of the Parrot test suite.
+For details see the documentation in 'docs/tests.pod'.
Modified: trunk/t/examples/pir.t
==============================================================================
--- trunk/t/examples/pir.t (original)
+++ trunk/t/examples/pir.t Thu Oct 20 15:05:12 2005
@@ -32,7 +32,7 @@ Bernhard Schmalhofer - <Bernhard.Schmalh
=cut
use strict;
-use Parrot::Test tests => 5;
+use Parrot::Test tests => 6;
use Test::More;
use Parrot::Config;
@@ -81,6 +81,14 @@ Using default size 3 for tower.
END_EXPECTED
+ 'io.pir' => << 'END_EXPECTED',
+test4
+test5
+ test1
+test2
+test3
+END_EXPECTED
+
'mandel.pir' => << 'END_EXPECTED',
................::::::::::::::::::::::::::::::::::::::::::::...............
...........::::::::::::::::::::::::::::::::::::::::::::::::::::::..........