From baf9a278a4fcf138c56b621c4674aac3c630c451 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Tue, 22 Mar 2005 16:15:28 +0000 Subject: *** empty log message *** --- sources/scala/tools/nsc/Global.scala | 12 ++++++++++++ .../scala/tools/nsc/symtab/classfile/ClassfileParser.scala | 9 +++++++++ 2 files changed, 21 insertions(+) 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._; -- cgit v1.2.3