summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2005-03-22 16:15:28 +0000
committerMartin Odersky <odersky@gmail.com>2005-03-22 16:15:28 +0000
commitbaf9a278a4fcf138c56b621c4674aac3c630c451 (patch)
treea675d682e9a7ebbcf77c4d3616bbec62e374fae3
parent9e67e8eb2a4480d2761d2e08a87cea6b32a71fbb (diff)
downloadscala-baf9a278a4fcf138c56b621c4674aac3c630c451.tar.gz
scala-baf9a278a4fcf138c56b621c4674aac3c630c451.tar.bz2
scala-baf9a278a4fcf138c56b621c4674aac3c630c451.zip
*** empty log message ***
-rwxr-xr-xsources/scala/tools/nsc/Global.scala12
-rwxr-xr-xsources/scala/tools/nsc/symtab/classfile/ClassfileParser.scala9
2 files changed, 21 insertions, 0 deletions
diff --git a/sources/scala/tools/nsc/Global.scala b/sources/scala/tools/nsc/Global.scala
index aba47f7d89..605e162b1d 100755
--- a/sources/scala/tools/nsc/Global.scala
+++ b/sources/scala/tools/nsc/Global.scala
@@ -134,6 +134,18 @@ class Global(val settings: Settings, val reporter: Reporter) extends SymbolTable
val typeCheckPhase = new analyzer.TypeCheckPhase(namerPhase);
val picklePhase = new pickler.PicklePhase(typeCheckPhase);
+/*
+ object icode extends ICode {
+ val global: Global.this.type = Global.this
+ }
+ val codegenPhase = new icode.CodeGenPhase(erasurePhase)
+
+ abstract class CodeGenPhase(prev: Phase) extends StdPhase(prev) {
+ import global._;
+ ...
+
+ }
+*/
val terminalPhase = new StdPhase(picklePhase) {
def name = "terminal";
val global: Global.this.type = Global.this;
diff --git a/sources/scala/tools/nsc/symtab/classfile/ClassfileParser.scala b/sources/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
index 8554452376..569e9f6273 100755
--- a/sources/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
+++ b/sources/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
@@ -3,6 +3,15 @@
* @author Martin Odersky
*/
// $Id$
+/* Ideas to extend this to an icode reader:
+
+ 1. Parse classfile a second time, creating a hashmap `code' that associates method symbols with code.
+ 2. For every method symbol `meth' in the new scope:
+
+ new = oldclass.info.decl(meth.name).suchThat(old => old.tpe =:= meth.tpe)
+
+ code(new) = code(meth)
+*/
package scala.tools.nsc.symtab.classfile;
import scala.tools.util._;