浏览代码

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 8 年之前
父节点
当前提交
3e3857d6cd
共有 4 个文件被更改,包括 4 次插入2 次删除
  1. 二进制
      bootstrap/bootstrap.m.gz
  2. 2 2
      bootstrap/bootstrap.py
  3. 二进制
      bootstrap/minimal.m.gz
  4. 2 0
      interface/HUTN/hutn_compiler/primitives_visitor.py

二进制
bootstrap/bootstrap.m.gz


+ 2 - 2
bootstrap/bootstrap.py

@@ -152,8 +152,8 @@ def bootstrap():
                 self.file_b.write(text)
 
     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)
                 # Create the root first
                 f.write("Node root()\n")

二进制
bootstrap/minimal.m.gz


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

@@ -16,6 +16,8 @@ class PrimitivesVisitor(Visitor):
 
     def debug(self, node, tree, msg=""):
         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)))
 
     def node(self):