diff python/ide.py @ 279:2ccd57b1d78c

Fix register allocator to do burn2 OK
author Windel Bouwman
date Sat, 12 Oct 2013 09:56:23 +0200
parents 046017431c6a
children 4496cae24d7f
line wrap: on
line diff
--- a/python/ide.py	Sun Sep 29 14:08:15 2013 +0200
+++ b/python/ide.py	Sat Oct 12 09:56:23 2013 +0200
@@ -282,15 +282,18 @@
         self.builderrors.setErrorList(self.diag.diags)
         ce.setErrors(self.diag.diags)
         self.astViewer.setAst(pkg)
+        c3.AstPrinter().printAst(pkg)
         self.logger.info('Done!')
 
     def buildFile(self):
         ce = self.activeMdiChild()
         if not ce:
             return
+        fn = ce.FileName
+        wd = os.path.dirname(fn)
         self.diag.clear()
         outs = outstream.TextOutputStream()
-        if not zcc.zcc(ce.Source, outs, self.diag):
+        if not zcc.zcc(ce.Source, outs, self.diag, pack_dir=wd):
             # Set errors:
             self.builderrors.setErrorList(self.diag.diags)
             ce.setErrors(self.diag.diags)
@@ -300,14 +303,17 @@
         ce = self.activeMdiChild()
         if not ce:
             return
+        fn = ce.FileName
+        wd = os.path.dirname(fn)
         self.diag.clear()
         outs = outstream.TextOutputStream()
-        if not zcc.zcc(ce.Source, outs, self.diag, do_optimize=True):
+        if not zcc.zcc(ce.Source, outs, self.diag, do_optimize=True, pack_dir=wd):
             # Set errors:
             self.builderrors.setErrorList(self.diag.diags)
             ce.setErrors(self.diag.diags)
             return
 
+        outs.dump()
         code_s = outs.getSection('code')
         self.debugInfo = code_s.debugInfos()
         if self.ctrlToolbar.device: