Author: chromatic
Date: Mon Nov 10 23:36:40 2008
New Revision: 32519

Modified:
   trunk/examples/io/async_select.pir
   trunk/examples/namespace/namespace_dump.pir
   trunk/examples/sdl/mandel.pir
   trunk/examples/shootout/revcomp.pir
   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/SubCounter.pir
   trunk/examples/streams/SubHello.pir
   trunk/examples/streams/Writer.pir
   trunk/examples/subs/coroutine.pasm
   trunk/examples/subs/pasm_sub1.pasm
   trunk/examples/tutorial/80_closure.pir

Log:
[examples] Removed deprecated PMC type integers.

Modified: trunk/examples/io/async_select.pir
==============================================================================
--- trunk/examples/io/async_select.pir  (original)
+++ trunk/examples/io/async_select.pir  Mon Nov 10 23:36:40 2008
@@ -31,7 +31,7 @@
     $S0 = pop pio   # unbuffer
     data = new 'Integer'
     data = 42
-    .const .Sub handler = "io_handler"
+    .const 'Sub' handler = "io_handler"
     pio_out = getstdout
     idles = '|/-\'
     i = 0

Modified: trunk/examples/namespace/namespace_dump.pir
==============================================================================
--- trunk/examples/namespace/namespace_dump.pir (original)
+++ trunk/examples/namespace/namespace_dump.pir Mon Nov 10 23:36:40 2008
@@ -34,15 +34,16 @@
     print $P1
     print "\n"
 no_sym:
-    $I0 = typeof $P0
-    if $I0 != .NCI goto no_nci
+    $I0 = isa $P0, 'NCI'
+    unless $I0 goto no_nci
     $P0 = new 'String'
     $P0 = "NCI"
 no_nci:
     print spac
     print $S0
     print " => "
-    if $I0 != .MultiSub goto no_multi
+    $I0 = isa $P0, 'MultiSub'
+    unless $I0 goto no_multi
     $I1 = lev + 1
     print " Multi [\n"
     dump_multi($P0, $I1)
@@ -52,7 +53,8 @@
 no_multi:
     print $P0
     print "\n"
-    if $I0 != .NameSpace goto no_ns
+    $I0 = isa $P0, 'NameSpace'
+    unless $I0 goto no_ns
     $I1 = lev + 1
     dump($P0, $I1)
 no_ns:
@@ -79,8 +81,7 @@
     j = 0
 lp2:
     $I0 = $P1[j]
-    typeof $S0, $I0
-    print $S0
+    print $I0
     print " "
     inc j
     if j < m goto lp2

Modified: trunk/examples/sdl/mandel.pir
==============================================================================
--- trunk/examples/sdl/mandel.pir       (original)
+++ trunk/examples/sdl/mandel.pir       Mon Nov 10 23:36:40 2008
@@ -251,7 +251,7 @@
     .local int h2
     h2 = h / 2
     thr = new 'ParrotThread'
-    .const .Sub raw_calc_f = 'raw_calc'
+    .const 'Sub' raw_calc_f = 'raw_calc'
     .include 'cloneflags.pasm'
     .local int flags
     flags  = .PARROT_CLONE_CODE
@@ -453,7 +453,7 @@
     if g <= 255 goto loop_g
     r += 36
     if r <= 255 goto loop_r
-    .const .Sub by_bright = "bright"
+    .const 'Sub' by_bright = "bright"
     palette.'sort'(by_bright)
     .return (palette)
 .end

Modified: trunk/examples/shootout/revcomp.pir
==============================================================================
--- trunk/examples/shootout/revcomp.pir (original)
+++ trunk/examples/shootout/revcomp.pir Mon Nov 10 23:36:40 2008
@@ -69,7 +69,7 @@
         $P0 = new 'String'
         $P0.'reverse'(line)
 
-       .const .Sub tr_00 = 'tr_00_init'
+       .const 'Sub' tr_00 = 'tr_00_init'
        $P0.'trans'(line, tr_00)
 
        i = 0

Modified: trunk/examples/streams/Bytes.pir
==============================================================================
--- trunk/examples/streams/Bytes.pir    (original)
+++ trunk/examples/streams/Bytes.pir    Mon Nov 10 23:36:40 2008
@@ -19,7 +19,7 @@
 
     $P0 = new "Stream::Sub"
     # set the stream's source sub
-    .const .Sub temp = "_hello"
+    .const 'Sub' temp = "_hello"
     assign $P0, $P1
 
     stream = new "Stream::Replay"

Modified: trunk/examples/streams/Combiner.pir
==============================================================================
--- trunk/examples/streams/Combiner.pir (original)
+++ trunk/examples/streams/Combiner.pir Mon Nov 10 23:36:40 2008
@@ -35,13 +35,13 @@
 
     # create the counter stream
     counter = new "Stream::Sub"
-    .const .Sub temp = "_counter"
+    .const 'Sub' temp = "_counter"
     assign counter, temp
 
     # create the text stream
     text = new "Stream::Sub"
     # set its source
-    .const .Sub temp = "_text"
+    .const 'Sub' temp = "_text"
     assign text, temp
 
     # create a combiner stream
@@ -51,7 +51,7 @@
     assign combined, text
 
     # specify our own combiner sub
-    .const .Sub temp = "_combiner"
+    .const 'Sub' temp = "_combiner"
     combined."combiner"( temp )
 
     # dump the combined stream

Modified: trunk/examples/streams/Coroutine.pir
==============================================================================
--- trunk/examples/streams/Coroutine.pir        (original)
+++ trunk/examples/streams/Coroutine.pir        Mon Nov 10 23:36:40 2008
@@ -32,7 +32,7 @@
 
     # set the stream's source coroutine
     # A .Sub is a coroutine when there is a yield?
-    .const .Sub temp = "_coro"
+    .const 'Sub' temp = "_coro"
     assign stream, temp
     #stream."source"( temp )
 

Modified: trunk/examples/streams/FileLines.pir
==============================================================================
--- trunk/examples/streams/FileLines.pir        (original)
+++ trunk/examples/streams/FileLines.pir        Mon Nov 10 23:36:40 2008
@@ -48,7 +48,7 @@
 
     # endless counter
     counter = new "Stream::Sub"
-    .const .Sub temp = "_counter"
+    .const 'Sub' temp = "_counter"
     assign counter, temp
 
     # combine the counter and the file's lines

Modified: trunk/examples/streams/Filter.pir
==============================================================================
--- trunk/examples/streams/Filter.pir   (original)
+++ trunk/examples/streams/Filter.pir   Mon Nov 10 23:36:40 2008
@@ -27,7 +27,7 @@
     # create the counter stream
     stream = new "Stream::Sub"
     # assign its source
-    .const .Sub temp = "_counter"
+    .const 'Sub' temp = "_counter"
     assign stream, temp
 
     # create the filter stream
@@ -35,7 +35,7 @@
     # assign its source
     assign filter, stream
     # set the filter sub
-    .const .Sub temp = "_filter"
+    .const 'Sub' temp = "_filter"
     filter."filter"( temp )
 
     # dump the stream

Modified: trunk/examples/streams/Include.pir
==============================================================================
--- trunk/examples/streams/Include.pir  (original)
+++ trunk/examples/streams/Include.pir  Mon Nov 10 23:36:40 2008
@@ -20,7 +20,7 @@
     stream = new "Stream::Sub"
 
     # set the stream's source sub
-    .const .Sub temp = "_counter"
+    .const 'Sub' temp = "_counter"
     assign stream, temp
 
     # dump the stream
@@ -56,7 +56,7 @@
 
     temp = new "Stream::Sub"
 
-    .const .Sub func = "_included"
+    .const 'Sub' func = "_included"
     assign temp, func
 
     # include it
@@ -84,7 +84,7 @@
 
     # create another stream
     temp = new "Stream::Sub"
-    .const .Sub func = "_counter2"
+    .const 'Sub' func = "_counter2"
     assign temp, func
 
     # include it

Modified: trunk/examples/streams/Lines.pir
==============================================================================
--- trunk/examples/streams/Lines.pir    (original)
+++ trunk/examples/streams/Lines.pir    Mon Nov 10 23:36:40 2008
@@ -22,7 +22,7 @@
     # create a text stream
     stream = new "Stream::Sub"
     # set the source
-    .const .Sub temp = "_text"
+    .const 'Sub' temp = "_text"
     assign stream, temp
 
     # create a lines stream

Modified: trunk/examples/streams/SubCounter.pir
==============================================================================
--- trunk/examples/streams/SubCounter.pir       (original)
+++ trunk/examples/streams/SubCounter.pir       Mon Nov 10 23:36:40 2008
@@ -21,7 +21,7 @@
     stream = new "Stream::Sub"
 
     # set the stream's source sub
-    .const .Sub temp = "_counter"
+    .const 'Sub' temp = "_counter"
     assign stream, temp
 
     # dump the stream

Modified: trunk/examples/streams/SubHello.pir
==============================================================================
--- trunk/examples/streams/SubHello.pir (original)
+++ trunk/examples/streams/SubHello.pir Mon Nov 10 23:36:40 2008
@@ -20,7 +20,7 @@
     stream = new "Stream::Sub"
 
     # set the stream's source sub
-    .const .Sub temp = "_hello"
+    .const 'Sub' temp = "_hello"
     assign stream, temp
 
     # dump the stream

Modified: trunk/examples/streams/Writer.pir
==============================================================================
--- trunk/examples/streams/Writer.pir   (original)
+++ trunk/examples/streams/Writer.pir   Mon Nov 10 23:36:40 2008
@@ -20,7 +20,7 @@
     stream = new "Stream::Writer"
 
     # set the stream's source sub
-    .const .Sub temp = "_reader"
+    .const 'Sub' temp = "_reader"
     assign stream, temp
 
     print "main start\n"

Modified: trunk/examples/subs/coroutine.pasm
==============================================================================
--- trunk/examples/subs/coroutine.pasm  (original)
+++ trunk/examples/subs/coroutine.pasm  Mon Nov 10 23:36:40 2008
@@ -21,7 +21,7 @@
 =cut
 
 # create a coro and save it on the user stack
-.const .Sub P0 =  "MYCOROUTINE"
+.const 'Sub' P0 =  "MYCOROUTINE"
 # a coroutine carries state - clone it
 clone P0, P0
 

Modified: trunk/examples/subs/pasm_sub1.pasm
==============================================================================
--- trunk/examples/subs/pasm_sub1.pasm  (original)
+++ trunk/examples/subs/pasm_sub1.pasm  Mon Nov 10 23:36:40 2008
@@ -26,7 +26,7 @@
 =cut
 
     # Fetch a subroutine objec
-    .const .Sub P0 = "_sub"
+    .const 'Sub' P0 = "_sub"
 
     # Call the sub in argument, create return continuation
     invokecc P0

Modified: trunk/examples/tutorial/80_closure.pir
==============================================================================
--- trunk/examples/tutorial/80_closure.pir      (original)
+++ trunk/examples/tutorial/80_closure.pir      Mon Nov 10 23:36:40 2008
@@ -10,7 +10,7 @@
     $P0 = 22
 
     .local pmc base_sub, myclosure
-    .const .Sub base_sub = "closure_sub"
+    .const 'Sub' base_sub = "closure_sub"
 
     newclosure myclosure, base_sub
     $P1 = myclosure(5)

Reply via email to