[svn:parrot] r49135 - in branches/stdhandle_meths: . compilers/tge docs/book/draft examples/pge examples/pir examples/pir/befunge examples/shootout examples/tge/branch runtime/parrot/library/Archive runtime/parrot/library/CGI runtime/parrot/library/Configure runtime/parrot/library/PGE runtime/parrot/library/TAP runtime/parrot/library/Test/Builder t/op t/pmc tools/dev

whiteknight at svn.parrot.org whiteknight at svn.parrot.org
Sat Sep 18 11:35:30 UTC 2010


Author: whiteknight
Date: Sat Sep 18 11:35:28 2010
New Revision: 49135
URL: https://trac.parrot.org/parrot/changeset/49135

Log:
remove most of the remaining references to the stdhandle method and the stdio.pasm file that it uses

Modified:
   branches/stdhandle_meths/DEPRECATED.pod
   branches/stdhandle_meths/compilers/tge/tgc.pir
   branches/stdhandle_meths/docs/book/draft/chXX_hlls.pod
   branches/stdhandle_meths/examples/pge/demo.pir
   branches/stdhandle_meths/examples/pir/befunge/befunge.pir
   branches/stdhandle_meths/examples/pir/befunge/debug.pir
   branches/stdhandle_meths/examples/pir/befunge/io.pir
   branches/stdhandle_meths/examples/pir/life.pir
   branches/stdhandle_meths/examples/shootout/fasta.pir
   branches/stdhandle_meths/examples/shootout/regexdna.pir
   branches/stdhandle_meths/examples/shootout/revcomp.pir
   branches/stdhandle_meths/examples/shootout/sumcol.pir
   branches/stdhandle_meths/examples/tge/branch/transform.pir
   branches/stdhandle_meths/runtime/parrot/library/Archive/Tar.pir
   branches/stdhandle_meths/runtime/parrot/library/Archive/Zip.pir
   branches/stdhandle_meths/runtime/parrot/library/CGI/QueryHash.pir
   branches/stdhandle_meths/runtime/parrot/library/Configure/genfile.pir
   branches/stdhandle_meths/runtime/parrot/library/PGE/Util.pir
   branches/stdhandle_meths/runtime/parrot/library/TAP/Parser.pir
   branches/stdhandle_meths/runtime/parrot/library/Test/Builder/Output.pir
   branches/stdhandle_meths/t/op/string_cs.t
   branches/stdhandle_meths/t/op/stringu.t
   branches/stdhandle_meths/t/pmc/freeze.t
   branches/stdhandle_meths/t/pmc/io.t
   branches/stdhandle_meths/tools/dev/nci_thunk_gen.pir
   branches/stdhandle_meths/tools/dev/parrot-config.pir

Modified: branches/stdhandle_meths/DEPRECATED.pod
==============================================================================
--- branches/stdhandle_meths/DEPRECATED.pod	Sat Sep 18 06:33:29 2010	(r49134)
+++ branches/stdhandle_meths/DEPRECATED.pod	Sat Sep 18 11:35:28 2010	(r49135)
@@ -59,10 +59,6 @@
 
 L<https://trac.parrot.org/parrot/ticket/452>
 
-=item Method stdhandle in ParrotInterpreter [experimental]
-
-L<https://trac.parrot.org/parrot/ticket/264>
-
 =item Overriding vtable invoke in PIR objects [experimental]
 
 The VTABLE invoke in object.pmc puts SELF at the start of the
@@ -444,13 +440,13 @@
 
 L<https://trac.parrot.org/parrot/ticket/463>
 
-=item PAST::Val node generation [eligible in 1.5] 
+=item PAST::Val node generation [eligible in 1.5]
 
-The PAST::Compiler may generate the code for PAST::Val nodes 
-(i.e., constants) at the beginning of the block (Parrot sub) instead 
-of the location where they occur in the PAST tree. 
+The PAST::Compiler may generate the code for PAST::Val nodes
+(i.e., constants) at the beginning of the block (Parrot sub) instead
+of the location where they occur in the PAST tree.
 
-L<https://trac.parrot.org/parrot/ticket/868> 
+L<https://trac.parrot.org/parrot/ticket/868>
 
 =item Meta-model implementation used by PCT [eligible in 2.7]
 

Modified: branches/stdhandle_meths/compilers/tge/tgc.pir
==============================================================================
--- branches/stdhandle_meths/compilers/tge/tgc.pir	Sat Sep 18 06:33:29 2010	(r49134)
+++ branches/stdhandle_meths/compilers/tge/tgc.pir	Sat Sep 18 11:35:28 2010	(r49135)
@@ -25,7 +25,6 @@
 
 =cut
 
-.include 'stdio.pasm'
 
 .sub "main" :main
     .param pmc args
@@ -67,7 +66,7 @@
 
   OUTPUT_STDOUT:
     $P0 = getinterp
-    outfh = $P0.'stdhandle'(.PIO_STDOUT_FILENO)
+    outfh = $P0.'stdout_handle'()
     goto OUTPUT_DONE
 
   OUTPUT_FILE:
@@ -105,7 +104,7 @@
 
   USAGE:
     $P0 = getinterp
-    $P1 = $P0.'stdhandle'(.PIO_STDERR_FILENO)
+    $P1 = $P0.'stderr_handle'()
     $P1.'print'("Usage: ")
     $P1.'print'(prog)
     $P1.'print'(" [OPTIONS] FILE\n")
@@ -118,13 +117,13 @@
 
   ERR_TOO_FEW_ARGS:
     $P0 = getinterp
-    $P1 = $P0.'stdhandle'(.PIO_STDERR_FILENO)
+    $P1 = $P0.'stderr_handle'()
     $P1.'print'("Error: too few arguments\n\n")
     goto USAGE
 
   ERR_NO_INFILE:
     $P0 = getinterp
-    $P1 = $P0.'stdhandle'(.PIO_STDERR_FILENO)
+    $P1 = $P0.'stderr_handle'()
     $P1.'print'("Error: file not found: ")
     $P1.'print'(infile)
     $P1.'print'("\n\n")
@@ -132,7 +131,7 @@
 
   ERR_NO_OUTFILE:
     $P0 = getinterp
-    $P1 = $P0.'stdhandle'(.PIO_STDERR_FILENO)
+    $P1 = $P0.'stderr_handle'()
     $P1.'print'("Error: file not found: ")
     $P1.'print'(outfile)
     $P1.'print'("\n\n")

Modified: branches/stdhandle_meths/docs/book/draft/chXX_hlls.pod
==============================================================================
--- branches/stdhandle_meths/docs/book/draft/chXX_hlls.pod	Sat Sep 18 06:33:29 2010	(r49134)
+++ branches/stdhandle_meths/docs/book/draft/chXX_hlls.pod	Sat Sep 18 11:35:28 2010	(r49135)
@@ -106,7 +106,7 @@
     .sub 'hello'
        say 'hello world!'
     .end
-  
+
     .sub 'goodbye'
        say 'goodbye world!'
     .end
@@ -126,20 +126,18 @@
 
 =begin PIR
 
-  .include 'stdio.pasm'
-
   .sub main
     $P0 = getinterp
-    $P0 = $P0.'stdhandle'(.PIO_STDIN_FILENO)
+    $P0 = $P0.'stdin_handle'()
     $P1 = compreg 'PIR'
-    
+
     loop_top:
       $S0 = $P0.'readline'()
       $S0 = ".sub '' :anon\n" . $S0
       $S0 = $S0 . "\n.end\n"
       $P2 = $P1($S0)
       $P2()
-      
+
       goto loop_top
   .end
 

Modified: branches/stdhandle_meths/examples/pge/demo.pir
==============================================================================
--- branches/stdhandle_meths/examples/pge/demo.pir	Sat Sep 18 06:33:29 2010	(r49134)
+++ branches/stdhandle_meths/examples/pge/demo.pir	Sat Sep 18 11:35:28 2010	(r49135)
@@ -2,7 +2,6 @@
 # $Id$
 
 .include "errors.pasm"
-.include 'stdio.pasm'
 .sub _main
     .local string x
     .local string pattern
@@ -36,7 +35,7 @@
     print "\ninput \"regex <pattern>\", \"glob <pattern>\", \"save <name>\",\n"
     print "target string, \"pir\", \"exp\", \"trace\", \"next\"\n"
     $P0 = getinterp
-    stdin = $P0.'stdhandle'(.PIO_STDIN_FILENO)
+    stdin = $P0.'stdin_handle'()
     x = stdin.'readline'()
     length $I0, x
     if $I0 < 1 goto end_demo

Modified: branches/stdhandle_meths/examples/pir/befunge/befunge.pir
==============================================================================
--- branches/stdhandle_meths/examples/pir/befunge/befunge.pir	Sat Sep 18 06:33:29 2010	(r49134)
+++ branches/stdhandle_meths/examples/pir/befunge/befunge.pir	Sat Sep 18 11:35:28 2010	(r49135)
@@ -3,7 +3,6 @@
 
 .loadlib 'io_ops'
 
-.include "stdio.pasm"
 .include "debug.pir"
 .include "flow.pir"
 .include "io.pir"
@@ -19,7 +18,7 @@
     # disable buffering on stdout
     .local pmc stdout
     $P0 = getinterp
-    stdout = $P0.'stdhandle'(.PIO_STDOUT_FILENO)
+    stdout = $P0.'stdout_handle'()
     stdout.'buffer_type'("unbuffered")
 
     # parsing argv

Modified: branches/stdhandle_meths/examples/pir/befunge/debug.pir
==============================================================================
--- branches/stdhandle_meths/examples/pir/befunge/debug.pir	Sat Sep 18 06:33:29 2010	(r49134)
+++ branches/stdhandle_meths/examples/pir/befunge/debug.pir	Sat Sep 18 11:35:28 2010	(r49135)
@@ -180,7 +180,7 @@
 
     print "bef> "
     $P0 = getinterp
-    $P0 = $P0.'stdhandle'(.PIO_STDIN_FILENO)
+    $P0 = $P0.'stdin_handle'()
     $S0 = $P0.'readline'()
     $S0 = chopn $S0, 1
     $I0 = length $S0

Modified: branches/stdhandle_meths/examples/pir/befunge/io.pir
==============================================================================
--- branches/stdhandle_meths/examples/pir/befunge/io.pir	Sat Sep 18 06:33:29 2010	(r49134)
+++ branches/stdhandle_meths/examples/pir/befunge/io.pir	Sat Sep 18 11:35:28 2010	(r49135)
@@ -40,7 +40,7 @@
     if $I0 > 0 goto _IO__INPUT_CHAR__SUBSTR
 
     $P1 = getinterp
-    $P1 = $P1.'stdhandle'(.PIO_STDIN_FILENO)
+    $P1 = $P1.'stdin_handle'()
     $S0 = $P1.'readline'()
     $S0 = chopn $S0, 1
 
@@ -73,7 +73,7 @@
     if len > 0 goto _IO__INPUT_INT__PARSE_INPUT
 
     $P1 = getinterp
-    $P1 = $P1.'stdhandle'(.PIO_STDIN_FILENO)
+    $P1 = $P1.'stdin_handle'()
     $S0 = $P1.'readline'()
     $S0 = chopn $S0, 1
     len = length $S0

Modified: branches/stdhandle_meths/examples/pir/life.pir
==============================================================================
--- branches/stdhandle_meths/examples/pir/life.pir	Sat Sep 18 06:33:29 2010	(r49134)
+++ branches/stdhandle_meths/examples/pir/life.pir	Sat Sep 18 11:35:28 2010	(r49135)
@@ -87,8 +87,7 @@
 	mod $I31,$I0,100
 	if $I31, skip
         $P0 = getinterp
-        .include 'stdio.pasm'
-        $P1 = $P0.'stdhandle'(.PIO_STDERR_FILENO)
+        $P1 = $P0.'stderr_handle'()
 	print $P1, "."
 skip:
 

Modified: branches/stdhandle_meths/examples/shootout/fasta.pir
==============================================================================
--- branches/stdhandle_meths/examples/shootout/fasta.pir	Sat Sep 18 06:33:29 2010	(r49134)
+++ branches/stdhandle_meths/examples/shootout/fasta.pir	Sat Sep 18 11:35:28 2010	(r49135)
@@ -163,9 +163,8 @@
 	.local pmc interp, stdout
 	.local int n
 	# stdout is linebuffered per default - make it block buffered
-        .include 'stdio.pasm'
         interp = getinterp
-	stdout = interp.'stdhandle'(.PIO_STDOUT_FILENO)
+	stdout = interp.'stdout_handle'()
 	stdout.'buffer_size'(40960)
 	$I0 = argv
 	if $I0 > 1 goto argsok

Modified: branches/stdhandle_meths/examples/shootout/regexdna.pir
==============================================================================
--- branches/stdhandle_meths/examples/shootout/regexdna.pir	Sat Sep 18 06:33:29 2010	(r49134)
+++ branches/stdhandle_meths/examples/shootout/regexdna.pir	Sat Sep 18 11:35:28 2010	(r49135)
@@ -62,8 +62,7 @@
 	# Read in the file
 beginwhile:
         $P0      = getinterp
-        .include 'stdio.pasm'
-        $P1      = $P0.'stdhandle'(.PIO_STDIN_FILENO)
+        $P1      = $P0.'stdin_handle'()
         chunk    = $P1.'read'(65535)
         chunklen = length chunk
 	unless chunklen goto endwhile

Modified: branches/stdhandle_meths/examples/shootout/revcomp.pir
==============================================================================
--- branches/stdhandle_meths/examples/shootout/revcomp.pir	Sat Sep 18 06:33:29 2010	(r49134)
+++ branches/stdhandle_meths/examples/shootout/revcomp.pir	Sat Sep 18 11:35:28 2010	(r49135)
@@ -36,9 +36,8 @@
 	.local pmc stdin, stdout
 	.local string line, seq
         $P0    = getinterp
-        .include 'stdio.pasm'
-        stdin  = $P0.'stdhandle'(.PIO_STDIN_FILENO)
-        stdout = $P0.'stdhandle'(.PIO_STDOUT_FILENO)
+        stdin  = $P0.'stdin_handle'()
+        stdout = $P0.'stdout_handle'()
 	# stdout is linebuffered per default - make it block buffered
 	stdout.'buffer_size'(8192)
 

Modified: branches/stdhandle_meths/examples/shootout/sumcol.pir
==============================================================================
--- branches/stdhandle_meths/examples/shootout/sumcol.pir	Sat Sep 18 06:33:29 2010	(r49134)
+++ branches/stdhandle_meths/examples/shootout/sumcol.pir	Sat Sep 18 11:35:28 2010	(r49135)
@@ -12,8 +12,7 @@
 	.local int count, tmp, linelen
 	count  = 0
 	interp = getinterp
-        .include 'stdio.pasm'
-	stdin  = interp.'stdhandle'(.PIO_STDIN_FILENO)
+	stdin  = interp.'stdin_handle'()
 beginwhile:
 	line    = stdin.'readline'()
 	linelen = length line

Modified: branches/stdhandle_meths/examples/tge/branch/transform.pir
==============================================================================
--- branches/stdhandle_meths/examples/tge/branch/transform.pir	Sat Sep 18 06:33:29 2010	(r49134)
+++ branches/stdhandle_meths/examples/tge/branch/transform.pir	Sat Sep 18 11:35:28 2010	(r49135)
@@ -106,8 +106,7 @@
     if $I0 == 2 goto fromfile
 
     $P0 = getinterp
-    .include 'stdio.pasm'
-    filehandle = $P0.'stdhandle'(.PIO_STDIN_FILENO)
+    filehandle = $P0.'stdin_handle'()
     goto grabline
 
   fromfile:

Modified: branches/stdhandle_meths/runtime/parrot/library/Archive/Tar.pir
==============================================================================
--- branches/stdhandle_meths/runtime/parrot/library/Archive/Tar.pir	Sat Sep 18 06:33:29 2010	(r49134)
+++ branches/stdhandle_meths/runtime/parrot/library/Archive/Tar.pir	Sat Sep 18 11:35:28 2010	(r49135)
@@ -440,8 +440,7 @@
     .param pmc args :slurpy
     $S0 = join '', args
     $P0 = getinterp
-    .include 'stdio.pasm'
-    $P1 = $P0.'stdhandle'(.PIO_STDERR_FILENO)
+    $P1 = $P0.'stderr_handle'()
     $P1.'print'($S0)
     $P1.'print'("\n")
 .end

Modified: branches/stdhandle_meths/runtime/parrot/library/Archive/Zip.pir
==============================================================================
--- branches/stdhandle_meths/runtime/parrot/library/Archive/Zip.pir	Sat Sep 18 06:33:29 2010	(r49134)
+++ branches/stdhandle_meths/runtime/parrot/library/Archive/Zip.pir	Sat Sep 18 11:35:28 2010	(r49135)
@@ -53,8 +53,7 @@
     .param pmc args :slurpy
     $S0 = join '', args
     $P0 = getinterp
-    .include 'stdio.pasm'
-    $P1 = $P0.'stdhandle'(.PIO_STDERR_FILENO)
+    $P1 = $P0.'stderr_handle'()
     $P1.'print'($S0)
     $P1.'print'("\n")
 .end

Modified: branches/stdhandle_meths/runtime/parrot/library/CGI/QueryHash.pir
==============================================================================
--- branches/stdhandle_meths/runtime/parrot/library/CGI/QueryHash.pir	Sat Sep 18 06:33:29 2010	(r49134)
+++ branches/stdhandle_meths/runtime/parrot/library/CGI/QueryHash.pir	Sat Sep 18 11:35:28 2010	(r49135)
@@ -70,8 +70,7 @@
         content_length  = my_env['CONTENT_LENGTH']
         len             = content_length
         $P0             = getinterp
-        .include 'stdio.pasm'
-        in              = $P0.'stdhandle'(.PIO_STDIN_FILENO)
+        in              = $P0.'stdin_handle'()
         query           = in.'read'(len)
         in.'close'()
         #_dumper( query, 'queryPOST:' )

Modified: branches/stdhandle_meths/runtime/parrot/library/Configure/genfile.pir
==============================================================================
--- branches/stdhandle_meths/runtime/parrot/library/Configure/genfile.pir	Sat Sep 18 06:33:29 2010	(r49134)
+++ branches/stdhandle_meths/runtime/parrot/library/Configure/genfile.pir	Sat Sep 18 11:35:28 2010	(r49135)
@@ -358,8 +358,7 @@
     .param int pos
     .param string msg
     $P0 = getinterp
-    .include 'stdio.pasm'
-    $P1 = $P0.'stdhandle'(.PIO_STDERR_FILENO)
+    $P1 = $P0.'stderr_handle'()
     $P1.'print'("in '")
     $P1.'print'(str)
     $P1.'print'("' at ")
@@ -406,8 +405,7 @@
     goto L8
   L7:
     $P0 = getinterp
-    .include 'stdio.pasm'
-    $P1 = $P0.'stdhandle'(.PIO_STDERR_FILENO)
+    $P1 = $P0.'stderr_handle'()
     $P1.'print'("\tunknown config: ")
     $P1.'print'($S1)
     $P1.'print'("\n")

Modified: branches/stdhandle_meths/runtime/parrot/library/PGE/Util.pir
==============================================================================
--- branches/stdhandle_meths/runtime/parrot/library/PGE/Util.pir	Sat Sep 18 06:33:29 2010	(r49134)
+++ branches/stdhandle_meths/runtime/parrot/library/PGE/Util.pir	Sat Sep 18 11:35:28 2010	(r49135)
@@ -133,8 +133,7 @@
     message .= "\n"
   emit_message:
     $P0 = getinterp
-    .include 'stdio.pasm'
-    $P1 = $P0.'stdhandle'(.PIO_STDERR_FILENO)
+    $P1 = $P0.'stderr_handle'()
     $P1.'print'(message)
 
     mob.'to'(pos)

Modified: branches/stdhandle_meths/runtime/parrot/library/TAP/Parser.pir
==============================================================================
--- branches/stdhandle_meths/runtime/parrot/library/TAP/Parser.pir	Sat Sep 18 06:33:29 2010	(r49134)
+++ branches/stdhandle_meths/runtime/parrot/library/TAP/Parser.pir	Sat Sep 18 11:35:28 2010	(r49135)
@@ -1086,8 +1086,7 @@
     goto L5
   L2:
     $P0 = getinterp
-    .include 'stdio.pasm'
-    $P1 = $P0.'stdhandle'(.PIO_STDERR_FILENO)
+    $P1 = $P0.'stderr_handle'()
     $P1.'print'("Unhandled token type: ")
     $P1.'print'(type)
     $P1.'print'("\n")

Modified: branches/stdhandle_meths/runtime/parrot/library/Test/Builder/Output.pir
==============================================================================
--- branches/stdhandle_meths/runtime/parrot/library/Test/Builder/Output.pir	Sat Sep 18 06:33:29 2010	(r49134)
+++ branches/stdhandle_meths/runtime/parrot/library/Test/Builder/Output.pir	Sat Sep 18 11:35:28 2010	(r49135)
@@ -57,18 +57,16 @@
 	.local pmc output
 	.local pmc diag_output
 
-        .include 'stdio.pasm'
-
 	output = args['output']
 	unless null output goto CHECK_ERROR_OUTPUT
         $P0 = getinterp
-        output = $P0.'stdhandle'(.PIO_STDOUT_FILENO)
+        output = $P0.'stdout_handle'()
 
   CHECK_ERROR_OUTPUT:
 	diag_output = args['diag_output']
 	unless null diag_output goto SET_OUTPUT
         $P0 = getinterp
-        diag_output = $P0.'stdhandle'(.PIO_STDOUT_FILENO)
+        diag_output = $P0.'stdout_handle'()
 
   SET_OUTPUT:
 	setattribute self, "output", output

Modified: branches/stdhandle_meths/t/op/string_cs.t
==============================================================================
--- branches/stdhandle_meths/t/op/string_cs.t	Sat Sep 18 06:33:29 2010	(r49134)
+++ branches/stdhandle_meths/t/op/string_cs.t	Sat Sep 18 11:35:28 2010	(r49135)
@@ -440,11 +440,10 @@
     skip( 'no ICU lib', 19 ) unless $PConfig{has_icu};
 
     pir_output_is( <<'CODE', <<OUTPUT, "literal encoding persistence - TT #468" );
-.include 'stdio.pasm'
 .sub main
     # set output encoding to normalize printed strings
     $P0 = getinterp
-    $P1 = $P0.'stdhandle'(.PIO_STDOUT_FILENO)
+    $P1 = $P0.'stdout_handle'()
     $P1.'encoding'('utf8')
 
     load_bytecode 't/op/testlib/test_strings.pbc'

Modified: branches/stdhandle_meths/t/op/stringu.t
==============================================================================
--- branches/stdhandle_meths/t/op/stringu.t	Sat Sep 18 06:33:29 2010	(r49134)
+++ branches/stdhandle_meths/t/op/stringu.t	Sat Sep 18 11:35:28 2010	(r49135)
@@ -24,10 +24,9 @@
 =cut
 
 pir_output_is( <<'CODE', <<OUTPUT, "angstrom" );
-.include 'stdio.pasm'
 .sub main :main
     $P0 = getinterp
-    $P1 = $P0.'stdhandle'(.PIO_STDOUT_FILENO)
+    $P1 = $P0.'stdout_handle'()
     $P1.'encoding'("utf8")
     chr $S0, 0x212B
     print $S0
@@ -39,10 +38,9 @@
 OUTPUT
 
 pir_output_is( <<'CODE', <<OUTPUT, "escaped angstrom" );
-.include 'stdio.pasm'
 .sub main :main
     $P0 = getinterp
-    $P1 = $P0.'stdhandle'(.PIO_STDOUT_FILENO)
+    $P1 = $P0.'stdout_handle'()
     $P1.'encoding'("utf8")
     set $S0, unicode:"\x{212b}"
     print $S0
@@ -54,10 +52,9 @@
 OUTPUT
 
 pir_output_is( <<'CODE', <<OUTPUT, "escaped angstrom 2" );
-.include 'stdio.pasm'
 .sub main :main
     $P0 = getinterp
-    $P1 = $P0.'stdhandle'(.PIO_STDOUT_FILENO)
+    $P1 = $P0.'stdout_handle'()
     $P1.'encoding'("utf8")
     set $S0, unicode:"aaaaaa\x{212b}"
     print $S0
@@ -69,10 +66,9 @@
 OUTPUT
 
 pir_output_is( <<'CODE', <<OUTPUT, "escaped angstrom 3" );
-.include 'stdio.pasm'
 .sub main :main
     $P0 = getinterp
-    $P1 = $P0.'stdhandle'(.PIO_STDOUT_FILENO)
+    $P1 = $P0.'stdout_handle'()
     $P1.'encoding'("utf8")
     set $S0, unicode:"aaaaaa\x{212b}-aaaaaa"
     print $S0
@@ -84,10 +80,9 @@
 OUTPUT
 
 pir_output_is( <<'CODE', <<OUTPUT, 'escaped angstrom 3 \uhhhh' );
-.include 'stdio.pasm'
 .sub main :main
     $P0 = getinterp
-    $P1 = $P0.'stdhandle'(.PIO_STDOUT_FILENO)
+    $P1 = $P0.'stdout_handle'()
     $P1.'encoding'("utf8")
     set $S0, unicode:"aaaaaa\u212b-aaaaaa"
     print $S0
@@ -99,10 +94,9 @@
 OUTPUT
 
 pir_output_is( <<'CODE', <<OUTPUT, "MATHEMATICAL BOLD CAPITAL A" );
-.include 'stdio.pasm'
 .sub main :main
     $P0 = getinterp
-    $P1 = $P0.'stdhandle'(.PIO_STDOUT_FILENO)
+    $P1 = $P0.'stdout_handle'()
     $P1.'encoding'("utf8")
     set $S0, unicode:"aaaaaa\x{1d400}-aaaaaa"
     print $S0
@@ -114,10 +108,9 @@
 OUTPUT
 
 pir_output_is( <<'CODE', <<OUTPUT, 'MATHEMATICAL BOLD CAPITAL A \U' );
-.include 'stdio.pasm'
 .sub main :main
     $P0 = getinterp
-    $P1 = $P0.'stdhandle'(.PIO_STDOUT_FILENO)
+    $P1 = $P0.'stdout_handle'()
     $P1.'encoding'("utf8")
     set $S0, unicode:"aaaaaa\U0001d400-aaaaaa"
     print $S0
@@ -129,10 +122,9 @@
 OUTPUT
 
 pir_output_is( <<'CODE', <<OUTPUT, "two upscales" );
-.include 'stdio.pasm'
 .sub main :main
     $P0 = getinterp
-    $P1 = $P0.'stdhandle'(.PIO_STDOUT_FILENO)
+    $P1 = $P0.'stdout_handle'()
     $P1.'encoding'("utf8")
     set $S0, unicode:"aaaaaa\x{212b}-bbbbbb\x{1d400}-cccccc"
     print $S0
@@ -148,10 +140,9 @@
 OUTPUT
 
 pir_output_is( <<'CODE', <<OUTPUT, "two upscales - don't downscale" );
-.include 'stdio.pasm'
 .sub main :main
     $P0 = getinterp
-    $P1 = $P0.'stdhandle'(.PIO_STDOUT_FILENO)
+    $P1 = $P0.'stdout_handle'()
     $P1.'encoding'("utf8")
     set $S0, unicode:"aaaaaa\x{1d400}-bbbbbb\x{212b}-cccccc"
     print $S0
@@ -167,10 +158,9 @@
 OUTPUT
 
 pir_output_is( <<'CODE', <<OUTPUT, '\cX, \ooo' );
-.include 'stdio.pasm'
 .sub main :main
     $P0 = getinterp
-    $P1 = $P0.'stdhandle'(.PIO_STDOUT_FILENO)
+    $P1 = $P0.'stdout_handle'()
     $P1.'encoding'("utf8")
     set $S0, "ok 1\cJ"
     print $S0

Modified: branches/stdhandle_meths/t/pmc/freeze.t
==============================================================================
--- branches/stdhandle_meths/t/pmc/freeze.t	Sat Sep 18 06:33:29 2010	(r49134)
+++ branches/stdhandle_meths/t/pmc/freeze.t	Sat Sep 18 11:35:28 2010	(r49135)
@@ -381,9 +381,8 @@
     $P0.'open'(fpmc, 'r')
     if $P0 goto ok1
 
-    .include 'stdio.pasm'
     $P0 = getinterp
-    $P1 = $P0.'stdhandle'(.PIO_STDERR_FILENO)
+    $P1 = $P0.'stderr_handle'()
     $P1.'print'("couldn't open fpmc for reading")
     exit 1
 
@@ -452,9 +451,8 @@
     $P0.'open'(fpmc, 'r')
     if $P0 goto ok1
 
-    .include 'stdio.pasm'
     $P0 = getinterp
-    $P1 = $P0.'stdhandle'(.PIO_STDERR_FILENO)
+    $P1 = $P0.'stderr_handle'()
     $P1.'print'("couldn't open fpmc for reading\n")
     exit 1
 
@@ -596,9 +594,8 @@
     $P0.'open'(fpmc, 'r')
     if $P0 goto ok1
 
-    .include 'stdio.pasm'
     $P0 = getinterp
-    $P1 = $P0.'stdhandle'(.PIO_STDERR_FILENO)
+    $P1 = $P0.'stderr_handle'()
     $P1.'print'("open failed\n")
 
 ok1:

Modified: branches/stdhandle_meths/t/pmc/io.t
==============================================================================
--- branches/stdhandle_meths/t/pmc/io.t	Sat Sep 18 06:33:29 2010	(r49134)
+++ branches/stdhandle_meths/t/pmc/io.t	Sat Sep 18 11:35:28 2010	(r49135)
@@ -384,21 +384,20 @@
 
 # TT #1178
 pir_output_is( <<'CODE', <<'OUT', 'standard file descriptors' );
-.include 'stdio.pasm'
 .sub main :main
     $P99 = getinterp
-    $P0  = $P99.'stdhandle'(.PIO_STDIN_FILENO)
+    $P0  = $P99.'stdin_handle'()
     $I0  = $P0.'get_fd'()
     # I0 is 0 on Unix and non-Null on stdio and win32
     print "ok 1\n"
 
-    $P1 = $P99.'stdhandle'(.PIO_STDOUT_FILENO)
+    $P1 = $P99.'stdout_handle'()
     $I1 = $P1.'get_fd'()
     if $I1, OK_2
     print "not "
 OK_2:
     say "ok 2"
-    $P2 = $P99.'stdhandle'(.PIO_STDERR_FILENO)
+    $P2 = $P99.'stderr_handle'()
     $I2 = $P2.'get_fd'()
     if $I2, OK_3
     print "not "
@@ -412,10 +411,9 @@
 OUT
 
 pir_output_is( <<'CODE', <<'OUTPUT', 'puts method' );
-.include 'stdio.pasm'
 .sub main :main
     $P0 = getinterp
-    $P2 = $P0.'stdhandle'(.PIO_STDOUT_FILENO)
+    $P2 = $P0.'stdout_handle'()
     can $I0, $P2, "puts"
     if $I0, ok1
     print "not "
@@ -429,13 +427,12 @@
 OUTPUT
 
 pir_output_is( <<'CODE', <<'OUTPUT', 'puts method - PIR' );
-.include 'stdio.pasm'
 .sub main :main
    .local string s
    s = "ok 2\n"
    .local pmc io
    $P0 = getinterp
-   io = $P0.'stdhandle'(.PIO_STDOUT_FILENO)
+   io = $P0.'stdout_handle'()
    $I0 = can io, "puts"
    if $I0 goto ok1
    print "not "
@@ -449,11 +446,9 @@
 OUTPUT
 
 pasm_output_is( <<'CODE', <<'OUTPUT', 'callmethod puts' );
-.include 'stdio.pasm'
     getinterp P0                 # invocant
-    set I0, .PIO_STDERR_FILENO   # 1st argument
-    set_args "0,0", P0, I0
-    callmethodcc P0, "stdhandle"
+    set_args "0", P0
+    callmethodcc P0, "stderr_handle"
     get_results "0", P2          # STDERR
 
     set S0, "puts"               # method

Modified: branches/stdhandle_meths/tools/dev/nci_thunk_gen.pir
==============================================================================
--- branches/stdhandle_meths/tools/dev/nci_thunk_gen.pir	Sat Sep 18 06:33:29 2010	(r49134)
+++ branches/stdhandle_meths/tools/dev/nci_thunk_gen.pir	Sat Sep 18 11:35:28 2010	(r49135)
@@ -48,7 +48,6 @@
     $P0 = new ['FileHandle']
     $P0.'open'($S0, 'w')
     $P1 = getinterp
-    .include 'stdio.pasm'
     $P1.'stdout_handle'($P0)
 
     if targ == 'head'          goto get_targ
@@ -719,7 +718,6 @@
 .sub 'read_sigs'
     .local pmc stdin, seen, sigs
     $P0 = getinterp
-    .include 'stdio.pasm'
     stdin = $P0.'stdin_handle'()
     seen  = new ['Hash']
     sigs  = new ['ResizablePMCArray']
@@ -748,7 +746,6 @@
 Ignored signature '%s' on line %d (previously seen on line %d)
 ERROR
                 $P0 = getinterp
-                .include 'stdio.pasm'
                 $P1 = $P0.'stderr_handle'()
                 $P1.'print'($S0)
             end_dup_warn:

Modified: branches/stdhandle_meths/tools/dev/parrot-config.pir
==============================================================================
--- branches/stdhandle_meths/tools/dev/parrot-config.pir	Sat Sep 18 06:33:29 2010	(r49134)
+++ branches/stdhandle_meths/tools/dev/parrot-config.pir	Sat Sep 18 11:35:28 2010	(r49135)
@@ -89,8 +89,7 @@
 usage:
     $S0 = argv[0]
     $P0 = getinterp
-    .include 'stdio.pasm'
-    $P1 = $P0.'stdhandle'(.PIO_STDERR_FILENO)
+    $P1 = $P0.'stderr_handle'()
     $P1.'print'($S0)
     $P1.'print'(" [ <config-key> [ <config-key> ... ] | --dump | --help ]\n")
     exit 1


More information about the parrot-commits mailing list