Merge branch 'charm' of charmgit:charm into charm
authorAaron Becker <akbecker@gmail.com>
Mon, 14 Jun 2010 21:39:04 +0000 (16:39 -0500)
committerAaron Becker <akbecker@gmail.com>
Mon, 14 Jun 2010 21:39:04 +0000 (16:39 -0500)
Conflicts:
src/langs/charj/src/charj/translator/ClassSymbol.java
src/langs/charj/src/charj/translator/Translator.java

1  2 
src/langs/charj/src/charj/translator/CharjSemantics.g
src/langs/charj/src/charj/translator/ClassSymbol.java
src/langs/charj/src/charj/translator/Translator.java

index 30226d218de0ac5505535eb5ff4e050b8238f842,e4c727df5e46617f96700f839eac96cf705921e1..845985a198ac6d5c08ec5828b562f1a994f92e15
@@@ -44,7 -50,8 +50,9 @@@ public class ClassSymbol extends Symbol
          this(symtab, name);
          this.superClass = superClass;
          this.scope = scope;
 +        this.type = this;
+       this.initializers = new ArrayList<CharjAST>();
+       constructor = null;
  
          // manually add automatic class methods and symbols here
          this.includes.add("charm++.h");
index e56251611791b624859af26918361a0a34da1a8a,2fc3a67360ccfbef63b84d4e81951496523b0621..f33ec197fc8c63c890a30cc7c179824dc92aa12d
@@@ -97,14 -97,15 +97,16 @@@ public class Translator 
          if (m_printAST) printAST("Before PreSemantics Pass", "before_presem.html");
          preSemanticPass();
          if (m_printAST) printAST("Before Semantic Pass", "before_sem.html");
-         semanticPass();
 -      ClassSymbol sem = semanticPass();
 -      modifyNodes(sem);
 -        //m_symtab = new SymbolTable(this);
 -        //m_nodes.reset();
 -        //SymbolDefiner definer = new SymbolDefiner(m_nodes, m_symtab);
 -        //definer.downup(m_ast);
 -        //m_nodes.reset();
 -        //SymbolResolver resolver = new SymbolResolver(m_nodes, m_symtab);
 -        //resolver.downup(m_ast);
++        // FIXME: no longer guaranteed one class per file, go through each type instead.
++      //ClassSymbol sem = semanticPass();
++      //modifyNodes(sem);
 +        m_symtab = new SymbolTable(this);
 +        m_nodes.reset();
 +        SymbolDefiner definer = new SymbolDefiner(m_nodes, m_symtab);
 +        definer.downup(m_ast);
 +        m_nodes.reset();
 +        SymbolResolver resolver = new SymbolResolver(m_nodes, m_symtab);
 +        resolver.downup(m_ast);
          if (m_printAST) printAST("After Semantic Pass", "after_sem.html");
          postSemanticPass();
          if (m_printAST) printAST("After PostSemantics Pass", "after_postsem.html");