cvsuser     04/11/18 06:10:34

  Modified:    examples/benchmarks array_access.imc b62.imc b63.imc oo6.imc
               examples/sdl/tetris app.imc block.imc board.imc
                        boarddata.imc tetris.imc
               examples/streams Combiner.imc Coroutine.imc FileLines.imc
                        Filter.imc Include.imc Lines.imc ParrotIO.imc
                        Replay.imc SubCounter.imc SubHello.imc Writer.imc
               examples/subs sub1.imc sub2.imc
  Log:
  *.imc in examples: (except examples/assembly/ncurses_life.imc)
  - no direct register access for temps
  - no direct register access for argc[ISPN]
  
  Revision  Changes    Path
  1.2       +5 -5      parrot/examples/benchmarks/array_access.imc
  
  Index: array_access.imc
  ===================================================================
  RCS file: /cvs/public/parrot/examples/benchmarks/array_access.imc,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- array_access.imc  28 Oct 2004 09:43:02 -0000      1.1
  +++ array_access.imc  18 Nov 2004 14:10:30 -0000      1.2
  @@ -1,5 +1,5 @@
   # Copyright (C) 2001-2003 The Perl Foundation.  All rights reserved.
  -# $Id: array_access.imc,v 1.1 2004/10/28 09:43:02 leo Exp $
  +# $Id: array_access.imc,v 1.2 2004/11/18 14:10:30 jrieks Exp $
   
   =head1 NAME
   
  @@ -99,10 +99,10 @@
       z_index = max_index
   Z_LOOP:   # arr_size iterations
       if z_index < 0 goto Z_DONE
  -    set I3, arr_2[z_index]
  -    set I4, arr_1[z_index]
  -    add I3, I4
  -    arr_2[z_index] = I3
  +    set $I3, arr_2[z_index]
  +    set $I4, arr_1[z_index]
  +    add $I3, $I4
  +    arr_2[z_index] = $I3
       dec z_index
       branch Z_LOOP
   Z_DONE:
  
  
  
  1.2       +5 -5      parrot/examples/benchmarks/b62.imc
  
  Index: b62.imc
  ===================================================================
  RCS file: /cvs/public/parrot/examples/benchmarks/b62.imc,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- b62.imc   2 Jul 2004 10:28:41 -0000       1.1
  +++ b62.imc   18 Nov 2004 14:10:30 -0000      1.2
  @@ -1,14 +1,14 @@
   .sub main
       .include "iterator.pasm"
        $P2 = new .Slice [ .. 1000000]
  -     new P1, .Iterator, $P2
  -     set P1, .ITERATE_FROM_START
  +     new $P1, .Iterator, $P2
  +     set $P1, .ITERATE_FROM_START
           .local pmc n
        n = new PerlInt
   iter_loop:
  -        unless P1, iter_end
  -     shift I1, P1
  -     # n += I1
  +        unless $P1, iter_end
  +     shift $I1, $P1
  +     # n += $I1
        branch iter_loop
   iter_end:
        print n
  
  
  
  1.2       +5 -5      parrot/examples/benchmarks/b63.imc
  
  Index: b63.imc
  ===================================================================
  RCS file: /cvs/public/parrot/examples/benchmarks/b63.imc,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- b63.imc   2 Jul 2004 10:28:41 -0000       1.1
  +++ b63.imc   18 Nov 2004 14:10:30 -0000      1.2
  @@ -1,14 +1,14 @@
   .sub main
       .include "iterator.pasm"
        $P2 = new .Slice [ .. 1000000]
  -     new P1, .Iterator, $P2
  -     set P1, .ITERATE_FROM_START
  +     new $P1, .Iterator, $P2
  +     set $P1, .ITERATE_FROM_START
           .local pmc n
        n = new PerlInt
   iter_loop:
  -        unless P1, iter_end
  -     shift I1, P1
  -     n += I1
  +        unless $P1, iter_end
  +     shift $I1, $P1
  +     n += $I1
        branch iter_loop
   iter_end:
        print n
  
  
  
  1.2       +2 -2      parrot/examples/benchmarks/oo6.imc
  
  Index: oo6.imc
  ===================================================================
  RCS file: /cvs/public/parrot/examples/benchmarks/oo6.imc,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- oo6.imc   21 Mar 2004 15:46:07 -0000      1.1
  +++ oo6.imc   18 Nov 2004 14:10:30 -0000      1.2
  @@ -43,7 +43,7 @@
       ofs = classoffset self, "Foo"
       .local pmc r
       r = getattribute self, ofs
  -    unless I3 goto get
  +    unless argcP goto get
       assign r, v
   get:
       .pcc_begin_return
  @@ -58,7 +58,7 @@
       inc ofs
       .local pmc r
       r = getattribute self, ofs
  -    unless I3 goto get
  +    unless argcP goto get
       assign r, v
   get:
       .pcc_begin_return
  
  
  
  1.2       +3 -3      parrot/examples/sdl/tetris/app.imc
  
  Index: app.imc
  ===================================================================
  RCS file: /cvs/public/parrot/examples/sdl/tetris/app.imc,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- app.imc   3 Sep 2004 22:51:07 -0000       1.1
  +++ app.imc   18 Nov 2004 14:10:31 -0000      1.2
  @@ -609,7 +609,7 @@
       print "\n"
       
       # check the number of INT args
  -    if I1 >= 2 goto SKIP_ID
  +    if argcI >= 2 goto SKIP_ID
       # no INT arg => use a random next block
       set id, -1
   SKIP_ID:
  @@ -1042,7 +1042,7 @@
       getattribute flag, self, $I0
       
       # check the number of INT args
  -    if I1 <= 1 goto FLAG_GET
  +    if argcI <= 1 goto FLAG_GET
       # set a new value
       set flag[name], value
           
  @@ -1080,7 +1080,7 @@
       set xpos, 10
       
       # check the number of INT args
  -    if I1 >= 1 goto SET
  +    if argcI >= 1 goto SET
       
       classoffset $I0, self, "Tetris::App"
       add $I0, tPlayers
  
  
  
  1.2       +2 -2      parrot/examples/sdl/tetris/block.imc
  
  Index: block.imc
  ===================================================================
  RCS file: /cvs/public/parrot/examples/sdl/tetris/block.imc,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- block.imc 3 Sep 2004 22:51:07 -0000       1.1
  +++ block.imc 18 Nov 2004 14:10:31 -0000      1.2
  @@ -5,8 +5,8 @@
   =head1 SYNOPSIS
   
       # create a new block
  -    find_type I0, "Tetris::Block"
  -    new block, I0
  +    find_type $I0, "Tetris::Block"
  +    new block, $I0
       block."init"( board )
       
       # let the block fall down fast
  
  
  
  1.2       +2 -2      parrot/examples/sdl/tetris/board.imc
  
  Index: board.imc
  ===================================================================
  RCS file: /cvs/public/parrot/examples/sdl/tetris/board.imc,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- board.imc 3 Sep 2004 22:51:08 -0000       1.1
  +++ board.imc 18 Nov 2004 14:10:31 -0000      1.2
  @@ -77,8 +77,8 @@
       self."fill"( 0 )
   
       # setup the cache
  -    find_type I0, "Tetris::BoardData"
  -    new temp, I0
  +    find_type $I0, "Tetris::BoardData"
  +    new temp, $I0
       temp."init"( w, h )
       temp."fill"( -1 )
       setprop self, "cache", temp
  
  
  
  1.2       +2 -2      parrot/examples/sdl/tetris/boarddata.imc
  
  Index: boarddata.imc
  ===================================================================
  RCS file: /cvs/public/parrot/examples/sdl/tetris/boarddata.imc,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- boarddata.imc     3 Sep 2004 22:51:08 -0000       1.1
  +++ boarddata.imc     18 Nov 2004 14:10:31 -0000      1.2
  @@ -5,8 +5,8 @@
   =head1 SYNOPSIS
   
       # create the board data
  -    find_type I0, "BoardData"
  -    new data, I0
  +    find_type $I0, "BoardData"
  +    new data, $I0
       data."new"( 10, 20 )
   
       # fill the board
  
  
  
  1.2       +2 -2      parrot/examples/sdl/tetris/tetris.imc
  
  Index: tetris.imc
  ===================================================================
  RCS file: /cvs/public/parrot/examples/sdl/tetris/tetris.imc,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- tetris.imc        3 Sep 2004 22:51:08 -0000       1.1
  +++ tetris.imc        18 Nov 2004 14:10:31 -0000      1.2
  @@ -34,8 +34,8 @@
       load_bytecode "examples/sdl/tetris/app.imc"
       
       # create the tetris app
  -    find_type I0, "Tetris::App"
  -    new app, I0
  +    find_type $I0, "Tetris::App"
  +    new app, $I0
       
       app."flag"( "show blocksize", 1 )
       # run the tetris app
  
  
  
  1.2       +6 -6      parrot/examples/streams/Combiner.imc
  
  Index: Combiner.imc
  ===================================================================
  RCS file: /cvs/public/parrot/examples/streams/Combiner.imc,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Combiner.imc      9 Apr 2004 12:36:20 -0000       1.1
  +++ Combiner.imc      18 Nov 2004 14:10:32 -0000      1.2
  @@ -35,21 +35,21 @@
       load_bytecode "library/Stream/Sub.imc"
   
       # create the counter stream
  -    find_type I0, "Stream::Sub"
  -    new counter, I0
  +    find_type $I0, "Stream::Sub"
  +    new counter, $I0
       newsub temp, .Sub, _counter
       assign counter, temp
       
       # create the text stream
  -    find_type I0, "Stream::Sub"
  -    new text, I0
  +    find_type $I0, "Stream::Sub"
  +    new text, $I0
       # set its source
       newsub temp, .Sub, _text
       assign text, temp
   
       # create a combiner stream
  -    find_type I0, "Stream::Combiner"
  -    new combined, I0
  +    find_type $I0, "Stream::Combiner"
  +    new combined, $I0
       # add the streams
       assign combined, counter
       assign combined, text
  
  
  
  1.2       +2 -2      parrot/examples/streams/Coroutine.imc
  
  Index: Coroutine.imc
  ===================================================================
  RCS file: /cvs/public/parrot/examples/streams/Coroutine.imc,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Coroutine.imc     9 Apr 2004 12:36:20 -0000       1.1
  +++ Coroutine.imc     18 Nov 2004 14:10:32 -0000      1.2
  @@ -28,8 +28,8 @@
       load_bytecode "library/Stream/Coroutine.imc"
   
       # create the coroutine stream    
  -    find_type I0, "Stream::Coroutine"
  -    new stream, I0
  +    find_type $I0, "Stream::Coroutine"
  +    new stream, $I0
   
       # set the stream's source coroutine
       newsub temp, .Coroutine, _coro
  
  
  
  1.2       +8 -8      parrot/examples/streams/FileLines.imc
  
  Index: FileLines.imc
  ===================================================================
  RCS file: /cvs/public/parrot/examples/streams/FileLines.imc,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FileLines.imc     9 Apr 2004 12:36:20 -0000       1.1
  +++ FileLines.imc     18 Nov 2004 14:10:32 -0000      1.2
  @@ -40,24 +40,24 @@
       load_bytecode "library/Stream/Combiner.imc"
   
       # create a file stream
  -    find_type I0, "Stream::ParrotIO"
  -    new file, I0
  +    find_type $I0, "Stream::ParrotIO"
  +    new file, $I0
       file."open"( name, "<" )
   
       # process it one line per read
  -    find_type I0, "Stream::Lines"
  -    new lines, I0
  +    find_type $I0, "Stream::Lines"
  +    new lines, $I0
       assign lines, file
   
       # endless counter
  -    find_type I0, "Stream::Sub"
  -    new counter, I0
  +    find_type $I0, "Stream::Sub"
  +    new counter, $I0
       newsub temp, .Sub, _counter
       assign counter, temp
   
       # combine the counter and the file's lines
  -    find_type I0, "Stream::Combiner"
  -    new combiner, I0
  +    find_type $I0, "Stream::Combiner"
  +    new combiner, $I0
       assign combiner, counter
       assign combiner, lines
   
  
  
  
  1.2       +4 -4      parrot/examples/streams/Filter.imc
  
  Index: Filter.imc
  ===================================================================
  RCS file: /cvs/public/parrot/examples/streams/Filter.imc,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Filter.imc        9 Apr 2004 12:36:20 -0000       1.1
  +++ Filter.imc        18 Nov 2004 14:10:32 -0000      1.2
  @@ -26,15 +26,15 @@
       load_bytecode "library/Stream/Filter.imc"
       
       # create the counter stream
  -    find_type I0, "Stream::Sub"
  -    new stream, I0
  +    find_type $I0, "Stream::Sub"
  +    new stream, $I0
       # assign its source
       newsub temp, .Sub, _counter
       assign stream, temp
   
       # create the filter stream
  -    find_type I0, "Stream::Filter"
  -    new filter, I0
  +    find_type $I0, "Stream::Filter"
  +    new filter, $I0
       # assign its source
       assign filter, stream
       # set the filter sub
  
  
  
  1.2       +9 -9      parrot/examples/streams/Include.imc
  
  Index: Include.imc
  ===================================================================
  RCS file: /cvs/public/parrot/examples/streams/Include.imc,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Include.imc       9 Apr 2004 12:36:20 -0000       1.1
  +++ Include.imc       18 Nov 2004 14:10:32 -0000      1.2
  @@ -18,8 +18,8 @@
   
       load_bytecode "library/Stream/Sub.imc"
       
  -    find_type I0, "Stream::Sub"
  -    new stream, I0
  +    find_type $I0, "Stream::Sub"
  +    new stream, $I0
   
       # set the stream's source sub
       newsub temp, .Sub, _counter
  @@ -58,8 +58,8 @@
       .local pmc temp
       .local pmc func
       
  -    find_type I0, "Stream::Sub"
  -    new temp, I0
  +    find_type $I0, "Stream::Sub"
  +    new temp, $I0
   
       newsub func, .Sub, _included
       assign temp, func
  @@ -91,8 +91,8 @@
       self."write"( "hello" )
   
       # create another stream
  -    find_type I0, "Stream::Sub"
  -    new temp, I0
  +    find_type $I0, "Stream::Sub"
  +    new temp, $I0
       newsub func, .Sub, _counter2
       assign temp, func
       
  @@ -120,9 +120,9 @@
   LOOP:
       self."write"( str )
   
  -    ord I0, str
  -    inc I0
  -    chr str, I0
  +    ord $I0, str
  +    inc $I0
  +    chr str, $I0
       
       if str != "G" goto LOOP
   
  
  
  
  1.2       +4 -4      parrot/examples/streams/Lines.imc
  
  Index: Lines.imc
  ===================================================================
  RCS file: /cvs/public/parrot/examples/streams/Lines.imc,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Lines.imc 9 Apr 2004 12:36:20 -0000       1.1
  +++ Lines.imc 18 Nov 2004 14:10:32 -0000      1.2
  @@ -21,15 +21,15 @@
       load_bytecode "library/Stream/Lines.imc"
       
       # create a text stream
  -    find_type I0, "Stream::Sub"
  -    new stream, I0
  +    find_type $I0, "Stream::Sub"
  +    new stream, $I0
       # set the source
       newsub temp, .Sub, _text
       assign stream, temp
   
       # create a lines stream
  -    find_type I0, "Stream::Lines"
  -    new lines, I0
  +    find_type $I0, "Stream::Lines"
  +    new lines, $I0
       # set the source
       assign lines, stream
       
  
  
  
  1.2       +2 -2      parrot/examples/streams/ParrotIO.imc
  
  Index: ParrotIO.imc
  ===================================================================
  RCS file: /cvs/public/parrot/examples/streams/ParrotIO.imc,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ParrotIO.imc      9 Apr 2004 12:36:20 -0000       1.1
  +++ ParrotIO.imc      18 Nov 2004 14:10:32 -0000      1.2
  @@ -23,8 +23,8 @@
       load_bytecode "library/Stream/ParrotIO.imc"
   
       # create the ParrotIO stream    
  -    find_type I0, "Stream::ParrotIO"
  -    new stream, I0
  +    find_type $I0, "Stream::ParrotIO"
  +    new stream, $I0
   
       # open this file
       stream."open"( "examples/streams/ParrotIO.imc", "<" )
  
  
  
  1.2       +6 -6      parrot/examples/streams/Replay.imc
  
  Index: Replay.imc
  ===================================================================
  RCS file: /cvs/public/parrot/examples/streams/Replay.imc,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Replay.imc        26 May 2004 08:14:29 -0000      1.1
  +++ Replay.imc        18 Nov 2004 14:10:32 -0000      1.2
  @@ -4,10 +4,10 @@
       load_bytecode "library/Stream/Writer.imc"
       load_bytecode "library/Stream/Replay.imc"
       
  -    find_type I0, "Stream::Writer"
  -    new stream, I0
  -    P0 = global "_reader"
  -    assign stream, P0
  +    find_type $I0, "Stream::Writer"
  +    new stream, $I0
  +    $P0 = global "_reader"
  +    assign stream, $P0
       
       stream."write"( "1" )
       stream."write"( "2" )
  @@ -26,8 +26,8 @@
       .local pmc stream3
       .local string str
   
  -    find_type I0, "Stream::Replay"
  -    new stream1, I0
  +    find_type $I0, "Stream::Replay"
  +    new stream1, $I0
       assign stream1, self
       
       print "reader start\n"
  
  
  
  1.2       +2 -2      parrot/examples/streams/SubCounter.imc
  
  Index: SubCounter.imc
  ===================================================================
  RCS file: /cvs/public/parrot/examples/streams/SubCounter.imc,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SubCounter.imc    9 Apr 2004 12:36:20 -0000       1.1
  +++ SubCounter.imc    18 Nov 2004 14:10:32 -0000      1.2
  @@ -19,8 +19,8 @@
       load_bytecode "library/Stream/Base.imc"
       load_bytecode "library/Stream/Sub.imc"
       
  -    find_type I0, "Stream::Sub"
  -    new stream, I0
  +    find_type $I0, "Stream::Sub"
  +    new stream, $I0
   
       # set the stream's source sub
       newsub temp, .Sub, _counter
  
  
  
  1.2       +2 -2      parrot/examples/streams/SubHello.imc
  
  Index: SubHello.imc
  ===================================================================
  RCS file: /cvs/public/parrot/examples/streams/SubHello.imc,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SubHello.imc      9 Apr 2004 12:36:20 -0000       1.1
  +++ SubHello.imc      18 Nov 2004 14:10:32 -0000      1.2
  @@ -18,8 +18,8 @@
   
       load_bytecode "library/Stream/Sub.imc"
   
  -    find_type I0, "Stream::Sub"
  -    new stream, I0
  +    find_type $I0, "Stream::Sub"
  +    new stream, $I0
   
       # set the stream's source sub
       newsub temp, .Sub, _hello
  
  
  
  1.2       +2 -2      parrot/examples/streams/Writer.imc
  
  Index: Writer.imc
  ===================================================================
  RCS file: /cvs/public/parrot/examples/streams/Writer.imc,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Writer.imc        9 Apr 2004 12:36:20 -0000       1.1
  +++ Writer.imc        18 Nov 2004 14:10:32 -0000      1.2
  @@ -18,8 +18,8 @@
   
       load_bytecode "library/Stream/Writer.imc"
   
  -    find_type I0, "Stream::Writer"
  -    new stream, I0
  +    find_type $I0, "Stream::Writer"
  +    new stream, $I0
   
       # set the stream's source sub
       newsub temp, .Sub, _reader
  
  
  
  1.3       +3 -3      parrot/examples/subs/sub1.imc
  
  Index: sub1.imc
  ===================================================================
  RCS file: /cvs/public/parrot/examples/subs/sub1.imc,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- sub1.imc  31 Jan 2004 16:09:21 -0000      1.2
  +++ sub1.imc  18 Nov 2004 14:10:33 -0000      1.3
  @@ -1,5 +1,5 @@
   # Copyright (C) 2001-2003 The Perl Foundation.  All rights reserved.
  -# $Id: sub1.imc,v 1.2 2004/01/31 16:09:21 mikescott Exp $
  +# $Id: sub1.imc,v 1.3 2004/11/18 14:10:33 jrieks Exp $
   
   =head1 NAME
   
  @@ -22,9 +22,9 @@
     i = 7
     $I1 = 8
     s = "nine"
  -  I0 = _foo(i, $I1, s)
  +  $I0 = _foo(i, $I1, s)
     print "return: "
  -  print I0
  +  print $I0
     print "\n"
     end
   .end
  
  
  
  1.3       +4 -4      parrot/examples/subs/sub2.imc
  
  Index: sub2.imc
  ===================================================================
  RCS file: /cvs/public/parrot/examples/subs/sub2.imc,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- sub2.imc  31 Jan 2004 16:09:21 -0000      1.2
  +++ sub2.imc  18 Nov 2004 14:10:33 -0000      1.3
  @@ -1,5 +1,5 @@
   # Copyright (C) 2001-2003 The Perl Foundation.  All rights reserved.
  -# $Id: sub2.imc,v 1.2 2004/01/31 16:09:21 mikescott Exp $
  +# $Id: sub2.imc,v 1.3 2004/11/18 14:10:33 jrieks Exp $
   
   =head1 NAME
   
  @@ -16,11 +16,11 @@
   =cut
   
   .sub _main
  -  (I0, I1, $I99) = _foo(7, 8, "nine")
  +  ($I0, $I1, $I99) = _foo(7, 8, "nine")
     print "return: "
  -  print I0
  +  print $I0
     print " "
  -  print I1
  +  print $I1
     print " "
     print $I99
     print "\n"
  
  
  

Reply via email to