Quellcode durchsuchen

Disable GC for now to prevent bugs; fix some minor bugs

Yentl Van Tendeloo vor 7 Jahren
Ursprung
Commit
504af6abc7

+ 5 - 2
kernel/modelverse_kernel/main.py

@@ -226,8 +226,8 @@ class ModelverseKernel(object):
             node_value, = yield [("RV", [node])]
             if node_value is not None:
                 # There is a value to the node, so replicate the value
-                if isinstance(node_value, str):
-                    value = '"%s"' % node_value.replace('"', '\\"').replace('\t', '\\t').replace('\n', '\\n')
+                if isinstance(node_value, (str, unicode)):
+                    value = '"%s"' % node_value.replace('"', '\\"').replace("'", "\\'").replace('\t', '\\t').replace('\n', '\\n')
                 else:
                     value = str(node_value)
                 instruction = "constant_" + str(ModelverseKernel.counter)
@@ -248,6 +248,9 @@ class ModelverseKernel(object):
         elif inst_type["value"] == "declare":
             instruction = ""
 
+        elif inst_type["value"] == "global":
+            instruction = ""
+
         elif inst_type["value"] == "break":
             instruction = "  " * indent + "break\n"
 

+ 2 - 0
state/modelverse_state/main.py

@@ -372,12 +372,14 @@ class ModelverseState(object):
             self.to_delete.add(t)
 
     def garbage_collect(self):  
+        return
         while self.to_delete:
             t = self.to_delete.pop()
             if t in self.incoming and not self.incoming[t]:
                 self.delete_node(t)
 
     def purge(self):
+        return
         self.garbage_collect()
         values = set(self.edges)
         values.update(self.nodes)

+ 1 - 1
wrappers/modelverse_SCCD.py

@@ -1,7 +1,7 @@
 """
 Generated by Statechart compiler by Glenn De Jonghe, Joeri Exelmans, Simon Van Mierlo, and Yentl Van Tendeloo (for the inspiration)
 
-Date:   Tue Apr 10 14:43:31 2018
+Date:   Mon Apr 23 10:25:50 2018
 
 Model author: Yentl Van Tendeloo
 Model name:   MvK Server