[Swift-commit] r6614 - in branches/faster: . src src/org/griphyn/vdl/engine tests/language-behaviour/arrays

hategan at ci.uchicago.edu hategan at ci.uchicago.edu
Mon Jul 8 01:15:21 CDT 2013


Author: hategan
Date: 2013-07-08 01:15:10 -0500 (Mon, 08 Jul 2013)
New Revision: 6614

Added:
   branches/faster/tests/language-behaviour/arrays/210-closing-if-full-xor-partial.swift
Modified:
   branches/faster/
   branches/faster/src/
   branches/faster/src/org/griphyn/vdl/engine/VariableScope.java
Log:
merged 6255 from trunk


Property changes on: branches/faster
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/release-0.93:4761-5122
/trunk:6172,6177,6182,6189-6190,6202-6203,6206-6208,6215-6223,6231-6241
   + /branches/release-0.93:4761-5122
/trunk:6172,6177,6182,6189-6190,6202-6203,6206-6208,6215-6223,6231-6241,6255


Property changes on: branches/faster/src
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/release-0.94/src:6387
/trunk/src:6214
   + /branches/release-0.94/src:6387
/trunk/src:6214,6255

Modified: branches/faster/src/org/griphyn/vdl/engine/VariableScope.java
===================================================================
--- branches/faster/src/org/griphyn/vdl/engine/VariableScope.java	2013-07-08 06:01:39 UTC (rev 6613)
+++ branches/faster/src/org/griphyn/vdl/engine/VariableScope.java	2013-07-08 06:15:10 UTC (rev 6614)
@@ -654,6 +654,9 @@
 	}
 			
 	private void setPreClose(String name, int count) {
+	    if (inhibitClosing != null && inhibitClosing.contains(name)) {
+	        return;
+	    }
 	    setCount("preClose", name, count, 
 	        new RefCountSetter<StringTemplate>() {
 	            @Override
@@ -1039,7 +1042,8 @@
 		}
 		presentStatementPostStatements.clear();
 		outputs.clear();
-		inhibitClosing = null;
+		// Cannot set inhibitClosing to null here, since
+		// it may break then/else linked closing. See bug 927
 	}
 
 	private String join(List<String> l) {

Copied: branches/faster/tests/language-behaviour/arrays/210-closing-if-full-xor-partial.swift (from rev 6255, trunk/tests/language-behaviour/arrays/210-closing-if-full-xor-partial.swift)
===================================================================
--- branches/faster/tests/language-behaviour/arrays/210-closing-if-full-xor-partial.swift	                        (rev 0)
+++ branches/faster/tests/language-behaviour/arrays/210-closing-if-full-xor-partial.swift	2013-07-08 06:15:10 UTC (rev 6614)
@@ -0,0 +1,22 @@
+type file;
+
+app (file o) echo ()
+{
+   echo "foo.txt" stdout=@o;
+}
+
+(file fileList[]) createFileArray() {
+  foreach i in [1:5] {
+     fileList[i]=echo();
+  }
+}
+
+file myFileArray[];
+
+
+
+ if (1 == 1) {
+   myFileArray = createFileArray();
+ } else {
+   myFileArray[0] = echo();
+}
\ No newline at end of file




More information about the Swift-commit mailing list