Преглед изворни кода

Optimized model_split when no output models

Yentl Van Tendeloo пре 8 година
родитељ
комит
cc5386e3bd
1 измењених фајлова са 5 додато и 0 уклоњено
  1. 5 0
      bootstrap/model_management.alc

+ 5 - 0
bootstrap/model_management.alc

@@ -221,6 +221,11 @@ Element function model_join(models : Element, metamodel : Element, tracability_m
 	return new_model!
 	
 Element function model_split(merged_model : Element, models : Element, tracability : Boolean):
+	if (read_nr_out(models) == 0):
+		// No results needed, so stop immediately unless tracability is True
+		if (bool_not(tracability)):
+			return create_node()
+
 	Element result
 	Element metamodel
 	Element model_tuple