summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/symtab/StdNames.scala7
-rw-r--r--src/compiler/scala/tools/nsc/symtab/clr/CLRTypes.scala19
2 files changed, 16 insertions, 10 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/StdNames.scala b/src/compiler/scala/tools/nsc/symtab/StdNames.scala
index 9caa664097..6b700d2f36 100644
--- a/src/compiler/scala/tools/nsc/symtab/StdNames.scala
+++ b/src/compiler/scala/tools/nsc/symtab/StdNames.scala
@@ -489,8 +489,11 @@ trait StdNames {
final val Code = nme.NOSYMBOL
}
- val sn: SymbolNames =
- if (forMSIL) new MSILNames
+ private var sn0 : SymbolNames = _
+ def sn: SymbolNames = {
+ if (sn0 == null) sn0 = if (forMSIL) new MSILNames
else if (forCLDC) new CLDCNames
else new J2SENames
+ sn0
+ }
}
diff --git a/src/compiler/scala/tools/nsc/symtab/clr/CLRTypes.scala b/src/compiler/scala/tools/nsc/symtab/clr/CLRTypes.scala
index fd0cc1f9c3..30859fb855 100644
--- a/src/compiler/scala/tools/nsc/symtab/clr/CLRTypes.scala
+++ b/src/compiler/scala/tools/nsc/symtab/clr/CLRTypes.scala
@@ -64,11 +64,12 @@ abstract class CLRTypes {
private var alltypes: Array[Type] = _
def init() = try { // initialize
-
+/*
val assems = new StringTokenizer(global.settings.assemrefs.value, File.pathSeparator)
while (assems.hasMoreTokens()) {
assemrefs += new File(assems.nextToken())
}
+ */
val mscorlib = findAssembly("mscorlib.dll")
Type.initMSCORLIB(mscorlib)
@@ -123,7 +124,7 @@ abstract class CLRTypes {
catch {
case e: RuntimeException =>
Console.println(e.getMessage)
- exit(1)
+ // no bloody exits! exit(1)
}
//##########################################################################
@@ -152,22 +153,24 @@ abstract class CLRTypes {
private var assemblies: ListBuffer[Assembly] = new ListBuffer()
// a set of all directories and assembly files
- private var assemrefs: Set[File] = new HashSet()
+ //private var assemrefs: Set[File] = new HashSet()
+
+ //def assembly(file : File) = assemrefs += file
/** Load the assembly with the given name
*/
private def findAssembly(name: String): Assembly = {
// see if the assembly is referenced directly
- for (file <- assemrefs.elements if file.getName() == name) {
+ for (file <- global.assemrefs.elements if file.getName() == name) {
val assem = Assembly.LoadFrom(file.getPath())
if (assem != null) {
- assemrefs -= file
+ global.assemrefs -= file
assemblies += assem
return assem
}
}
// look in directories specified with the '-r' option
- for (dir <- assemrefs.elements if dir.isDirectory()) {
+ for (dir <- global.assemrefs.elements if dir.isDirectory()) {
val file = new File(dir, name)
if (file.exists()) {
val assem = Assembly.LoadFrom(file.getPath())
@@ -193,7 +196,7 @@ abstract class CLRTypes {
/** Load the rest of the assemblies specified with the '-r' option
*/
private def findAllAssemblies() {
- for (file <- assemrefs.elements) {
+ for (file <- global.assemrefs.elements) {
if (file.isFile()) {
//System.out.println("Loading assembly " + file)
val assem = Assembly.LoadFrom(file.getPath())
@@ -202,7 +205,7 @@ abstract class CLRTypes {
}
}
}
- assemrefs.clear
+ global.assemrefs.clear
}
//##########################################################################