Browse Source

Modelverse can now also output "None" in case of errors

Yentl Van Tendeloo 8 years ago
parent
commit
d3635a8b57

File diff suppressed because it is too large
+ 141109 - 142177
bootstrap/bootstrap.m


+ 0 - 3
bootstrap/bootstrap.py

@@ -107,13 +107,10 @@ def bootstrap():
     include "user_manager.alh"
 
     Void function __main():
-    \tlog("In __main")
     \tElement root
     \troot = read_root()
     \troot = root["__hierarchy"]["objects"]
-    \tlog("Call exec")
     \texec(root["bootstrap/user_manager.alc"])
-    \tlog("Called exec")
     \tuser_management()
     '''
 

+ 1 - 1
bootstrap/compilation_manager.alc

@@ -52,7 +52,7 @@ Void function compilation_manager():
 		if (dict_in(root, object_name)):
 			output(root[object_name]["hash_md5"])
 		else:
-			output(create_node())
+			output(0)
 	else:
 		log("Failed to understand command")
 

+ 1 - 4
bootstrap/primitives.alc

@@ -102,10 +102,7 @@ Element function exec(first_instr : Element):
 	dict_add(n, "body", exec_if)
 	dict_add(exec_if, "next", exec_return)
 
-	log("Set instruction to " + cast_e2s(first_instr))
-	n()
-	log("DONE")
-	return n!
+	return n()!
 
 Boolean function string_startswith(a: String, b: String):
 	Integer i

+ 3 - 0
hybrid_server/classes/mvkcontroller.xml

@@ -151,6 +151,9 @@
                                         if self.mvk.success:
                                             self.destination = self.output_queue[user].pop(0)
                                             self.value = self.mvk.returnvalue
+                                            print("Send value1: " + str(self.value))
+                                            print("Send value2: " + str(self.value))
+                                            print("Send value3: " + str(self.value))
                                             self.all_failed = False
 
                             else:

+ 1 - 1
kernel/modelverse_kernel/main.py

@@ -151,7 +151,7 @@ class ModelverseKernel(object):
         next_output, rv =   yield [("RD", [first_output, "next"]),
                                    ("RD", [first_output, "value"]),
                                   ]
-        if rv is None:
+        if next_output is None:
             self.success = False
             self.returnvalue = None
         else: