Author: jquelin
Date: Wed Oct  3 08:54:33 2007
New Revision: 21771

Modified:
   branches/pdd15oo/examples/streams/Bytes.pir
   branches/pdd15oo/examples/streams/Combiner.pir
   branches/pdd15oo/examples/streams/Coroutine.pir
   branches/pdd15oo/examples/streams/FileLines.pir
   branches/pdd15oo/examples/streams/Filter.pir
   branches/pdd15oo/examples/streams/Include.pir
   branches/pdd15oo/examples/streams/Lines.pir
   branches/pdd15oo/examples/streams/ParrotIO.pir
   branches/pdd15oo/examples/streams/Replay.pir
   branches/pdd15oo/examples/streams/SubCounter.pir
   branches/pdd15oo/examples/streams/SubHello.pir
   branches/pdd15oo/examples/streams/Writer.pir

Log:
find_type removal

Modified: branches/pdd15oo/examples/streams/Bytes.pir
==============================================================================
--- branches/pdd15oo/examples/streams/Bytes.pir (original)
+++ branches/pdd15oo/examples/streams/Bytes.pir Wed Oct  3 08:54:33 2007
@@ -17,14 +17,12 @@
     load_bytecode "library/Stream/Sub.pir"
     load_bytecode "library/Stream/Replay.pir"
 
-    find_type $I0, "Stream::Sub"
-    new $P0, $I0
+    $P0 = new "Stream::Sub"
     # set the stream's source sub
     .const .Sub temp = "_hello"
     assign $P0, $P1
 
-    find_type $I0,"Stream::Replay"
-    stream = new $I0
+    stream = new "Stream::Replay"
     assign stream, $P0
 
     $S0 = stream."read_bytes"( 3 )

Modified: branches/pdd15oo/examples/streams/Combiner.pir
==============================================================================
--- branches/pdd15oo/examples/streams/Combiner.pir      (original)
+++ branches/pdd15oo/examples/streams/Combiner.pir      Wed Oct  3 08:54:33 2007
@@ -34,21 +34,18 @@
     load_bytecode "library/Stream/Sub.pir"
 
     # create the counter stream
-    find_type $I0, "Stream::Sub"
-    new counter, $I0
+    counter = new "Stream::Sub"
     .const .Sub temp = "_counter"
     assign counter, temp
     
     # create the text stream
-    find_type $I0, "Stream::Sub"
-    new text, $I0
+    text = new "Stream::Sub"
     # set its source
     .const .Sub temp = "_text"
     assign text, temp
 
     # create a combiner stream
-    find_type $I0, "Stream::Combiner"
-    new combined, $I0
+    combined = new "Stream::Combiner"
     # add the streams
     assign combined, counter
     assign combined, text

Modified: branches/pdd15oo/examples/streams/Coroutine.pir
==============================================================================
--- branches/pdd15oo/examples/streams/Coroutine.pir     (original)
+++ branches/pdd15oo/examples/streams/Coroutine.pir     Wed Oct  3 08:54:33 2007
@@ -28,8 +28,7 @@
     load_bytecode "library/Stream/Coroutine.pir"
 
     # create the coroutine stream    
-    find_type $I0, "Stream::Coroutine"
-    new stream, $I0
+    stream = new "Stream::Coroutine"
 
     # set the stream's source coroutine
     # A .Sub is a coroutine when there is a yield?

Modified: branches/pdd15oo/examples/streams/FileLines.pir
==============================================================================
--- branches/pdd15oo/examples/streams/FileLines.pir     (original)
+++ branches/pdd15oo/examples/streams/FileLines.pir     Wed Oct  3 08:54:33 2007
@@ -39,24 +39,20 @@
     load_bytecode "library/Stream/Combiner.pir"
 
     # create a file stream
-    find_type $I0, "Stream::ParrotIO"
-    new file, $I0
+    file = new "Stream::ParrotIO"
     file."open"( name, "<" )
 
     # process it one line per read
-    find_type $I0, "Stream::Lines"
-    new lines, $I0
+    lines = new "Stream::Lines"
     assign lines, file
 
     # endless counter
-    find_type $I0, "Stream::Sub"
-    new counter, $I0
+    counter = new "Stream::Sub"
     .const .Sub temp = "_counter"
     assign counter, temp
 
     # combine the counter and the file's lines
-    find_type $I0, "Stream::Combiner"
-    new combiner, $I0
+    combiner = new "Stream::Combiner"
     assign combiner, counter
     assign combiner, lines
 

Modified: branches/pdd15oo/examples/streams/Filter.pir
==============================================================================
--- branches/pdd15oo/examples/streams/Filter.pir        (original)
+++ branches/pdd15oo/examples/streams/Filter.pir        Wed Oct  3 08:54:33 2007
@@ -25,15 +25,13 @@
     load_bytecode "library/Stream/Filter.pir"
     
     # create the counter stream
-    find_type $I0, "Stream::Sub"
-    new stream, $I0
+    stream = new "Stream::Sub"
     # assign its source
     .const .Sub temp = "_counter"
     assign stream, temp
 
     # create the filter stream
-    find_type $I0, "Stream::Filter"
-    new filter, $I0
+    filter = new "Stream::Filter"
     # assign its source
     assign filter, stream
     # set the filter sub

Modified: branches/pdd15oo/examples/streams/Include.pir
==============================================================================
--- branches/pdd15oo/examples/streams/Include.pir       (original)
+++ branches/pdd15oo/examples/streams/Include.pir       Wed Oct  3 08:54:33 2007
@@ -17,8 +17,7 @@
 
     load_bytecode "library/Stream/Sub.pir"
     
-    find_type $I0, "Stream::Sub"
-    new stream, $I0
+    stream = new "Stream::Sub"
 
     # set the stream's source sub
     .const .Sub temp = "_counter"
@@ -55,8 +54,7 @@
     if i != 4 goto SKIP
     .local pmc temp
     
-    find_type $I0, "Stream::Sub"
-    new temp, $I0
+    temp = new "Stream::Sub"
 
     .const .Sub func = "_included"
     assign temp, func
@@ -85,8 +83,7 @@
     self."write"( "hello" )
 
     # create another stream
-    find_type $I0, "Stream::Sub"
-    new temp, $I0
+    temp = new "Stream::Sub"
     .const .Sub func = "_counter2"
     assign temp, func
     

Modified: branches/pdd15oo/examples/streams/Lines.pir
==============================================================================
--- branches/pdd15oo/examples/streams/Lines.pir (original)
+++ branches/pdd15oo/examples/streams/Lines.pir Wed Oct  3 08:54:33 2007
@@ -20,15 +20,13 @@
     load_bytecode "library/Stream/Lines.pir"
     
     # create a text stream
-    find_type $I0, "Stream::Sub"
-    new stream, $I0
+    stream = new "Stream::Sub"
     # set the source
     .const .Sub temp = "_text"
     assign stream, temp
 
     # create a lines stream
-    find_type $I0, "Stream::Lines"
-    new lines, $I0
+    lines = new "Stream::Lines"
     # set the source
     assign lines, stream
     

Modified: branches/pdd15oo/examples/streams/ParrotIO.pir
==============================================================================
--- branches/pdd15oo/examples/streams/ParrotIO.pir      (original)
+++ branches/pdd15oo/examples/streams/ParrotIO.pir      Wed Oct  3 08:54:33 2007
@@ -22,8 +22,7 @@
     load_bytecode "library/Stream/ParrotIO.pir"
 
     # create the ParrotIO stream    
-    find_type $I0, "Stream::ParrotIO"
-    new stream, $I0
+    stream = new "Stream::ParrotIO"
 
     # open this file
     stream."open"( "examples/streams/ParrotIO.pir", "<" )

Modified: branches/pdd15oo/examples/streams/Replay.pir
==============================================================================
--- branches/pdd15oo/examples/streams/Replay.pir        (original)
+++ branches/pdd15oo/examples/streams/Replay.pir        Wed Oct  3 08:54:33 2007
@@ -4,8 +4,7 @@
     load_bytecode "library/Stream/Writer.pir"
     load_bytecode "library/Stream/Replay.pir"
     
-    find_type $I0, "Stream::Writer"
-    new stream, $I0
+    stream = new "Stream::Writer"
     $P0 = global "_reader"
     assign stream, $P0
     
@@ -26,8 +25,7 @@
     .local pmc stream3
     .local string str
 
-    find_type $I0, "Stream::Replay"
-    new stream1, $I0
+    stream1 = new "Stream::Replay"
     assign stream1, self
     
     print "reader start\n"

Modified: branches/pdd15oo/examples/streams/SubCounter.pir
==============================================================================
--- branches/pdd15oo/examples/streams/SubCounter.pir    (original)
+++ branches/pdd15oo/examples/streams/SubCounter.pir    Wed Oct  3 08:54:33 2007
@@ -18,8 +18,7 @@
     load_bytecode "library/Stream/Base.pir"
     load_bytecode "library/Stream/Sub.pir"
     
-    find_type $I0, "Stream::Sub"
-    new stream, $I0
+    stream = new "Stream::Sub"
 
     # set the stream's source sub
     .const .Sub temp = "_counter"

Modified: branches/pdd15oo/examples/streams/SubHello.pir
==============================================================================
--- branches/pdd15oo/examples/streams/SubHello.pir      (original)
+++ branches/pdd15oo/examples/streams/SubHello.pir      Wed Oct  3 08:54:33 2007
@@ -17,8 +17,7 @@
 
     load_bytecode "library/Stream/Sub.pir"
 
-    find_type $I0, "Stream::Sub"
-    new stream, $I0
+    stream = new "Stream::Sub"
 
     # set the stream's source sub
     .const .Sub temp = "_hello"

Modified: branches/pdd15oo/examples/streams/Writer.pir
==============================================================================
--- branches/pdd15oo/examples/streams/Writer.pir        (original)
+++ branches/pdd15oo/examples/streams/Writer.pir        Wed Oct  3 08:54:33 2007
@@ -17,8 +17,7 @@
 
     load_bytecode "library/Stream/Writer.pir"
 
-    find_type $I0, "Stream::Writer"
-    new stream, $I0
+    stream = new "Stream::Writer"
 
     # set the stream's source sub
     .const .Sub temp = "_reader"

Reply via email to