Author: particle
Date: Wed Oct  3 09:09:02 2007
New Revision: 21773

Modified:
   branches/pdd15oo/runtime/parrot/library/Stream/Base.pir
   branches/pdd15oo/runtime/parrot/library/Stream/Combiner.pir
   branches/pdd15oo/runtime/parrot/library/Stream/Coroutine.pir
   branches/pdd15oo/runtime/parrot/library/Stream/Filter.pir
   branches/pdd15oo/runtime/parrot/library/Stream/Lines.pir
   branches/pdd15oo/runtime/parrot/library/Stream/ParrotIO.pir
   branches/pdd15oo/runtime/parrot/library/Stream/Replay.pir
   branches/pdd15oo/runtime/parrot/library/Stream/Sub.pir
   branches/pdd15oo/runtime/parrot/library/Stream/Writer.pir

Log:
[library]: replace find_type usage with get_class for Stream:: code

Modified: branches/pdd15oo/runtime/parrot/library/Stream/Base.pir
==============================================================================
--- branches/pdd15oo/runtime/parrot/library/Stream/Base.pir     (original)
+++ branches/pdd15oo/runtime/parrot/library/Stream/Base.pir     Wed Oct  3 
09:09:02 2007
@@ -29,9 +29,8 @@
 .const int aBuffer = 2
 
 .sub onload :load :anon
-    find_type $I0, "Stream::Base"
-    if $I0 > 1 goto END
-
+    $P0 = get_class 'Stream::Base'
+    unless null $P0 goto END
     load_bytecode "library/Data/Escape.pir"
 
     newclass $P0, "Stream::Base"

Modified: branches/pdd15oo/runtime/parrot/library/Stream/Combiner.pir
==============================================================================
--- branches/pdd15oo/runtime/parrot/library/Stream/Combiner.pir (original)
+++ branches/pdd15oo/runtime/parrot/library/Stream/Combiner.pir Wed Oct  3 
09:09:02 2007
@@ -29,8 +29,8 @@
     .local pmc base
     .local pmc comb
 
-    find_type i, "Stream::Combiner"
-    if i > 1 goto END
+    $P0 = get_class 'Stream::Combiner'
+    unless null $P0 goto END
 
     load_bytecode "library/Stream/Base.pir"
 

Modified: branches/pdd15oo/runtime/parrot/library/Stream/Coroutine.pir
==============================================================================
--- branches/pdd15oo/runtime/parrot/library/Stream/Coroutine.pir        
(original)
+++ branches/pdd15oo/runtime/parrot/library/Stream/Coroutine.pir        Wed Oct 
 3 09:09:02 2007
@@ -24,15 +24,14 @@
     .local pmc base
     .local pmc coro
     .local int i
-    
-    find_type i, "Stream::Coroutine"
-    if i > 1 goto END
-    
+
+    $P0 = getclass "Stream::Coroutine"
+    unless null $P0 goto END
+
     load_bytecode "library/Stream/Base.pir"
 
     getclass base, "Stream::Base"
     subclass coro, base, "Stream::Coroutine"
-    
 END:
 .end
 

Modified: branches/pdd15oo/runtime/parrot/library/Stream/Filter.pir
==============================================================================
--- branches/pdd15oo/runtime/parrot/library/Stream/Filter.pir   (original)
+++ branches/pdd15oo/runtime/parrot/library/Stream/Filter.pir   Wed Oct  3 
09:09:02 2007
@@ -27,8 +27,8 @@
     .local pmc base
     .local pmc filter
 
-    find_type i, "Stream::Filter"
-    if i > 1 goto END
+    $P0 = get_class 'Stream::Filter'
+    unless null $P0 goto END
 
     load_bytecode "library/Stream/Base.pir"
 

Modified: branches/pdd15oo/runtime/parrot/library/Stream/Lines.pir
==============================================================================
--- branches/pdd15oo/runtime/parrot/library/Stream/Lines.pir    (original)
+++ branches/pdd15oo/runtime/parrot/library/Stream/Lines.pir    Wed Oct  3 
09:09:02 2007
@@ -29,8 +29,8 @@
     .local pmc base
     .local pmc lines
 
-    find_type i, "Stream::Lines"
-    if i > 1 goto END
+    $P0 = get_class 'Stream::Lines'
+    unless null $P0 goto END
 
     load_bytecode "library/Stream/Base.pir"
 

Modified: branches/pdd15oo/runtime/parrot/library/Stream/ParrotIO.pir
==============================================================================
--- branches/pdd15oo/runtime/parrot/library/Stream/ParrotIO.pir (original)
+++ branches/pdd15oo/runtime/parrot/library/Stream/ParrotIO.pir Wed Oct  3 
09:09:02 2007
@@ -27,8 +27,8 @@
     .local pmc base
     .local pmc io
 
-    find_type i, "Stream::ParrotIO"
-    if i > 1 goto END
+    $P0 = get_class 'Stream::ParrotIO'
+    unless null $P0 goto END
 
     load_bytecode "library/Stream/Base.pir"
 

Modified: branches/pdd15oo/runtime/parrot/library/Stream/Replay.pir
==============================================================================
--- branches/pdd15oo/runtime/parrot/library/Stream/Replay.pir   (original)
+++ branches/pdd15oo/runtime/parrot/library/Stream/Replay.pir   Wed Oct  3 
09:09:02 2007
@@ -12,8 +12,7 @@
 
     load_bytecode "library/Stream/Replay.pir"
 
-    $I0 = find_type "Stream::Replay"
-    $P0 = new $I0
+    $p0 = new "Stream::Replay"
     assign $P0, other_stream
 
     # .. read from $P0 ..
@@ -38,11 +37,11 @@
 .namespace ["Stream::Replay"]
 
 .sub onload :load :anon
-    find_type $I0, "Stream::Replay"
-    if $I0 > 1 goto END
-    
+    $P0 = get_class 'Stream::Replay'
+    unless null $P0 goto END
+
     load_bytecode "library/Stream/Base.pir"
-    
+
     # Stream::Replay
     getclass $P0, "Stream::Base"
     subclass $P0, $P0, "Stream::Replay"
@@ -112,8 +111,7 @@
     val = val."source"()
     branch ASSIGN
 NOTA:
-    find_type $I0, "Stream::Replay::Buffer"
-    new buffer, $I0
+    $P0 = new "Stream::Replay::Buffer"
     classoffset $I0, self, "Stream::Replay"
     setattribute self, $I0, buffer
 ASSIGN:
@@ -156,8 +154,7 @@
     .local pmc ret
     .local pmc temp
 
-    find_type $I0, "Stream::Replay"
-    ret = new $I0
+    ret = new "Stream::Replay"
     
     assign ret, self
     

Modified: branches/pdd15oo/runtime/parrot/library/Stream/Sub.pir
==============================================================================
--- branches/pdd15oo/runtime/parrot/library/Stream/Sub.pir      (original)
+++ branches/pdd15oo/runtime/parrot/library/Stream/Sub.pir      Wed Oct  3 
09:09:02 2007
@@ -11,8 +11,7 @@
 =head1 SYNOPSIS
 
     # create the stream
-    find_type $I0, "Stream::Sub"
-    new stream, $I0
+    new stream, "Stream::Sub"
 
     # set the source sub
     .const .Sub temp = "_test"
@@ -59,8 +58,8 @@
     .local pmc base
     .local pmc sub
 
-    find_type i, "Stream::Sub"
-    if i > 1 goto END
+    $P0 = get_class "Stream::Sub"
+    unless null $P0 goto END
 
     load_bytecode "library/Stream/Base.pir"
 

Modified: branches/pdd15oo/runtime/parrot/library/Stream/Writer.pir
==============================================================================
--- branches/pdd15oo/runtime/parrot/library/Stream/Writer.pir   (original)
+++ branches/pdd15oo/runtime/parrot/library/Stream/Writer.pir   Wed Oct  3 
09:09:02 2007
@@ -11,8 +11,7 @@
 =head1 SYNOPSIS
 
     # create the stream
-    find_type $I0, "Stream::Writer"
-    new stream, $I0
+    new stream, "Stream::Writer"
 
     # set the source sub
     .const .Sub temp = "_reader"
@@ -35,8 +34,8 @@
 .namespace ["Stream::Writer"]
 
 .sub __onload :load
-    find_type $I0, "Stream::Writer"
-    if $I0 > 1 goto END
+    $P0 = get_class "Stream::Writer"
+    unless null $P0 goto END
 
     load_bytecode "library/Stream/Base.pir"
 

Reply via email to