Explorar el Código

Make the .gz file no longer update for each recompile: fix the time to 0 and remove references to the temporary files

Yentl Van Tendeloo hace 9 años
padre
commit
187381f414
Se han modificado 2 ficheros con 4 adiciones y 2 borrados
  1. 2 2
      bootstrap/bootstrap.py
  2. 2 0
      interface/HUTN/hutn_compiler/primitives_visitor.py

+ 2 - 2
bootstrap/bootstrap.py

@@ -152,8 +152,8 @@ def bootstrap():
                 self.file_b.write(text)
                 self.file_b.write(text)
 
 
     try:
     try:
-        with gzip.open("bootstrap/bootstrap.m.gz", "wb") as fa:
-            with gzip.open("bootstrap/minimal.m.gz", "wb") as fb:
+        with gzip.GzipFile("bootstrap/bootstrap.m.gz", "wb", mtime=0) as fa:
+            with gzip.GzipFile("bootstrap/minimal.m.gz", "wb", mtime=0) as fb:
                 f = Writer(fa, fb)
                 f = Writer(fa, fb)
                 # Create the root first
                 # Create the root first
                 f.write("Node root()\n")
                 f.write("Node root()\n")

+ 2 - 0
interface/HUTN/hutn_compiler/primitives_visitor.py

@@ -16,6 +16,8 @@ class PrimitivesVisitor(Visitor):
 
 
     def debug(self, node, tree, msg=""):
     def debug(self, node, tree, msg=""):
         if self.debug_symbols:
         if self.debug_symbols:
+            if ".alc" not in tree.get_reference_line():
+                self.debug_symbols = False
             self.dict(node, "__debug", self.value("[%s] %s" % (tree.get_reference_line(), msg)))
             self.dict(node, "__debug", self.value("[%s] %s" % (tree.get_reference_line(), msg)))
 
 
     def node(self):
     def node(self):