[svn:parrot] r37812 - in trunk: examples/past examples/sdl/tetris runtime/parrot/library t/library
barney at svn.parrot.org
barney at svn.parrot.org
Sun Mar 29 11:36:55 UTC 2009
Author: barney
Date: Sun Mar 29 11:36:54 2009
New Revision: 37812
URL: https://trac.parrot.org/parrot/changeset/37812
Log:
load [yaml_]dumper.pbc instead of including library[yaml_]dumper.pir
Modified:
trunk/examples/past/01-sub.pir
trunk/examples/past/four_plus_one.pir
trunk/examples/sdl/tetris/board.pir
trunk/runtime/parrot/library/P6object.pir
trunk/runtime/parrot/library/dumper.pir
trunk/runtime/parrot/library/yaml_dumper.pir
trunk/t/library/cgi_query_hash.t
trunk/t/library/dumper.t
trunk/t/library/mime_base64.t
trunk/t/library/yaml_dumper.t
trunk/t/library/yaml_parser_syck.t
Modified: trunk/examples/past/01-sub.pir
==============================================================================
--- trunk/examples/past/01-sub.pir Sun Mar 29 10:49:29 2009 (r37811)
+++ trunk/examples/past/01-sub.pir Sun Mar 29 11:36:54 2009 (r37812)
@@ -15,11 +15,10 @@
=cut
-.include "library/dumper.pir"
-
.namespace []
.sub '__onload' :init
+ load_bytecode "dumper.pbc"
load_bytecode 'PGE.pbc'
load_bytecode 'PGE/Text.pbc'
load_bytecode 'PGE/Util.pbc'
Modified: trunk/examples/past/four_plus_one.pir
==============================================================================
--- trunk/examples/past/four_plus_one.pir Sun Mar 29 10:49:29 2009 (r37811)
+++ trunk/examples/past/four_plus_one.pir Sun Mar 29 11:36:54 2009 (r37812)
@@ -48,11 +48,10 @@
=cut
-.include "library/dumper.pir"
-
.namespace []
.sub '__onload' :init
+ load_bytecode "dumper.pbc"
load_bytecode 'PGE.pbc'
load_bytecode 'PGE/Text.pbc'
load_bytecode 'PGE/Util.pbc'
Modified: trunk/examples/sdl/tetris/board.pir
==============================================================================
--- trunk/examples/sdl/tetris/board.pir Sun Mar 29 10:49:29 2009 (r37811)
+++ trunk/examples/sdl/tetris/board.pir Sun Mar 29 11:36:54 2009 (r37812)
@@ -15,14 +15,13 @@
=cut
-.include "library/dumper.pir"
-
.namespace ["Tetris::Board"]
.sub __onload :load
$P0 = get_class "Tetris::Board"
unless null $P0 goto END
+ load_bytecode "dumper.pbc"
load_bytecode "examples/sdl/tetris/boarddata.pir"
load_bytecode "examples/sdl/tetris/blocks.pir"
get_class $P0, "Tetris::BoardData"
Modified: trunk/runtime/parrot/library/P6object.pir
==============================================================================
--- trunk/runtime/parrot/library/P6object.pir Sun Mar 29 10:49:29 2009 (r37811)
+++ trunk/runtime/parrot/library/P6object.pir Sun Mar 29 11:36:54 2009 (r37812)
@@ -7,6 +7,8 @@
=head1 SYNOPSIS
.sub 'main'
+ load_bytecode "dumper.pbc"
+
# load this library
load_bytecode 'P6object.pbc'
@@ -287,8 +289,6 @@
=cut
-.include 'library/dumper.pir'
-
.sub 'register' :method
.param pmc parrotclass
.param pmc options :slurpy :named
Modified: trunk/runtime/parrot/library/dumper.pir
==============================================================================
--- trunk/runtime/parrot/library/dumper.pir Sun Mar 29 10:49:29 2009 (r37811)
+++ trunk/runtime/parrot/library/dumper.pir Sun Mar 29 11:36:54 2009 (r37812)
@@ -11,7 +11,7 @@
=head1 SYNOPSIS
- .include "dumper.pir"
+ load_bytecode "dumper.pbc"
# dump the $P0 register
_dumper( $P0 )
Modified: trunk/runtime/parrot/library/yaml_dumper.pir
==============================================================================
--- trunk/runtime/parrot/library/yaml_dumper.pir Sun Mar 29 10:49:29 2009 (r37811)
+++ trunk/runtime/parrot/library/yaml_dumper.pir Sun Mar 29 11:36:54 2009 (r37812)
@@ -11,7 +11,7 @@
=head1 SYNOPSIS
- .include "yaml_dumper.pir"
+ load_bytecode "dumper.pbc"
# dump the P0 register
yaml( $P0 )
Modified: trunk/t/library/cgi_query_hash.t
==============================================================================
--- trunk/t/library/cgi_query_hash.t Sun Mar 29 10:49:29 2009 (r37811)
+++ trunk/t/library/cgi_query_hash.t Sun Mar 29 11:36:54 2009 (r37812)
@@ -15,9 +15,8 @@
=cut
-.include "library/dumper.pir"
-
.sub test :main
+ load_bytecode "dumper.pbc"
.include 'include/test_more.pir'
load_bytecode 'CGI/QueryHash.pbc'
Modified: trunk/t/library/dumper.t
==============================================================================
--- trunk/t/library/dumper.t Sun Mar 29 10:49:29 2009 (r37811)
+++ trunk/t/library/dumper.t Sun Mar 29 11:36:54 2009 (r37812)
@@ -26,8 +26,8 @@
# no. 1
pir_output_is( <<'CODE', <<'OUT', "dumping array of sorted numbers" );
-.include "library/dumper.pir"
.sub test :main
+ load_bytecode "dumper.pbc"
.local pmc array
new array, 'ResizablePMCArray'
@@ -62,8 +62,8 @@
# no. 2
pir_output_is( <<'CODE', <<'OUT', "dumping unsorted numbers" );
-.include "library/dumper.pir"
.sub test :main
+ load_bytecode "dumper.pbc"
.local pmc array
new array, 'ResizablePMCArray'
@@ -98,8 +98,8 @@
# no. 3
pir_output_is( <<'CODE', <<'OUT', "dumping sorted strings" );
-.include "library/dumper.pir"
.sub test :main
+ load_bytecode "dumper.pbc"
.local pmc array
new array, 'ResizablePMCArray'
@@ -131,6 +131,7 @@
pir_output_is( <<'CODE', <<'OUT', "sorting unsorted strings" );
.sub test :main
+ load_bytecode "dumper.pbc"
.local pmc array
new array, 'ResizablePMCArray'
@@ -145,7 +146,6 @@
_dumper( array, "strings" )
.end
-.include "library/dumper.pir"
CODE
"strings" => ResizablePMCArray (size:8) [
"charlie",
@@ -163,6 +163,7 @@
pir_output_is( <<'CODE', <<'OUT', "dumping different types" );
.sub test :main
+ load_bytecode "dumper.pbc"
.local pmc array
new array, 'ResizablePMCArray'
@@ -189,7 +190,6 @@
_dumper( array, "array" )
.end
-.include "library/dumper.pir"
CODE
"array" => ResizablePMCArray (size:20) [
0.1,
@@ -219,6 +219,7 @@
pir_output_is( <<'CODE', <<'OUT', "dumping complex data" );
.sub test :main
+ load_bytecode "dumper.pbc"
.local pmc hash1
.local pmc hash2
.local pmc hash3
@@ -275,7 +276,6 @@
_dumper( hash1,"hash1" )
.end
-.include "library/dumper.pir"
CODE
"hash1" => Hash {
}
@@ -322,6 +322,7 @@
pir_output_is( <<'CODE', <<'OUT', "properties" );
.sub test :main
+ load_bytecode "dumper.pbc"
.local pmc str
.local pmc array
@@ -340,7 +341,6 @@
_dumper( array )
.end
-.include "library/dumper.pir"
CODE
"VAR1" => ResizablePMCArray (size:2) [
"test1",
@@ -355,6 +355,7 @@
pir_output_is( <<'CODE', <<'OUT', "indent string" );
.sub test :main
+ load_bytecode "dumper.pbc"
.local pmc hash1
.local pmc hash2
.local pmc array1
@@ -385,7 +386,6 @@
print indent
print "'\n"
.end
-.include "library/dumper.pir"
CODE
"hash" => Hash {
| "hash2" => Hash {
@@ -423,6 +423,7 @@
pir_output_is( <<'CODE', <<'OUT', "back-referencing properties" );
.sub test :main
+ load_bytecode "dumper.pbc"
.local pmc hash
new hash, 'Hash'
@@ -431,7 +432,6 @@
setprop hash, "backref", hash
_dumper( hash )
.end
-.include "library/dumper.pir"
CODE
"VAR1" => Hash {
"hello" => "world"
@@ -444,6 +444,7 @@
pir_output_is( <<'CODE', <<'OUT', "self-referential properties (1)" );
.sub test :main
+ load_bytecode "dumper.pbc"
.local pmc hash
.local pmc prop
@@ -455,7 +456,6 @@
setprop hash, "self", prop
_dumper( hash )
.end
-.include "library/dumper.pir"
CODE
"VAR1" => Hash {
"hello" => "world"
@@ -468,6 +468,7 @@
pir_output_is( <<'CODE', <<'OUT', "self-referential properties (2)" );
.sub test :main
+ load_bytecode "dumper.pbc"
.local pmc array
.local pmc hash1
.local pmc hash2
@@ -490,7 +491,6 @@
push array, prop
_dumper( array )
.end
-.include "library/dumper.pir"
CODE
"VAR1" => ResizablePMCArray (size:4) [
Hash {
@@ -512,6 +512,7 @@
pir_output_is( <<'CODE', <<'OUT', "dumping objects" );
.sub test :main
+ load_bytecode "dumper.pbc"
.local pmc temp
.local pmc array
@@ -557,7 +558,6 @@
.end_return
.end
.namespace []
-.include "library/dumper.pir"
CODE
"VAR1" => ResizablePMCArray (size:2) [
PMC 'TestClass' {
@@ -575,6 +575,7 @@
pir_output_is( <<'CODE', <<'OUT', "dumping 'null'" );
.sub test :main
+ load_bytecode "dumper.pbc"
.local pmc array
.local pmc temp
@@ -596,7 +597,6 @@
_dumper( array, "array" )
.end
-.include "library/dumper.pir"
CODE
"array" => ResizablePMCArray (size:5) [
0,
@@ -610,8 +610,8 @@
# no. 14
pir_output_is( << 'CODE', << 'OUT', "dumping strings" );
-.include "library/dumper.pir"
.sub _test :main
+ load_bytecode "dumper.pbc"
.local pmc array
array = new 'ResizablePMCArray'
@@ -643,6 +643,7 @@
pir_output_is( <<'CODE', <<'OUT', "dumping complex data in Hash" );
.sub test :main
+ load_bytecode "dumper.pbc"
.local pmc hash1
.local pmc hash2
.local pmc hash3
@@ -698,7 +699,6 @@
_dumper( hash1,"hash1" )
.end
-.include "library/dumper.pir"
CODE
"hash1" => Hash {
}
@@ -745,13 +745,13 @@
pir_output_is( <<'CODE', <<'OUTPUT', "dumping Integer PMC" );
.sub test :main
+ load_bytecode "dumper.pbc"
.local pmc int1
new int1, 'Integer'
int1 = 12345
_dumper( int1, "Int:" )
.end
-.include "library/dumper.pir"
CODE
"Int:" => 12345
OUTPUT
@@ -760,13 +760,13 @@
pir_output_is( <<'CODE', <<'OUTPUT', "dumping Float PMC" );
.sub test :main
+ load_bytecode "dumper.pbc"
.local pmc float1
new float1, 'Float'
float1 = 12345.678
_dumper( float1, "Float:" )
.end
-.include "library/dumper.pir"
CODE
"Float:" => 12345.678
OUTPUT
@@ -774,6 +774,7 @@
# no. 18
pir_output_is( <<'CODE', <<'OUTPUT', "dumping ResizablePMCArray PMC" );
.sub test :main
+ load_bytecode "dumper.pbc"
.local pmc array
new array, 'ResizablePMCArray'
@@ -781,7 +782,6 @@
push array, "hello"
_dumper( array, "array:" )
.end
-.include "library/dumper.pir"
CODE
"array:" => ResizablePMCArray (size:2) [
12345,
@@ -792,6 +792,7 @@
# no. 19
pir_output_is( <<'CODE', <<'OUTPUT', "dumping ResizableStringArray PMC" );
.sub test :main
+ load_bytecode "dumper.pbc"
.local pmc array
new array, 'ResizableStringArray'
@@ -799,7 +800,6 @@
push array, "world"
_dumper( array, "array:" )
.end
-.include "library/dumper.pir"
CODE
"array:" => ResizableStringArray (size:2) [
"hello",
@@ -810,6 +810,7 @@
# no. 20
pir_output_is( <<'CODE', <<'OUTPUT', "dumping ResizableIntegerArray PMC" );
.sub test :main
+ load_bytecode "dumper.pbc"
.local pmc array
new array, 'ResizableIntegerArray'
@@ -817,7 +818,6 @@
push array, 67890
_dumper( array, "array:" )
.end
-.include "library/dumper.pir"
CODE
"array:" => ResizableIntegerArray (size:2) [
12345,
@@ -828,6 +828,7 @@
# no. 21
pir_output_is( <<'CODE', <<'OUTPUT', "dumping ResizableFloatArray PMC" );
.sub test :main
+ load_bytecode "dumper.pbc"
.local pmc array
new array, 'ResizableFloatArray'
@@ -835,7 +836,6 @@
push array, 67.89
_dumper( array, "array:" )
.end
-.include "library/dumper.pir"
CODE
"array:" => ResizableFloatArray (size:2) [
123.45,
@@ -846,6 +846,7 @@
# no. 22
pir_output_is( <<'CODE', <<'OUTPUT', "dumping FixedPMCArray PMC" );
.sub test :main
+ load_bytecode "dumper.pbc"
.local pmc array
new array, 'FixedPMCArray'
@@ -854,7 +855,6 @@
array[1] = "hello"
_dumper( array, "array:" )
.end
-.include "library/dumper.pir"
CODE
"array:" => FixedPMCArray (size:2) [
12345,
@@ -865,6 +865,7 @@
# no. 23
pir_output_is( <<'CODE', <<'OUTPUT', "dumping FixedStringArray PMC" );
.sub test :main
+ load_bytecode "dumper.pbc"
.local pmc array
new array, 'FixedStringArray'
@@ -873,7 +874,6 @@
array[1] = "world"
_dumper( array, "array:" )
.end
-.include "library/dumper.pir"
CODE
"array:" => FixedStringArray (size:2) [
"hello",
@@ -884,6 +884,7 @@
# no. 24
pir_output_is( <<'CODE', <<'OUTPUT', "dumping FixedIntegerArray PMC" );
.sub test :main
+ load_bytecode "dumper.pbc"
.local pmc array
new array, 'FixedIntegerArray'
@@ -892,7 +893,6 @@
array[1] = 67890
_dumper( array, "array:" )
.end
-.include "library/dumper.pir"
CODE
"array:" => FixedIntegerArray (size:2) [
12345,
@@ -903,6 +903,7 @@
# no. 25
pir_output_is( <<'CODE', <<'OUTPUT', "dumping FixedFloatArray PMC" );
.sub test :main
+ load_bytecode "dumper.pbc"
.local pmc array
new array, 'FixedFloatArray'
@@ -911,7 +912,6 @@
array[1] = 67.89
_dumper( array, "array:" )
.end
-.include "library/dumper.pir"
CODE
"array:" => FixedFloatArray (size:2) [
123.45,
@@ -924,6 +924,7 @@
# no. 27
pir_output_is( <<'CODE', <<'OUTPUT', "custom dumper" );
.sub main :main
+ load_bytecode "dumper.pbc"
.local pmc o, cl
cl = subclass 'ResizablePMCArray', 'bar'
o = new cl
@@ -948,7 +949,6 @@
print "\n}"
.end
.namespace []
-.include 'library/dumper.pir'
CODE
"VAR1" => PMC 'bar' __value => {
Modified: trunk/t/library/mime_base64.t
==============================================================================
--- trunk/t/library/mime_base64.t Sun Mar 29 10:49:29 2009 (r37811)
+++ trunk/t/library/mime_base64.t Sun Mar 29 11:36:54 2009 (r37812)
@@ -16,10 +16,8 @@
=cut
-.include "library/dumper.pir"
-
.sub test :main
-
+ load_bytecode "dumper.pbc"
load_bytecode 'Test/More.pir'
load_bytecode 'MIME/Base64.pir'
load_bytecode 'PGE.pbc'
Modified: trunk/t/library/yaml_dumper.t
==============================================================================
--- trunk/t/library/yaml_dumper.t Sun Mar 29 10:49:29 2009 (r37811)
+++ trunk/t/library/yaml_dumper.t Sun Mar 29 11:36:54 2009 (r37812)
@@ -26,8 +26,8 @@
pir_output_is( <<'CODE', <<'OUT', "dumping array of sorted numbers" );
-.include "library/yaml_dumper.pir"
.sub test :main
+ load_bytecode "yaml_dumper.pbc"
.local pmc array
new array, 'ResizablePMCArray'
@@ -64,8 +64,8 @@
pir_output_is( <<'CODE', <<'OUT', "dumping unsorted numbers" );
-.include "library/yaml_dumper.pir"
.sub test :main
+ load_bytecode "yaml_dumper.pbc"
.local pmc array
new array, 'ResizablePMCArray'
@@ -103,8 +103,8 @@
pir_output_is( <<'CODE', <<'OUT', "dumping sorted strings" );
-.include "library/yaml_dumper.pir"
.sub test :main
+ load_bytecode "yaml_dumper.pbc"
.local pmc array
new array, 'ResizablePMCArray'
@@ -139,6 +139,7 @@
pir_output_is( <<'CODE', <<'OUT', "sorting unsorted strings" );
.sub test :main
+ load_bytecode "yaml_dumper.pbc"
.local pmc array
new array, 'ResizablePMCArray'
@@ -153,7 +154,6 @@
yaml( array, "strings" )
.end
-.include "library/yaml_dumper.pir"
CODE
---
{
@@ -174,6 +174,7 @@
pir_output_is( <<'CODE', <<'OUT', "dumping different types" );
.sub test :main
+ load_bytecode "yaml_dumper.pbc"
.local pmc array
new array, 'ResizablePMCArray'
@@ -200,7 +201,6 @@
yaml( array, "array" )
.end
-.include "library/yaml_dumper.pir"
CODE
---
{
@@ -233,6 +233,7 @@
pir_output_is( <<'CODE', <<'OUT', "dumping complex data" );
.sub test :main
+ load_bytecode "yaml_dumper.pbc"
.local pmc hash1
.local pmc hash2
.local pmc hash3
@@ -289,7 +290,6 @@
yaml( hash1,"hash1" )
.end
-.include "library/yaml_dumper.pir"
CODE
---
{
@@ -354,6 +354,7 @@
pir_output_is( <<'CODE', <<'OUT', "properties", todo => 'not yet implemented' );
.sub test :main
+ load_bytecode "yaml_dumper.pbc"
.local pmc str
.local pmc array
@@ -372,7 +373,6 @@
yaml( array )
.end
-.include "library/yaml_dumper.pir"
CODE
---
{
@@ -389,6 +389,7 @@
pir_output_is( <<'CODE', <<'OUT', "indent string", todo => 'not supported' );
.sub test :main
+ load_bytecode "yaml_dumper.pbc"
.local pmc hash1
.local pmc hash2
.local pmc array1
@@ -419,7 +420,6 @@
print indent
print "'\n"
.end
-.include "library/yaml_dumper.pir"
CODE
"hash" : Hash {
| "hash2" : Hash {
@@ -457,6 +457,7 @@
pir_output_is( <<'CODE', <<'OUT', "back-referencing properties", todo => 'not yet implemented' );
.sub test :main
+ load_bytecode "yaml_dumper.pbc"
.local pmc hash
new hash, 'Hash'
@@ -465,7 +466,6 @@
setprop hash, "backref", hash
yaml( hash )
.end
-.include "library/yaml_dumper.pir"
CODE
"VAR1" : Hash {
"hello" : "world"
@@ -478,6 +478,7 @@
pir_output_is( <<'CODE', <<'OUT', "self-referential properties (1)", todo => 'not yet implemented' );
.sub test :main
+ load_bytecode "yaml_dumper.pbc"
.local pmc hash
.local pmc prop
@@ -489,7 +490,6 @@
setprop hash, "self", prop
yaml( hash )
.end
-.include "library/yaml_dumper.pir"
CODE
"VAR1" : Hash {
"hello" : "world"
@@ -502,6 +502,7 @@
pir_output_is( <<'CODE', <<'OUT', "self-referential properties (2)", todo => 'not yet implemented' );
.sub test :main
+ load_bytecode "yaml_dumper.pbc"
.local pmc array
.local pmc hash1
.local pmc hash2
@@ -524,7 +525,6 @@
push array, prop
yaml( array )
.end
-.include "library/yaml_dumper.pir"
CODE
"VAR1" : ResizablePMCArray (size:4) [
Hash {
@@ -546,6 +546,7 @@
pir_output_is( <<'CODE', <<'OUT', "dumping objects" );
.sub test :main
+ load_bytecode "yaml_dumper.pbc"
.local pmc temp
.local pmc array
@@ -591,7 +592,6 @@
.end_return
.end
.namespace []
-.include "library/yaml_dumper.pir"
CODE
---
{
@@ -612,6 +612,7 @@
pir_output_is( <<'CODE', <<'OUT', "dumping 'null'" );
.sub test :main
+ load_bytecode "yaml_dumper.pbc"
.local pmc array
.local pmc temp
@@ -633,7 +634,6 @@
yaml( array, "array" )
.end
-.include "library/yaml_dumper.pir"
CODE
---
{
@@ -650,8 +650,8 @@
pir_output_is( << 'CODE', << 'OUT', "dumping strings" );
-.include "library/yaml_dumper.pir"
.sub _test :main
+ load_bytecode "yaml_dumper.pbc"
.local pmc array
array = new 'ResizablePMCArray'
@@ -686,6 +686,7 @@
pir_output_is( <<'CODE', <<'OUT', "dumping complex data in Hash" );
.sub test :main
+ load_bytecode "yaml_dumper.pbc"
.local pmc hash1
.local pmc hash2
.local pmc hash3
@@ -741,7 +742,6 @@
yaml( hash1,"hash1" )
.end
-.include "library/yaml_dumper.pir"
CODE
---
{
@@ -806,13 +806,13 @@
pir_output_is( <<'CODE', <<'OUTPUT', "dumping Integer PMC" );
.sub test :main
+ load_bytecode "yaml_dumper.pbc"
.local pmc int1
new int1, 'Integer'
int1 = 12345
yaml( int1, "Int" )
.end
-.include "library/yaml_dumper.pir"
CODE
---
{
@@ -824,13 +824,13 @@
pir_output_is( <<'CODE', <<'OUTPUT', "dumping Float PMC" );
.sub test :main
+ load_bytecode "yaml_dumper.pbc"
.local pmc float1
new float1, 'Float'
float1 = 12345.678
yaml( float1, "Float" )
.end
-.include "library/yaml_dumper.pir"
CODE
---
{
@@ -842,6 +842,7 @@
pir_output_is( <<'CODE', <<'OUTPUT', "dumping ResizablePMCArray PMC" );
.sub test :main
+ load_bytecode "yaml_dumper.pbc"
.local pmc array
new array, 'ResizablePMCArray'
@@ -849,7 +850,6 @@
push array, "hello"
yaml( array, "array" )
.end
-.include "library/yaml_dumper.pir"
CODE
---
{
@@ -863,6 +863,7 @@
pir_output_is( <<'CODE', <<'OUTPUT', "dumping ResizableStringArray PMC" );
.sub test :main
+ load_bytecode "yaml_dumper.pbc"
.local pmc array
new array, 'ResizableStringArray'
@@ -870,7 +871,6 @@
push array, "world"
yaml( array, "array:" )
.end
-.include "library/yaml_dumper.pir"
CODE
---
{
@@ -884,6 +884,7 @@
pir_output_is( <<'CODE', <<'OUTPUT', "dumping ResizableIntegerArray PMC" );
.sub test :main
+ load_bytecode "yaml_dumper.pbc"
.local pmc array
new array, 'ResizableIntegerArray'
@@ -891,7 +892,6 @@
push array, 67890
yaml( array, "array:" )
.end
-.include "library/yaml_dumper.pir"
CODE
---
{
@@ -905,6 +905,7 @@
pir_output_is( <<'CODE', <<'OUTPUT', "dumping ResizableFloatArray PMC" );
.sub test :main
+ load_bytecode "yaml_dumper.pbc"
.local pmc array
new array, 'ResizableFloatArray'
@@ -912,7 +913,6 @@
push array, 67.89
yaml( array, "array:" )
.end
-.include "library/yaml_dumper.pir"
CODE
---
{
@@ -926,6 +926,7 @@
pir_output_is( <<'CODE', <<'OUTPUT', "dumping FixedPMCArray PMC" );
.sub test :main
+ load_bytecode "yaml_dumper.pbc"
.local pmc array
new array, 'FixedPMCArray'
@@ -934,7 +935,6 @@
array[1] = "hello"
yaml( array, "array:" )
.end
-.include "library/yaml_dumper.pir"
CODE
---
{
@@ -948,6 +948,7 @@
pir_output_is( <<'CODE', <<'OUTPUT', "dumping FixedStringArray PMC" );
.sub test :main
+ load_bytecode "yaml_dumper.pbc"
.local pmc array
new array, 'FixedStringArray'
@@ -956,7 +957,6 @@
array[1] = "world"
yaml( array, "array:" )
.end
-.include "library/yaml_dumper.pir"
CODE
---
{
@@ -970,6 +970,7 @@
pir_output_is( <<'CODE', <<'OUTPUT', "dumping FixedIntegerArray PMC" );
.sub test :main
+ load_bytecode "yaml_dumper.pbc"
.local pmc array
new array, 'FixedIntegerArray'
@@ -978,7 +979,6 @@
array[1] = 67890
yaml( array, "array:" )
.end
-.include "library/yaml_dumper.pir"
CODE
---
{
@@ -992,6 +992,7 @@
pir_output_is( <<'CODE', <<'OUTPUT', "dumping FixedFloatArray PMC" );
.sub test :main
+ load_bytecode "yaml_dumper.pbc"
.local pmc array
new array, 'FixedFloatArray'
@@ -1000,7 +1001,6 @@
array[1] = 67.89
yaml( array, "array:" )
.end
-.include "library/yaml_dumper.pir"
CODE
---
{
@@ -1014,6 +1014,7 @@
pir_output_is( <<'CODE', <<'OUTPUT', "custom dumper", todo => 'not yet implemented');
.sub main :main
+ load_bytecode "yaml_dumper.pbc"
.local pmc o, cl
cl = subclass 'ResizablePMCArray', 'bar'
o = new cl
@@ -1038,7 +1039,6 @@
print "\n}"
.end
.namespace []
-.include 'library/yaml_dumper.pir'
CODE
---
Modified: trunk/t/library/yaml_parser_syck.t
==============================================================================
--- trunk/t/library/yaml_parser_syck.t Sun Mar 29 10:49:29 2009 (r37811)
+++ trunk/t/library/yaml_parser_syck.t Sun Mar 29 11:36:54 2009 (r37812)
@@ -29,9 +29,9 @@
pir_output_is( << 'CODE', << 'OUT', "basic parsing" );
-.include "YAML/Parser/Syck.pir"
-.include "dumper.pir"
.sub test :main
+ load_bytecode "YAML/Parser/Syck.pbc"
+ load_bytecode "dumper.pbc"
.local pmc loaded
( loaded ) = load( "---\n- key1: val1\n key2: val2\n- elem1\n- elem12\n- elem123\n- elem1234\n- elem12345\n- elem123456\n- elem1234567\n- elem12345678\n" )
More information about the parrot-commits
mailing list