summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSean McDirmid <sean.mcdirmid@gmail.com>2007-12-24 14:18:46 +0000
committerSean McDirmid <sean.mcdirmid@gmail.com>2007-12-24 14:18:46 +0000
commitc84f9f9226196731694182f22e79d6fd3b3374ee (patch)
treec37ea7e45eb1f82c1ce33ca73969b43841518407 /src
parentcc4c5f64d1db7a27f9c38bfb1bbf2e85eec0a12c (diff)
downloadscala-c84f9f9226196731694182f22e79d6fd3b3374ee.tar.gz
scala-c84f9f9226196731694182f22e79d6fd3b3374ee.tar.bz2
scala-c84f9f9226196731694182f22e79d6fd3b3374ee.zip
surgically fixing a broken build.
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/symtab/Scopes.scala16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/Scopes.scala b/src/compiler/scala/tools/nsc/symtab/Scopes.scala
index d262480f07..817cebff77 100644
--- a/src/compiler/scala/tools/nsc/symtab/Scopes.scala
+++ b/src/compiler/scala/tools/nsc/symtab/Scopes.scala
@@ -42,8 +42,10 @@ trait Scopes {
*/
def newScope(initElems: ScopeEntry): Scope = new NormalScope(initElems)
final def newScope: Scope = newScope(null: ScopeEntry)
- def newClassScope = newScope // for use in ClassInfoType creation
+ def newClassScope(clazz : Symbol) = newScope // for use in ClassInfoType creation
def newTempScope = newScope(null : ScopeEntry)
+ def scopeFor( tree : Tree) : Scope = newScope
+ def scopeFor(old : Scope, tree : Tree) : Scope = newScope(old)
final def newScope(base: Scope) : Scope = newScope(base.elems)
final def newScope(decls: List[Symbol]) : Scope = {
@@ -52,6 +54,9 @@ trait Scopes {
ret
}
def newThrowAwayScope(decls : List[Symbol]) : Scope = newScope(decls)
+ // for symbols that don't exist in scopes!
+ def recycle(sym : Symbol) : Symbol = sym
+ def newLocalDummy(clazz : Symbol, pos : util.Position) = clazz.newLocalDummy(pos)
private class NormalScope(initElems: ScopeEntry) extends Scope(initElems)
@@ -107,6 +112,13 @@ trait Scopes {
this.toList.foreach(sym => clone.enter(sym))
clone
}
+ /* clear the contents of this scope */
+ def clear = {
+ elems = null
+ elemsCache = null
+ hashtable = null
+ }
+
/** is the scope empty? */
def isEmpty: Boolean = elems eq null
@@ -295,6 +307,8 @@ trait Scopes {
/** Return the nesting level of this scope, i.e. the number of times this scope
* was nested in another */
def nestingLevel = nestinglevel
+
+ def invalidate(name : Name) = {}
}
/** The empty scope (immutable).