[svn:parrot] r38689 - in trunk: examples/streams runtime/parrot/library/Stream t/library

NotFound at svn.parrot.org NotFound at svn.parrot.org
Mon May 11 17:22:25 UTC 2009


Author: NotFound
Date: Mon May 11 17:22:23 2009
New Revision: 38689
URL: https://trac.parrot.org/parrot/changeset/38689

Log:
[cage] change class names "Streams::..." to [ Streams ; ... ], drop library/ prefix and change type from .pir to .pbc in load_bytecode in this library and his usages

Modified:
   trunk/examples/streams/Bytes.pir
   trunk/examples/streams/Combiner.pir
   trunk/examples/streams/Coroutine.pir
   trunk/examples/streams/FileLines.pir
   trunk/examples/streams/Filter.pir
   trunk/examples/streams/Include.pir
   trunk/examples/streams/Lines.pir
   trunk/examples/streams/ParrotIO.pir
   trunk/examples/streams/Replay.pir
   trunk/examples/streams/SubCounter.pir
   trunk/examples/streams/SubHello.pir
   trunk/examples/streams/Writer.pir
   trunk/runtime/parrot/library/Stream/Base.pir
   trunk/runtime/parrot/library/Stream/Combiner.pir
   trunk/runtime/parrot/library/Stream/Coroutine.pir
   trunk/runtime/parrot/library/Stream/Filter.pir
   trunk/runtime/parrot/library/Stream/Lines.pir
   trunk/runtime/parrot/library/Stream/ParrotIO.pir
   trunk/runtime/parrot/library/Stream/Replay.pir
   trunk/runtime/parrot/library/Stream/Sub.pir
   trunk/runtime/parrot/library/Stream/Writer.pir
   trunk/t/library/streams.t

Modified: trunk/examples/streams/Bytes.pir
==============================================================================
--- trunk/examples/streams/Bytes.pir	Mon May 11 16:56:32 2009	(r38688)
+++ trunk/examples/streams/Bytes.pir	Mon May 11 17:22:23 2009	(r38689)
@@ -16,15 +16,15 @@
 .sub _main :main
     .local pmc stream
 
-    load_bytecode "library/Stream/Sub.pir"
-    load_bytecode "library/Stream/Replay.pir"
+    load_bytecode 'Stream/Sub.pbc'
+    load_bytecode 'Stream/Replay.pbc'
 
-    $P0 = new "Stream::Sub"
+    $P0 = new ['Stream'; 'Sub']
     # set the stream's source sub
     .const 'Sub' temp = "_hello"
     assign $P0, $P1
 
-    stream = new "Stream::Replay"
+    stream = new ['Stream'; 'Replay']
     assign stream, $P0
 
     $S0 = stream."read_bytes"( 3 )
@@ -83,7 +83,7 @@
 
 =head1 COPYRIGHT
 
-Copyright (C) 2004-2008, Parrot Foundation.
+Copyright (C) 2004-2009, Parrot Foundation.
 
 =cut
 

Modified: trunk/examples/streams/Combiner.pir
==============================================================================
--- trunk/examples/streams/Combiner.pir	Mon May 11 16:56:32 2009	(r38688)
+++ trunk/examples/streams/Combiner.pir	Mon May 11 17:22:23 2009	(r38689)
@@ -31,23 +31,23 @@
     .local pmc text
     .local pmc combined
 
-    load_bytecode "library/Stream/Base.pbc"
-    load_bytecode "library/Stream/Combiner.pbc"
-    load_bytecode "library/Stream/Sub.pbc"
+    load_bytecode 'Stream/Base.pbc'
+    load_bytecode 'Stream/Combiner.pbc'
+    load_bytecode 'Stream/Sub.pbc'
 
     # create the counter stream
-    counter = new "Stream::Sub"
+    counter = new ['Stream'; 'Sub']
     .const 'Sub' temp = "_counter"
     assign counter, temp
 
     # create the text stream
-    text = new "Stream::Sub"
+    text = new ['Stream'; 'Sub']
     # set its source
     .const 'Sub' temp = "_text"
     assign text, temp
 
     # create a combiner stream
-    combined = new "Stream::Combiner"
+    combined = new ['Stream'; 'Combiner']
     # add the streams
     assign combined, counter
     assign combined, text
@@ -133,7 +133,7 @@
 
 =head1 COPYRIGHT
 
-Copyright (C) 2004-2008, Parrot Foundation.
+Copyright (C) 2004-2009, Parrot Foundation.
 
 =cut
 

Modified: trunk/examples/streams/Coroutine.pir
==============================================================================
--- trunk/examples/streams/Coroutine.pir	Mon May 11 16:56:32 2009	(r38688)
+++ trunk/examples/streams/Coroutine.pir	Mon May 11 17:22:23 2009	(r38689)
@@ -26,11 +26,11 @@
     .local pmc stream
     .local pmc temp
 
-    load_bytecode "library/Stream/Base.pbc"
-    load_bytecode "library/Stream/Coroutine.pbc"
+    load_bytecode "Stream/Base.pbc"
+    load_bytecode "Stream/Coroutine.pbc"
 
     # create the coroutine stream
-    stream = new "Stream::Coroutine"
+    stream = new ['Stream'; 'Coroutine']
 
     # set the stream's source coroutine
     # A .Sub is a coroutine when there is a yield?
@@ -84,7 +84,7 @@
 
 =head1 COPYRIGHT
 
-Copyright (C) 2004-2008, Parrot Foundation.
+Copyright (C) 2004-2009, Parrot Foundation.
 
 =cut
 

Modified: trunk/examples/streams/FileLines.pir
==============================================================================
--- trunk/examples/streams/FileLines.pir	Mon May 11 16:56:32 2009	(r38688)
+++ trunk/examples/streams/FileLines.pir	Mon May 11 17:22:23 2009	(r38689)
@@ -38,26 +38,26 @@
     name = argv[1]
 NO_NAME:
 
-    load_bytecode "library/Stream/ParrotIO.pir"
-    load_bytecode "library/Stream/Lines.pir"
-    load_bytecode "library/Stream/Sub.pir"
-    load_bytecode "library/Stream/Combiner.pir"
+    load_bytecode 'Stream/ParrotIO.pbc'
+    load_bytecode 'Stream/Lines.pbc'
+    load_bytecode 'Stream/Sub.pbc'
+    load_bytecode 'Stream/Combiner.pbc'
 
     # create a file stream
-    file = new "Stream::ParrotIO"
+    file = new ['Stream'; 'ParrotIO']
     file."open"( name, 'r' )
 
     # process it one line per read
-    lines = new "Stream::Lines"
+    lines = new ['Stream'; 'Lines']
     assign lines, file
 
     # endless counter
-    counter = new "Stream::Sub"
+    counter = new ['Stream'; 'Sub']
     .const 'Sub' temp = "_counter"
     assign counter, temp
 
     # combine the counter and the file's lines
-    combiner = new "Stream::Combiner"
+    combiner = new ['Stream'; 'Combiner']
     assign combiner, counter
     assign combiner, lines
 
@@ -101,7 +101,7 @@
 
 =head1 COPYRIGHT
 
-Copyright (C) 2004-2008, Parrot Foundation.
+Copyright (C) 2004-2009, Parrot Foundation.
 
 =cut
 

Modified: trunk/examples/streams/Filter.pir
==============================================================================
--- trunk/examples/streams/Filter.pir	Mon May 11 16:56:32 2009	(r38688)
+++ trunk/examples/streams/Filter.pir	Mon May 11 17:22:23 2009	(r38689)
@@ -23,17 +23,17 @@
     .local pmc stream
     .local pmc filter
 
-    load_bytecode "Stream/Sub.pir"
-    load_bytecode "Stream/Filter.pir"
+    load_bytecode 'Stream/Sub.pbc'
+    load_bytecode 'Stream/Filter.pbc'
 
     # create the counter stream
-    stream = new "Stream::Sub"
+    stream = new ['Stream'; 'Sub']
     # assign its source
     .const 'Sub' temp = "_counter"
     assign stream, temp
 
     # create the filter stream
-    filter = new "Stream::Filter"
+    filter = new ['Stream'; 'Filter']
     # assign its source
     assign filter, stream
     # set the filter sub
@@ -109,7 +109,7 @@
 
 =head1 COPYRIGHT
 
-Copyright (C) 2004-2008, Parrot Foundation.
+Copyright (C) 2004-2009, Parrot Foundation.
 
 =cut
 

Modified: trunk/examples/streams/Include.pir
==============================================================================
--- trunk/examples/streams/Include.pir	Mon May 11 16:56:32 2009	(r38688)
+++ trunk/examples/streams/Include.pir	Mon May 11 17:22:23 2009	(r38689)
@@ -17,9 +17,9 @@
 .sub _main
     .local pmc stream
 
-    load_bytecode "Stream/Sub.pir"
+    load_bytecode 'Stream/Sub.pbc'
 
-    stream = new "Stream::Sub"
+    stream = new ['Stream'; 'Sub']
 
     # set the stream's source sub
     .const 'Sub' temp = "_counter"
@@ -56,7 +56,7 @@
     if i != 4 goto SKIP
     .local pmc temp
 
-    temp = new "Stream::Sub"
+    temp = new ['Stream'; 'Sub']
 
     .const 'Sub' func = "_included"
     assign temp, func
@@ -85,7 +85,7 @@
     self."write"( "hello" )
 
     # create another stream
-    temp = new "Stream::Sub"
+    temp = new ['Stream'; 'Sub']
     .const 'Sub' func = "_counter2"
     assign temp, func
 
@@ -127,7 +127,7 @@
 
 =head1 COPYRIGHT
 
-Copyright (C) 2004-2008, Parrot Foundation.
+Copyright (C) 2004-2009, Parrot Foundation.
 
 =cut
 

Modified: trunk/examples/streams/Lines.pir
==============================================================================
--- trunk/examples/streams/Lines.pir	Mon May 11 16:56:32 2009	(r38688)
+++ trunk/examples/streams/Lines.pir	Mon May 11 17:22:23 2009	(r38689)
@@ -18,17 +18,17 @@
     .local pmc stream
     .local pmc lines
 
-    load_bytecode "Stream/Sub.pir"
-    load_bytecode "Stream/Lines.pir"
+    load_bytecode 'Stream/Sub.pbc'
+    load_bytecode 'Stream/Lines.pbc'
 
     # create a text stream
-    stream = new "Stream::Sub"
+    stream = new ['Stream'; 'Sub']
     # set the source
     .const 'Sub' temp = "_text"
     assign stream, temp
 
     # create a lines stream
-    lines = new "Stream::Lines"
+    lines = new ['Stream'; 'Lines']
     # set the source
     assign lines, stream
 
@@ -63,7 +63,7 @@
 
 =head1 COPYRIGHT
 
-Copyright (C) 2004-2008, Parrot Foundation.
+Copyright (C) 2004-2009, Parrot Foundation.
 
 =cut
 

Modified: trunk/examples/streams/ParrotIO.pir
==============================================================================
--- trunk/examples/streams/ParrotIO.pir	Mon May 11 16:56:32 2009	(r38688)
+++ trunk/examples/streams/ParrotIO.pir	Mon May 11 17:22:23 2009	(r38689)
@@ -19,10 +19,10 @@
 .sub _main :main
     .local pmc stream
 
-    load_bytecode "library/Stream/ParrotIO.pir"
+    load_bytecode 'Stream/ParrotIO.pbc'
 
     # create the ParrotIO stream
-    stream = new "Stream::ParrotIO"
+    stream = new ['Stream'; 'ParrotIO']
 
     # open this file
     stream."open"( "examples/streams/ParrotIO.pir", 'r' )
@@ -44,7 +44,7 @@
 
 =head1 COPYRIGHT
 
-Copyright (C) 2004-2008, Parrot Foundation.
+Copyright (C) 2004-2009, Parrot Foundation.
 
 =cut
 

Modified: trunk/examples/streams/Replay.pir
==============================================================================
--- trunk/examples/streams/Replay.pir	Mon May 11 16:56:32 2009	(r38688)
+++ trunk/examples/streams/Replay.pir	Mon May 11 17:22:23 2009	(r38689)
@@ -4,10 +4,10 @@
 .sub _main :main
     .local pmc stream
 
-    load_bytecode "library/Stream/Writer.pir"
-    load_bytecode "library/Stream/Replay.pir"
+    load_bytecode 'Stream/Writer.pbc'
+    load_bytecode 'Stream/Replay.pbc'
 
-    stream = new "Stream::Writer"
+    stream = new ['Stream'; 'Writer']
     $P0 = get_global "_reader"
     assign stream, $P0
 
@@ -28,7 +28,7 @@
     .local pmc stream3
     .local string str
 
-    stream1 = new "Stream::Replay"
+    stream1 = new ['Stream'; 'Replay']
     assign stream1, self
 
     print "reader start\n"

Modified: trunk/examples/streams/SubCounter.pir
==============================================================================
--- trunk/examples/streams/SubCounter.pir	Mon May 11 16:56:32 2009	(r38688)
+++ trunk/examples/streams/SubCounter.pir	Mon May 11 17:22:23 2009	(r38689)
@@ -17,10 +17,10 @@
 .sub _main
     .local pmc stream
 
-    load_bytecode "library/Stream/Base.pbc"
-    load_bytecode "library/Stream/Sub.pbc"
+    load_bytecode 'Stream/Base.pbc'
+    load_bytecode 'Stream/Sub.pbc'
 
-    stream = new "Stream::Sub"
+    stream = new ['Stream'; 'Sub']
 
     # set the stream's source sub
     .const 'Sub' temp = "_counter"
@@ -68,7 +68,7 @@
 
 =head1 COPYRIGHT
 
-Copyright (C) 2004-2008, Parrot Foundation.
+Copyright (C) 2004-2009, Parrot Foundation.
 
 =cut
 

Modified: trunk/examples/streams/SubHello.pir
==============================================================================
--- trunk/examples/streams/SubHello.pir	Mon May 11 16:56:32 2009	(r38688)
+++ trunk/examples/streams/SubHello.pir	Mon May 11 17:22:23 2009	(r38689)
@@ -17,9 +17,9 @@
 .sub _main :main
     .local pmc stream
 
-    load_bytecode "Stream/Sub.pir"
+    load_bytecode 'Stream/Sub.pbc'
 
-    stream = new "Stream::Sub"
+    stream = new ['Stream'; 'Sub']
 
     # set the stream's source sub
     .const 'Sub' temp = "_hello"
@@ -56,7 +56,7 @@
 
 =head1 COPYRIGHT
 
-Copyright (C) 2004-2008, Parrot Foundation.
+Copyright (C) 2004-2009, Parrot Foundation.
 
 =cut
 

Modified: trunk/examples/streams/Writer.pir
==============================================================================
--- trunk/examples/streams/Writer.pir	Mon May 11 16:56:32 2009	(r38688)
+++ trunk/examples/streams/Writer.pir	Mon May 11 17:22:23 2009	(r38689)
@@ -17,9 +17,9 @@
 .sub _main :main
     .local pmc stream
 
-    load_bytecode "library/Stream/Writer.pir"
+    load_bytecode 'Stream/Writer.pbc'
 
-    stream = new "Stream::Writer"
+    stream = new ['Stream'; 'Writer']
 
     # set the stream's source sub
     .const 'Sub' temp = "_reader"
@@ -60,7 +60,7 @@
 
 =head1 COPYRIGHT
 
-Copyright (C) 2004-2008, Parrot Foundation.
+Copyright (C) 2004-2009, Parrot Foundation.
 
 =cut
 

Modified: trunk/runtime/parrot/library/Stream/Base.pir
==============================================================================
--- trunk/runtime/parrot/library/Stream/Base.pir	Mon May 11 16:56:32 2009	(r38688)
+++ trunk/runtime/parrot/library/Stream/Base.pir	Mon May 11 17:22:23 2009	(r38689)
@@ -2,7 +2,7 @@
 
 =head1 TITLE
 
-Stream::Base - Stream library base class
+Stream;Base - Stream library base class
 
 =head1 VERSION
 
@@ -22,13 +22,13 @@
 
 =cut
 
-.namespace ["Stream::Base"]
+.namespace ['Stream'; 'Base']
 
 .sub onload :load :anon
-    $P0 = get_class 'Stream::Base'
+    $P0 = get_class ['Stream'; 'Base']
     unless null $P0 goto END
 
-    newclass $P0, "Stream::Base"
+    newclass $P0, ['Stream'; 'Base']
     addattribute $P0, 'source'
     addattribute $P0, 'includes'
     addattribute $P0, 'buffer'
@@ -39,7 +39,7 @@
     .local pmc close
 
     # call our own close
-    close = get_hll_global ['Stream::Base'], 'close'
+    close = get_hll_global ['Stream'; 'Base'], 'close'
     close(self)
 .end
 
@@ -134,7 +134,7 @@
 
     .return(ret)
 ERROR:
-    print "Stream::Base::source(): parameters passed\n"
+    print "Stream;Base.source(): parameters passed\n"
     end
 .end
 
@@ -348,7 +348,7 @@
 
 =head1 COPYRIGHT
 
-Copyright (C) 2004-2008, Parrot Foundation.
+Copyright (C) 2004-2009, Parrot Foundation.
 
 =cut
 

Modified: trunk/runtime/parrot/library/Stream/Combiner.pir
==============================================================================
--- trunk/runtime/parrot/library/Stream/Combiner.pir	Mon May 11 16:56:32 2009	(r38688)
+++ trunk/runtime/parrot/library/Stream/Combiner.pir	Mon May 11 17:22:23 2009	(r38689)
@@ -2,7 +2,7 @@
 
 =head1 TITLE
 
-Stream::Combiner - combines different streams to a single stream.
+Stream;Combiner - combines different streams to a single stream.
 
 =head1 VERSION
 
@@ -29,13 +29,13 @@
     .local pmc base
     .local pmc comb
 
-    $P0 = get_class 'Stream::Combiner'
+    $P0 = get_class ['Stream'; 'Combiner']
     unless null $P0 goto END
 
-    load_bytecode "library/Stream/Base.pir"
+    load_bytecode 'Stream/Base.pbc'
 
-    get_class base, "Stream::Base"
-    subclass comb, base, "Stream::Combiner"
+    get_class base, ['Stream'; 'Base']
+    subclass comb, base, ['Stream'; 'Combiner']
 
     addattribute comb, "combiner"
 END:
@@ -52,7 +52,7 @@
 
 .include "iterator.pasm"
 
-.namespace ["Stream::Combiner"]
+.namespace ['Stream'; 'Combiner']
 
 .sub init :vtable :method
 
@@ -204,7 +204,7 @@
 
 =head1 COPYRIGHT
 
-Copyright (C) 2004-2008, Parrot Foundation.
+Copyright (C) 2004-2009, Parrot Foundation.
 
 =cut
 

Modified: trunk/runtime/parrot/library/Stream/Coroutine.pir
==============================================================================
--- trunk/runtime/parrot/library/Stream/Coroutine.pir	Mon May 11 16:56:32 2009	(r38688)
+++ trunk/runtime/parrot/library/Stream/Coroutine.pir	Mon May 11 17:22:23 2009	(r38689)
@@ -2,7 +2,7 @@
 
 =head1 TITLE
 
-Stream::Base - Stream library base class
+Stream;Coroutine - Stream library coroutine class
 
 =head1 VERSION
 
@@ -27,17 +27,17 @@
     .local pmc coro
     .local int i
 
-    $P0 = get_class "Stream::Coroutine"
+    $P0 = get_class ['Stream'; 'Coroutine']
     unless null $P0 goto END
 
-    load_bytecode "library/Stream/Base.pir"
+    load_bytecode 'Stream/Base.pbc'
 
-    get_class base, "Stream::Base"
-    subclass coro, base, "Stream::Coroutine"
+    get_class base, ['Stream'; 'Base']
+    subclass coro, base, ['Stream'; 'Coroutine']
 END:
 .end
 
-.namespace ["Stream::Coroutine"]
+.namespace ['Stream'; 'Coroutine']
 
 =item source."rawRead"() (B<internal>)
 
@@ -70,7 +70,7 @@
 
 =head1 COPYRIGHT
 
-Copyright (C) 2004-2008, Parrot Foundation.
+Copyright (C) 2004-2009, Parrot Foundation.
 
 =cut
 

Modified: trunk/runtime/parrot/library/Stream/Filter.pir
==============================================================================
--- trunk/runtime/parrot/library/Stream/Filter.pir	Mon May 11 16:56:32 2009	(r38688)
+++ trunk/runtime/parrot/library/Stream/Filter.pir	Mon May 11 17:22:23 2009	(r38689)
@@ -2,7 +2,7 @@
 
 =head1 TITLE
 
-Stream::Filter - filter and/or alter a stream
+Stream;Filter - filter and/or alter a stream
 
 =head1 VERSION
 
@@ -27,19 +27,19 @@
     .local pmc base
     .local pmc filter
 
-    $P0 = get_class 'Stream::Filter'
+    $P0 = get_class ['Stream'; 'Filter']
     unless null $P0 goto END
 
-    load_bytecode "library/Stream/Base.pir"
+    load_bytecode 'Stream/Base.pbc'
 
-    get_class base, "Stream::Base"
-    subclass filter, base, "Stream::Filter"
+    get_class base, ['Stream'; 'Base']
+    subclass filter, base, ['Stream'; 'Filter']
 
     addattribute filter, "filter"
 END:
 .end
 
-.namespace ["Stream::Filter"]
+.namespace ['Stream'; 'Filter']
 
 =item source."filter"( filter )
 
@@ -94,7 +94,7 @@
 
 =head1 COPYRIGHT
 
-Copyright (C) 2004-2008, Parrot Foundation.
+Copyright (C) 2004-2009, Parrot Foundation.
 
 =cut
 

Modified: trunk/runtime/parrot/library/Stream/Lines.pir
==============================================================================
--- trunk/runtime/parrot/library/Stream/Lines.pir	Mon May 11 16:56:32 2009	(r38688)
+++ trunk/runtime/parrot/library/Stream/Lines.pir	Mon May 11 17:22:23 2009	(r38689)
@@ -2,7 +2,7 @@
 
 =head1 TITLE
 
-Stream::Lines - process a stream one line per read
+Stream;Lines - process a stream one line per read
 
 =head1 VERSION
 
@@ -27,19 +27,19 @@
     .local pmc base
     .local pmc lines
 
-    $P0 = get_class 'Stream::Lines'
+    $P0 = get_class ['Stream'; 'Lines']
     unless null $P0 goto END
 
-    load_bytecode "library/Stream/Base.pir"
+    load_bytecode 'Stream/Base.pbc'
 
-    get_class base, "Stream::Base"
-    subclass lines, base, "Stream::Lines"
+    get_class base, ['Stream'; 'Base']
+    subclass lines, base, ['Stream'; 'Lines']
 
     addattribute lines, "line_buffer"
 END:
 .end
 
-.namespace ["Stream::Lines"]
+.namespace ['Stream'; 'Lines']
 
 .sub init :vtable :method
     .local pmc temp
@@ -183,7 +183,7 @@
 
 =head1 COPYRIGHT
 
-Copyright (C) 2004-2008, Parrot Foundation.
+Copyright (C) 2004-2009, Parrot Foundation.
 
 =cut
 

Modified: trunk/runtime/parrot/library/Stream/ParrotIO.pir
==============================================================================
--- trunk/runtime/parrot/library/Stream/ParrotIO.pir	Mon May 11 16:56:32 2009	(r38688)
+++ trunk/runtime/parrot/library/Stream/ParrotIO.pir	Mon May 11 17:22:23 2009	(r38689)
@@ -2,7 +2,7 @@
 
 =head1 TITLE
 
-Stream::ParrotIO - a ParrotIO PMC as source for a Stream
+Stream;ParrotIO - a ParrotIO PMC as source for a Stream
 
 =head1 VERSION
 
@@ -27,19 +27,19 @@
     .local pmc base
     .local pmc io
 
-    $P0 = get_class 'Stream::ParrotIO'
+    $P0 = get_class ['Stream'; 'ParrotIO']
     unless null $P0 goto END
 
-    load_bytecode "library/Stream/Base.pir"
+    load_bytecode 'Stream/Base.pbc'
 
-    get_class base, "Stream::Base"
-    subclass io, base, "Stream::ParrotIO"
+    get_class base, ['Stream'; 'Base']
+    subclass io, base, ['Stream'; 'ParrotIO']
 
     addattribute io, "blocksize"
 END:
 .end
 
-.namespace ["Stream::ParrotIO"]
+.namespace ['Stream'; 'ParrotIO']
 
 .sub init :vtable :method
     self."blockSize"( 50 )
@@ -119,7 +119,7 @@
 
 =head1 COPYRIGHT
 
-Copyright (C) 2004-2008, Parrot Foundation.
+Copyright (C) 2004-2009, Parrot Foundation.
 
 =cut
 

Modified: trunk/runtime/parrot/library/Stream/Replay.pir
==============================================================================
--- trunk/runtime/parrot/library/Stream/Replay.pir	Mon May 11 16:56:32 2009	(r38688)
+++ trunk/runtime/parrot/library/Stream/Replay.pir	Mon May 11 17:22:23 2009	(r38689)
@@ -2,7 +2,7 @@
 
 =head1 TITLE
 
-Stream::Replay - replayable Stream
+Stream;Replay - replayable Stream
 
 =head1 VERSION
 
@@ -10,9 +10,9 @@
 
 =head1 SYNOPSIS
 
-    load_bytecode "library/Stream/Replay.pir"
+    load_bytecode 'Stream/Replay.pbc'
 
-    $P0 = new "Stream::Replay"
+    $P0 = new ['Stream'; 'Replay']
     assign $P0, other_stream
 
     # .. read from $P0 ..
@@ -34,22 +34,22 @@
 
 =cut
 
-.namespace ["Stream::Replay"]
+.namespace ['Stream'; 'Replay']
 
 .sub onload :load :anon
-    $P0 = get_class 'Stream::Replay'
+    $P0 = get_class ['Stream'; 'Replay']
     unless null $P0 goto END
 
-    load_bytecode "library/Stream/Base.pir"
+    load_bytecode 'Stream/Base.pbc'
 
-    # Stream::Replay
-    get_class $P0, "Stream::Base"
-    subclass $P0, $P0, "Stream::Replay"
+    # Stream;Replay
+    get_class $P0, ['Stream'; 'Base']
+    subclass $P0, $P0, ['Stream'; 'Replay']
     addattribute $P0, "replay_buffer"
     addattribute $P0, "pos"
 
-    # Stream::Replay::Buffer
-    newclass $P0, "Stream::Replay::Buffer"
+    # Stream;Replay;Buffer
+    newclass $P0, ['Stream'; 'Replay'; 'Buffer']
     addattribute $P0, "strings"
     addattribute $P0, "clones"
 END:
@@ -78,7 +78,7 @@
     .param pmc val
     .local pmc buffer
 
-    isa $I0, val, "Stream::Replay"
+    isa $I0, val, ['Stream'; 'Replay']
     unless $I0 goto NOTA
 
     # get the buffer
@@ -102,7 +102,7 @@
     val = val."source"()
     goto ASSIGN
 NOTA:
-    buffer = new "Stream::Replay::Buffer"
+    buffer = new ['Stream'; 'Replay'; 'Buffer']
     setattribute self, 'replay_buffer', buffer
 ASSIGN:
     self."setSource"( val )
@@ -142,7 +142,7 @@
     .local pmc ret
     .local pmc temp
 
-    ret = new "Stream::Replay"
+    ret = new ['Stream'; 'Replay']
 
     assign ret, self
 
@@ -155,7 +155,7 @@
 .end
 
 
-.namespace ["Stream::Replay::Buffer"]
+.namespace ['Stream'; 'Replay'; 'Buffer']
 
 .sub init :vtable :method
     .local pmc temp
@@ -251,7 +251,7 @@
 
 =head1 COPYRIGHT
 
-Copyright (C) 2004-2008, Parrot Foundation.
+Copyright (C) 2004-2009, Parrot Foundation.
 
 =cut
 

Modified: trunk/runtime/parrot/library/Stream/Sub.pir
==============================================================================
--- trunk/runtime/parrot/library/Stream/Sub.pir	Mon May 11 16:56:32 2009	(r38688)
+++ trunk/runtime/parrot/library/Stream/Sub.pir	Mon May 11 17:22:23 2009	(r38689)
@@ -2,7 +2,7 @@
 
 =head1 TITLE
 
-Stream::Sub - a PIR sub as source for a Stream
+Stream;Sub - a PIR sub as source for a Stream
 
 =head1 VERSION
 
@@ -11,7 +11,7 @@
 =head1 SYNOPSIS
 
     # create the stream
-    new stream, "Stream::Sub"
+    new stream, ['Stream'; Sub']
 
     # set the source sub
     .const 'Sub' temp = "_test"
@@ -25,7 +25,7 @@
 
 =head1 DESCRIPTION
 
-Like every stream, Stream::Sub as has a C<read> method.
+Like every stream, Stream;Sub as has a C<read> method.
 The benefit is that this stream also has a C<write> method, though it
 can not be called from arbitrary locations.
 
@@ -58,19 +58,19 @@
     .local pmc base
     .local pmc sub
 
-    $P0 = get_class "Stream::Sub"
+    $P0 = get_class ['Stream'; 'Sub']
     unless null $P0 goto END
 
-    load_bytecode "library/Stream/Base.pir"
+    load_bytecode 'Stream/Base.pbc'
 
-    get_class base, "Stream::Base"
-    subclass sub, base, "Stream::Sub"
+    get_class base, ['Stream'; 'Base']
+    subclass sub, base, ['Stream'; 'Sub']
 
     addattribute sub, "write_cont"
 END:
 .end
 
-.namespace ["Stream::Sub"]
+.namespace ['Stream'; 'Sub']
 
 =head1 METHODS
 
@@ -152,7 +152,7 @@
 
 =head1 COPYRIGHT
 
-Copyright (C) 2004-2008, Parrot Foundation.
+Copyright (C) 2004-2009, Parrot Foundation.
 
 =cut
 

Modified: trunk/runtime/parrot/library/Stream/Writer.pir
==============================================================================
--- trunk/runtime/parrot/library/Stream/Writer.pir	Mon May 11 16:56:32 2009	(r38688)
+++ trunk/runtime/parrot/library/Stream/Writer.pir	Mon May 11 17:22:23 2009	(r38689)
@@ -2,7 +2,7 @@
 
 =head1 TITLE
 
-Stream::Writer - a PIR sub as target for a Stream
+Stream;Writer - a PIR sub as target for a Stream
 
 =head1 VERSION
 
@@ -11,7 +11,7 @@
 =head1 SYNOPSIS
 
     # create the stream
-    new stream, "Stream::Writer"
+    new stream, ['Stream'; 'Writer']
 
     # set the source sub
     .const 'Sub' temp = "_reader"
@@ -31,16 +31,16 @@
 =cut
 
 .include "interpinfo.pasm"
-.namespace ["Stream::Writer"]
+.namespace ['Stream'; 'Writer']
 
 .sub __onload :load
-    $P0 = get_class "Stream::Writer"
+    $P0 = get_class ['Stream'; 'Writer']
     unless null $P0 goto END
 
-    load_bytecode "library/Stream/Base.pir"
+    load_bytecode 'Stream/Base.pbc'
 
-    get_class $P0, "Stream::Base"
-    subclass $P1, $P0, "Stream::Writer"
+    get_class $P0, ['Stream'; 'Base']
+    subclass $P1, $P0, ['Stream'; 'Writer']
 
     addattribute $P1, "writer"
     addattribute $P1, "status"
@@ -64,7 +64,7 @@
     source()
 
     # close the source
-    source = get_hll_global ['Stream::Base'], 'close'
+    source = get_hll_global ['Stream'; 'Base'], 'close'
     self."setSource"()
 
     # mark it as closed
@@ -198,7 +198,7 @@
 
 =head1 COPYRIGHT
 
-Copyright (C) 2004-2008, Parrot Foundation.
+Copyright (C) 2004-2009, Parrot Foundation.
 
 =cut
 

Modified: trunk/t/library/streams.t
==============================================================================
--- trunk/t/library/streams.t	Mon May 11 16:56:32 2009	(r38688)
+++ trunk/t/library/streams.t	Mon May 11 17:22:23 2009	(r38689)
@@ -30,14 +30,14 @@
     #
     # 1..8
     #
-    pir_output_is( <<"CODE", <<"OUT", "load and create a Stream::$a" );
+    pir_output_is( <<"CODE", <<"OUT", "load and create a Stream;$a" );
 
 .sub _main
     print "loading '$a'...\\n"
-    load_bytecode "library/Stream/$a.pir"
+    load_bytecode 'Stream/$a.pbc'
     print "loaded\\n"
 
-    \$P0 = new "Stream::$a"
+    \$P0 = new ['Stream'; '$a']
 
     \$S0 = typeof \$P0
     print "class name: '"
@@ -48,7 +48,7 @@
 CODE
 loading '$a'...
 loaded
-class name: 'Stream::$a'
+class name: 'Stream;$a'
 done
 OUT
 
@@ -57,14 +57,14 @@
 #
 # 9
 #
-pir_output_is( <<'CODE', <<'OUT', "Stream::Sub" );
+pir_output_is( <<'CODE', <<'OUT', "Stream;Sub" );
 
 .sub _main :main
     .local pmc stream
 
-    load_bytecode "library/Stream/Sub.pir"
+    load_bytecode 'Stream/Sub.pbc'
 
-    stream = new "Stream::Sub"
+    stream = new ['Stream'; 'Sub']
 
     # set the stream's source sub   #'
     .const 'Sub' temp = "_hello"
@@ -108,15 +108,15 @@
 .sub _main :main
     .local pmc stream
 
-    load_bytecode "library/Stream/Sub.pir"
-    load_bytecode "library/Stream/Replay.pir"
+    load_bytecode 'Stream/Sub.pbc'
+    load_bytecode 'Stream/Replay.pbc'
 
-    $P0 = new "Stream::Sub"
+    $P0 = new ['Stream'; 'Sub']
     # set the stream's source sub      #'
     .const 'Sub' temp = "_hello"
     assign $P0, temp
 
-    stream = new "Stream::Replay"
+    stream = new ['Stream'; 'Replay']
     assign stream, $P0
 
     $S0 = stream."read_bytes"( 3 )
@@ -185,23 +185,23 @@
     .local pmc text
     .local pmc combined
 
-    load_bytecode "library/Stream/Base.pir"
-    load_bytecode "library/Stream/Combiner.pir"
-    load_bytecode "library/Stream/Sub.pir"
+    load_bytecode 'Stream/Base.pbc'
+    load_bytecode 'Stream/Combiner.pbc'
+    load_bytecode 'Stream/Sub.pbc'
 
     # create the counter stream
-    counter = new "Stream::Sub"
+    counter = new ['Stream'; 'Sub']
     .const 'Sub' ct = "_counter"
     assign counter, ct
 
     # create the text stream
-    text = new "Stream::Sub"
+    text = new ['Stream'; 'Sub']
     # set its source
     .const 'Sub' src = "_text"
     assign text, src
 
     # create a combiner stream
-    combined = new "Stream::Combiner"
+    combined = new ['Stream'; 'Combiner']
     # add the streams
     assign combined, counter
     assign combined, text
@@ -271,11 +271,11 @@
 .sub _main
     .local pmc stream
 
-    load_bytecode "library/Stream/Base.pir"
-    load_bytecode "library/Stream/Coroutine.pir"
+    load_bytecode 'Stream/Base.pbc'
+    load_bytecode 'Stream/Coroutine.pbc'
 
     # create the coroutine stream
-    stream = new "Stream::Coroutine"
+    stream = new ['Stream'; 'Coroutine']
 
     # set the stream's source coroutine #'
     .const 'Sub' temp = "_coro"
@@ -343,26 +343,26 @@
 
     name = "t/library/perlhist.txt"
 
-    load_bytecode "library/Stream/ParrotIO.pir"
-    load_bytecode "library/Stream/Lines.pir"
-    load_bytecode "library/Stream/Sub.pir"
-    load_bytecode "library/Stream/Combiner.pir"
+    load_bytecode 'Stream/ParrotIO.pbc'
+    load_bytecode 'Stream/Lines.pbc'
+    load_bytecode 'Stream/Sub.pbc'
+    load_bytecode 'Stream/Combiner.pbc'
 
     # create a file stream
-    file = new "Stream::ParrotIO"
+    file = new ['Stream'; 'ParrotIO']
     file."open"( name, 'r' )
 
     # process it one line per read
-    lines = new "Stream::Lines"
+    lines = new ['Stream'; 'Lines']
     assign lines, file
 
     # endless counter
-    counter = new "Stream::Sub"
+    counter = new ['Stream'; 'Sub']
     .const 'Sub' temp = "_counter"
     assign counter, temp
 
     # combine the counter and the file's lines   #'
-    combiner = new "Stream::Combiner"
+    combiner = new ['Stream'; 'Combiner']
     assign combiner, counter
     assign combiner, lines
 
@@ -704,17 +704,17 @@
     .local pmc stream
     .local pmc filter
 
-    load_bytecode "library/Stream/Sub.pir"
-    load_bytecode "library/Stream/Filter.pir"
+    load_bytecode 'Stream/Sub.pbc'
+    load_bytecode 'Stream/Filter.pbc'
 
     # create the counter stream
-    stream = new "Stream::Sub"
+    stream = new ['Stream'; 'Sub']
     # assign its source
     .const 'Sub' temp = "_counter"
     assign stream, temp
 
     # create the filter stream
-    filter = new "Stream::Filter"
+    filter = new ['Stream'; 'Filter']
     # assign its source
     assign filter, stream
     # set the filter sub
@@ -789,9 +789,9 @@
 .sub _main
     .local pmc stream
 
-    load_bytecode "library/Stream/Sub.pir"
+    load_bytecode 'Stream/Sub.pbc'
 
-    stream = new "Stream::Sub"
+    stream = new ['Stream'; 'Sub']
 
     .const 'Sub' temp = "_counter"
     assign stream, temp
@@ -821,7 +821,7 @@
     if i != 4 goto SKIP
     .local pmc temp
 
-    temp = new "Stream::Sub"
+    temp = new ['Stream'; 'Sub']
 
     .const 'Sub' func = "_included"
     assign temp, func
@@ -840,7 +840,7 @@
     self."write"( "hello" )
 
     # create another stream
-    temp = new "Stream::Sub"
+    temp = new ['Stream'; 'Sub']
     .const 'Sub' func = "_counter2"
     assign temp, func
 
@@ -895,17 +895,17 @@
     .local pmc stream
     .local pmc lines
 
-    load_bytecode "library/Stream/Sub.pir"
-    load_bytecode "library/Stream/Lines.pir"
+    load_bytecode 'Stream/Sub.pbc'
+    load_bytecode 'Stream/Lines.pbc'
 
     # create a text stream
-    stream = new "Stream::Sub"
+    stream = new ['Stream'; 'Sub']
     # set the source
     .const 'Sub' temp = "_text"
     assign stream, temp
 
     # create a lines stream
-    lines = new "Stream::Lines"
+    lines = new ['Stream'; 'Lines']
     # set the source
     assign lines, stream
 
@@ -942,10 +942,10 @@
     .local pmc stream
     .local pmc temp
 
-    load_bytecode "library/Stream/ParrotIO.pir"
+    load_bytecode 'Stream/ParrotIO.pbc'
 
     # create the ParrotIO stream
-    stream = new "Stream::ParrotIO"
+    stream = new ['Stream'; 'ParrotIO']
 
     # open this file
     stream."open"( "t/library/perlhist.txt", 'r' )
@@ -1256,10 +1256,10 @@
 .sub _main :main
     .local pmc stream
 
-    load_bytecode "library/Stream/Writer.pir"
-    load_bytecode "library/Stream/Replay.pir"
+    load_bytecode 'Stream/Writer.pbc'
+    load_bytecode 'Stream/Replay.pbc'
 
-    stream = new "Stream::Writer"
+    stream = new ['Stream'; 'Writer']
     P0 = global "_reader"
     assign stream, P0
 
@@ -1285,7 +1285,7 @@
     .local pmc stream3
     .local string str
 
-    stream1 = new "Stream::Replay"
+    stream1 = new ['Stream'; 'Replay']
     assign stream1, self
 
     print "reader start\n"
@@ -1357,10 +1357,10 @@
 .sub _main
     .local pmc stream
 
-    load_bytecode "library/Stream/Base.pir"
-    load_bytecode "library/Stream/Sub.pir"
+    load_bytecode 'Stream/Base.pbc'
+    load_bytecode 'Stream/Sub.pbc'
 
-    stream = new "Stream::Sub"
+    stream = new ['Stream'; 'Sub']
 
     .const 'Sub' temp = "_counter"
     assign stream, temp
@@ -1418,9 +1418,9 @@
 .sub _main :main
     .local pmc stream
 
-    load_bytecode "library/Stream/Writer.pir"
+    load_bytecode 'Stream/Writer.pbc'
 
-    stream = new "Stream::Writer"
+    stream = new ['Stream'; 'Writer']
 
     # set the stream's source sub
     .const 'Sub' temp = "_reader"


More information about the parrot-commits mailing list