[Swift-commit] r6441 - branches/faster/src/org/griphyn/vdl/karajan/lib/swiftscript

hategan at ci.uchicago.edu hategan at ci.uchicago.edu
Sat Apr 13 20:16:45 CDT 2013


Author: hategan
Date: 2013-04-13 20:16:44 -0500 (Sat, 13 Apr 2013)
New Revision: 6441

Modified:
   branches/faster/src/org/griphyn/vdl/karajan/lib/swiftscript/Misc.java
Log:
fix a bunch of functions

Modified: branches/faster/src/org/griphyn/vdl/karajan/lib/swiftscript/Misc.java
===================================================================
--- branches/faster/src/org/griphyn/vdl/karajan/lib/swiftscript/Misc.java	2013-04-14 01:16:17 UTC (rev 6440)
+++ branches/faster/src/org/griphyn/vdl/karajan/lib/swiftscript/Misc.java	2013-04-14 01:16:44 UTC (rev 6441)
@@ -32,7 +32,7 @@
 import org.globus.cog.karajan.analyzer.ChannelRef;
 import org.globus.cog.karajan.analyzer.Signature;
 import org.globus.cog.karajan.compiled.nodes.InternalFunction;
-import org.globus.cog.karajan.compiled.nodes.functions.AbstractFunction;
+import org.globus.cog.karajan.compiled.nodes.functions.AbstractSingleValuedFunction;
 import org.globus.cog.karajan.util.TypeUtil;
 import org.griphyn.vdl.karajan.lib.SwiftFunction;
 import org.griphyn.vdl.mapping.AbsFile;
@@ -128,7 +128,7 @@
         }
     }
 	
-	public static class StrCat extends AbstractFunction {
+	public static class StrCat extends AbstractSingleValuedFunction {
         private ChannelRef<AbstractDataNode> c_vargs;
 
         @Override
@@ -161,7 +161,7 @@
         }
 	}
 	
-	public static class Exists extends AbstractFunction {
+	public static class Exists extends AbstractSingleValuedFunction {
         private ArgRef<AbstractDataNode> file;
 
         @Override
@@ -190,7 +190,7 @@
         }
     }
 	
-	public static class StrCut extends AbstractFunction {
+	public static class StrCut extends AbstractSingleValuedFunction {
         private ArgRef<AbstractDataNode> input;
         private ArgRef<AbstractDataNode> pattern;
 
@@ -238,7 +238,7 @@
         }
 	}
 	
-	public static class StrStr extends AbstractFunction {
+	public static class StrStr extends AbstractSingleValuedFunction {
         private ArgRef<AbstractDataNode> input;
         private ArgRef<AbstractDataNode> pattern;
 
@@ -271,7 +271,7 @@
         }
     }
 	
-	public static class StrSplit extends AbstractFunction {
+	public static class StrSplit extends AbstractSingleValuedFunction {
         private ArgRef<AbstractDataNode> input;
         private ArgRef<AbstractDataNode> pattern;
 
@@ -318,7 +318,7 @@
 	 * @return DSHandle representing the resulting string
 	 * @throws ExecutionException
 	 */
-	public static class StrJoin extends AbstractFunction {
+	public static class StrJoin extends AbstractSingleValuedFunction {
         private ArgRef<AbstractDataNode> array;
         private ArgRef<AbstractDataNode> delim;
 
@@ -359,7 +359,7 @@
         }
     }
     
-	public static class Regexp extends AbstractFunction {
+	public static class Regexp extends AbstractSingleValuedFunction {
         private ArgRef<AbstractDataNode> input;
         private ArgRef<AbstractDataNode> pattern;
         private ArgRef<AbstractDataNode> transform;
@@ -412,7 +412,7 @@
         }
     }
 	
-	public static class ToInt extends AbstractFunction {
+	public static class ToInt extends AbstractSingleValuedFunction {
         private ArgRef<AbstractDataNode> str;
 
         @Override
@@ -437,7 +437,7 @@
         }
     }
 	
-	public static class ToFloat extends AbstractFunction {
+	public static class ToFloat extends AbstractSingleValuedFunction {
         private ArgRef<AbstractDataNode> str;
 
         @Override
@@ -476,7 +476,7 @@
 	/*
 	 * Takes in a float and formats to desired precision and returns a string
 	 */
-	public static class Format extends AbstractFunction {
+	public static class Format extends AbstractSingleValuedFunction {
         private ArgRef<AbstractDataNode> format;
         private ArgRef<AbstractDataNode> value;
 
@@ -508,7 +508,7 @@
 	/*
 	 * Takes in an int and pads zeros to the left and returns a string
 	 */
-	public static class Pad extends AbstractFunction {
+	public static class Pad extends AbstractSingleValuedFunction {
         private ArgRef<AbstractDataNode> size;
         private ArgRef<AbstractDataNode> value;
 
@@ -537,7 +537,7 @@
         }
     }
 	
-	public static class ToString extends AbstractFunction {
+	public static class ToString extends AbstractSingleValuedFunction {
         private ArgRef<AbstractDataNode> value;
 
         @Override
@@ -548,6 +548,7 @@
         @Override
         public Object function(Stack stack) {
             AbstractDataNode hvalue = this.value.getValue(stack);
+            hvalue.waitFor(this);
             
             StringBuilder sb = new StringBuilder();
             prettyPrint(sb, hvalue);
@@ -570,7 +571,7 @@
      * Good for debugging because array needs to be closed
      *   before the length is determined
      */
-	public static class Dirname extends AbstractFunction {
+	public static class Dirname extends AbstractSingleValuedFunction {
         private ArgRef<AbstractDataNode> file;
 
         @Override
@@ -596,7 +597,7 @@
         }
     }
 		
-	public static class Length extends AbstractFunction {
+	public static class Length extends AbstractSingleValuedFunction {
         private ArgRef<AbstractDataNode> array;
 
         @Override




More information about the Swift-commit mailing list