[svn:parrot] r47084 - trunk/runtime/parrot/library

fperrad at svn.parrot.org fperrad at svn.parrot.org
Fri May 28 07:43:36 UTC 2010


Author: fperrad
Date: Fri May 28 07:43:36 2010
New Revision: 47084
URL: https://trac.parrot.org/parrot/changeset/47084

Log:
[distutils] cleanup

Modified:
   trunk/runtime/parrot/library/distutils.pir
   trunk/runtime/parrot/library/osutils.pir

Modified: trunk/runtime/parrot/library/distutils.pir
==============================================================================
--- trunk/runtime/parrot/library/distutils.pir	Fri May 28 07:33:24 2010	(r47083)
+++ trunk/runtime/parrot/library/distutils.pir	Fri May 28 07:43:36 2010	(r47084)
@@ -3681,7 +3681,7 @@
 .end
 
 .sub 'get_timestamp' :anon
-    $P0 = new ['FileHandle']
+    $P0 = new 'FileHandle'
     $P0.'open'('date --rfc-2822', 'rp')
     $S0 = $P0.'readline'()
     $P0.'close'()
@@ -4484,7 +4484,7 @@
     system(cmd, verbose :named('verbose'), 1 :named('ignore_error'))
     unlink(srcname, verbose :named('verbose'))
 
-    $P0 = new ['FileHandle']
+    $P0 = new 'FileHandle'
     $P0.'open'(exename, 'rp')
     $S0 = $P0.'readall'()
     $P0.'close'()

Modified: trunk/runtime/parrot/library/osutils.pir
==============================================================================
--- trunk/runtime/parrot/library/osutils.pir	Fri May 28 07:33:24 2010	(r47083)
+++ trunk/runtime/parrot/library/osutils.pir	Fri May 28 07:43:36 2010	(r47084)
@@ -51,6 +51,10 @@
 .sub 'file_exists'
     .param string filename
     $I0 = stat filename, .STAT_EXISTS
+    print "file_exists "
+    print filename
+    print " "
+    say $I0
     .return ($I0)
 .end
 
@@ -66,12 +70,14 @@
     $S0 = depends
     .tailcall newer(target, $S0)
   L1:
+#    print "newer "
     $I0 = stat target, .STAT_EXISTS
     unless $I0 goto L2
     $I0 = stat target, .STAT_FILESIZE
     unless $I0 goto L2
     goto L3
   L2:
+#    say 0
     .return (0)
   L3:
     $I0 = stat target, .STAT_MODIFYTIME
@@ -82,25 +88,34 @@
     if $S0 == '' goto L4
     $I1 = stat $S0, .STAT_MODIFYTIME
     if $I1 < $I0 goto L4
+#    say 0
     .return (0)
   L5:
+#    say 1
     .return (1)
 .end
 
 .sub 'newer' :multi(string, string)
     .param string target
     .param string depend
+#    print "newer "
+#    print target
+#    print " "
+#    print depend
+#    print " "
     $I0 = stat target, .STAT_EXISTS
     unless $I0 goto L1
     $I0 = stat target, .STAT_FILESIZE
     unless $I0 goto L1
     goto L2
   L1:
+#    say 0
     .return (0)
   L2:
     $I1 = stat target, .STAT_MODIFYTIME
     $I2 = stat depend, .STAT_MODIFYTIME
     $I0 = $I1 > $I2
+#    say $I0
     .return ($I0)
 .end
 


More information about the parrot-commits mailing list