diff nworker_c.rhope @ 120:cd25171e1bb2

Use List for Subsets instead of a Dictionary for performance reasons. Fix issue with List literals. Compiled compiler is now self-hosting.
author Mike Pavone <pavone@retrodev.com>
date Thu, 21 Oct 2010 23:55:15 -0400
parents b3f56e1d54a0
children 1af91ceaaf49
line wrap: on
line diff
--- a/nworker_c.rhope	Mon Oct 18 00:50:18 2010 -0400
+++ b/nworker_c.rhope	Thu Oct 21 23:55:15 2010 -0400
@@ -11,12 +11,12 @@
 
 AndSet[:out]
 {
-	out <- [[[Build[Condition Set()]]Variables <<[Dictionary[]]]Subsets <<[Dictionary[]]]Condition Type <<["And"]
+	out <- [[[Build[Condition Set()]]Variables <<[Dictionary[]]]Subsets <<[()]]Condition Type <<["And"]
 }
 
 OrSet[:out]
 {
-	out <- [[[Build[Condition Set()]]Variables <<[Dictionary[]]]Subsets <<[Dictionary[]]]Condition Type <<["Or"]
+	out <- [[[Build[Condition Set()]]Variables <<[Dictionary[]]]Subsets <<[()]]Condition Type <<["Or"]
 }
 
 To String@Condition Set[set:out]
@@ -35,13 +35,13 @@
 		If[[[set]Condition Type >>]=[[cond]Condition Type >>]]
 		{
 			out <- [[set]Variables <<[ Combine[[set]Variables >>, [cond]Variables >>] ]
-				]Subsets <<[ Combine[[set]Subsets >>, [cond]Subsets >>] ]
+				]Subsets <<[ Concatenate[[set]Subsets >>, [cond]Subsets >>] ]
 		}{
 			[cond]Empty?
 			{
 				[cond]Simple?
 				{ out <- [set]Variables <<[ Combine[[set]Variables >>, [cond]Variables >>] ] }
-				{ out <- [set]Subsets <<[ [[set]Subsets>>]Set[[cond]To String, cond] ] }
+				{ out <- [set]Subsets <<[ [[set]Subsets>>]Append[cond] ] }
 			}{
 				out <- set
 			}
@@ -1218,10 +1218,9 @@
 		{	
 			ifunc <- Fold[Set Output Type[?], Fold[Set Input Type[?], [program]Create Function[name,[worker]Inputs >>, [worker]Outputs >>, [worker]Convention >>], [worker]Input Types >>], [worker]Output Types >>]
 			
-			
+			groups <- [worker]Dependency Groups
 			
-			groups <- [worker]Dependency Groups
-			[groups]First
+			fgroup <- [groups]First
 			{
 				with conds <- [worker]Save Group Conditions[groups, ~]
 				final func <- [with conds]Compile Group[program,func,groups, ~]