Created
January 27, 2012 16:32
-
-
Save paulp/1689641 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def initializeFromClassRep(owner: Symbol, classRep: ClassRep) { | |
val useSource = classRep match { | |
case DualClassRep(_, _) => platform needCompile classRep | |
case SourceRep(_) => true | |
case BinaryRep(_) => false | |
case _ => println("nothing") ; return | |
} | |
vinform("[%s] %s %s".format( | |
if (useSource) "src" else "bin", owner, classRep)) | |
val newLoader = ( | |
if (useSource) new global.loaders.SourcefileLoader(classRep.source) | |
else platform.newClassLoader(classRep.binary) | |
) | |
global.loaders.enterClassAndModule(owner, classRep.className, newLoader) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment