[svn:parrot] r47061 - in trunk: . t/native_pbc t/native_pbc/testdata t/pmc/testlib tools/dev

bacek at svn.parrot.org bacek at svn.parrot.org
Thu May 27 21:12:15 UTC 2010


Author: bacek
Date: Thu May 27 21:12:15 2010
New Revision: 47061
URL: https://trac.parrot.org/parrot/changeset/47061

Log:
Separate PBCs used for Packfile* PMC testing from "native" PBCs.

Added:
   trunk/tools/dev/mk_packfile_pbc
Modified:
   trunk/PBC_COMPAT
   trunk/t/native_pbc/annotations.pbc
   trunk/t/native_pbc/testdata/string.pasm
   trunk/t/pmc/testlib/packfile_common.pir

Modified: trunk/PBC_COMPAT
==============================================================================
--- trunk/PBC_COMPAT	Thu May 27 21:11:35 2010	(r47060)
+++ trunk/PBC_COMPAT	Thu May 27 21:12:15 2010	(r47061)
@@ -23,7 +23,8 @@
 
 # TODO TT #361: all .pbc files should make-depend on PBC_COMPAT
 
-# Also, if you're removing an opcode, be sure to run "make opsrenumber"
+# Also, don't forget to run tools/dev/mk_packfile_pbc to rebuild PBCs
+# used for testing Packfile* PMCs.
 
 # please insert tab separated entries at the top of the list
 

Modified: trunk/t/native_pbc/annotations.pbc
==============================================================================
Binary file (source and/or target). No diff available.

Modified: trunk/t/native_pbc/testdata/string.pasm
==============================================================================
--- trunk/t/native_pbc/testdata/string.pasm	Thu May 27 21:11:35 2010	(r47060)
+++ trunk/t/native_pbc/testdata/string.pasm	Thu May 27 21:12:15 2010	(r47061)
@@ -3,7 +3,7 @@
 
     set S1, "abc"
     set S2, "EE"
-    bors S0, S1, S2
+    concat S0, S1, S2
     print S0
     print "\n"
     print S1

Modified: trunk/t/pmc/testlib/packfile_common.pir
==============================================================================
--- trunk/t/pmc/testlib/packfile_common.pir	Thu May 27 21:11:35 2010	(r47060)
+++ trunk/t/pmc/testlib/packfile_common.pir	Thu May 27 21:12:15 2010	(r47061)
@@ -11,7 +11,7 @@
 
 .sub '_filename'
     .local string filename
-    filename = 't/native_pbc/number_1.pbc'
+    filename = 't/native_pbc/number.pbc'
     .return (filename)
 .end
 

Added: trunk/tools/dev/mk_packfile_pbc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/tools/dev/mk_packfile_pbc	Thu May 27 21:12:15 2010	(r47061)
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+# sh tools/dev/mk_packfile_pbc
+#
+# generate t/native_pbc/*.pbc for testing Packfile* PMCs.
+
+./parrot -o t/native_pbc/integer.pbc -a - <<EOF
+print 0x10203040
+end
+EOF
+[ $? -le 0 ] && echo "t/native_pbc/integer.pbc updated"
+./parrot -o t/native_pbc/number.pbc t/native_pbc/testdata/number.pasm && echo "t/native_pbc/number.pbc updated"
+./parrot -o t/native_pbc/string.pbc t/native_pbc/testdata/string.pasm  && echo "t/native_pbc/string.pbc updated"
+
+./parrot -o t/native_pbc/annotations.pbc - <<EOF
+.sub 'main'
+.annotate "file", "annotations.pir"
+.annotate "creator", "Parrot Foundation"
+.annotate "line", 1
+    say "Hi"
+    say "line"
+.annotate "line", 2
+    .return ()
+.end
+EOF
+


More information about the parrot-commits mailing list