summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorAleksandar Pokopec <aleksandar.prokopec@epfl.ch>2009-11-20 17:29:39 +0000
committerAleksandar Pokopec <aleksandar.prokopec@epfl.ch>2009-11-20 17:29:39 +0000
commita8759a4ec3cf6191166cec4af67ee890696d4421 (patch)
treee878394860c0f656d4a22cf10de61c09a13c3846 /src/compiler
parent346aff23bf186ab911e12c856ba837e50aa218b3 (diff)
downloadscala-a8759a4ec3cf6191166cec4af67ee890696d4421.tar.gz
scala-a8759a4ec3cf6191166cec4af67ee890696d4421.tar.bz2
scala-a8759a4ec3cf6191166cec4af67ee890696d4421.zip
Removed a couple of unneeded comments.
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/backend/icode/Members.scala4
-rw-r--r--src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala6
-rw-r--r--src/compiler/scala/tools/nsc/symtab/Definitions.scala8
-rw-r--r--src/compiler/scala/tools/nsc/transform/CleanUp.scala10
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala2
5 files changed, 15 insertions, 15 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/icode/Members.scala b/src/compiler/scala/tools/nsc/backend/icode/Members.scala
index 65616c9a1f..993ce62140 100644
--- a/src/compiler/scala/tools/nsc/backend/icode/Members.scala
+++ b/src/compiler/scala/tools/nsc/backend/icode/Members.scala
@@ -115,9 +115,9 @@ trait Members { self: ICodes =>
def lookupMethod(s: Name) = methods find (_.symbol.name == s)
/* determines whether or not this class contains a static ctor. */
- def containsStaticCtor: Boolean = methods.exists(_.isStaticCtor) // alex
+ def containsStaticCtor: Boolean = methods.exists(_.isStaticCtor)
/* returns this methods static ctor if it has one. */
- def lookupStaticCtor: Option[IMethod] = methods.find(_.isStaticCtor) // alex
+ def lookupStaticCtor: Option[IMethod] = methods.find(_.isStaticCtor)
}
/** Represent a field in ICode */
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala b/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala
index 15852b61d3..d420524fd6 100644
--- a/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala
+++ b/src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala
@@ -214,7 +214,7 @@ abstract class GenJVM extends SubComponent {
}
}
else {
- if (c.containsStaticCtor) addStaticInit(jclass, c.lookupStaticCtor) // alex - adds static ctors to class
+ if (c.containsStaticCtor) addStaticInit(jclass, c.lookupStaticCtor)
// it must be a top level class (name contains no $s)
def isCandidateForForwarders(sym: Symbol): Boolean =
@@ -559,7 +559,7 @@ abstract class GenJVM extends SubComponent {
}
def genMethod(m: IMethod) {
- if (m.isStaticCtor) return // alex - skip constructors marked as static, they were handled earlier
+ if (m.isStaticCtor) return
log("Generating method " + m.symbol.fullNameString)
method = m
@@ -672,7 +672,7 @@ abstract class GenJVM extends SubComponent {
jclass.getType())
}
- def addStaticInit(cls: JClass, mopt: Option[IMethod]) { // alex
+ def addStaticInit(cls: JClass, mopt: Option[IMethod]) {
import JAccessFlags._
val clinitMethod = cls.addNewMethod(ACC_PUBLIC | ACC_STATIC,
"<clinit>",
diff --git a/src/compiler/scala/tools/nsc/symtab/Definitions.scala b/src/compiler/scala/tools/nsc/symtab/Definitions.scala
index c8e85edd76..c65e206a0c 100644
--- a/src/compiler/scala/tools/nsc/symtab/Definitions.scala
+++ b/src/compiler/scala/tools/nsc/symtab/Definitions.scala
@@ -128,7 +128,7 @@ trait Definitions {
lazy val StringClass = getClass(sn.String)
lazy val ClassClass = getClass(sn.Class)
def Class_getMethod = getMember(ClassClass, nme.getMethod_)
- lazy val SymbolClass = getClass("scala.Symbol") // alex
+ lazy val SymbolClass = getClass("scala.Symbol")
// fundamental modules
lazy val PredefModule: Symbol = getModule("scala.Predef")
@@ -142,7 +142,7 @@ trait Definitions {
def Predef_conforms = getMember(PredefModule, nme.conforms)
lazy val ConsoleModule: Symbol = getModule("scala.Console")
lazy val ScalaRunTimeModule: Symbol = getModule("scala.runtime.ScalaRunTime")
- lazy val SymbolModule: Symbol = getModule("scala.Symbol") // alex
+ lazy val SymbolModule: Symbol = getModule("scala.Symbol")
def SeqFactory = getMember(ScalaRunTimeModule, nme.Seq)
def checkDefinedMethod = getMember(ScalaRunTimeModule, "checkDefined")
def isArrayMethod = getMember(ScalaRunTimeModule, "isArray")
@@ -248,8 +248,8 @@ trait Definitions {
def optionType(tp: Type) = typeRef(OptionClass.typeConstructor.prefix, OptionClass, List(tp))
def someType(tp: Type) = typeRef(SomeClass.typeConstructor.prefix, SomeClass, List(tp))
- def symbolType = typeRef(SymbolClass.typeConstructor.prefix, SymbolClass, List()) // alex
- def longType = typeRef(LongClass.typeConstructor.prefix, LongClass, List()) // alex
+ def symbolType = typeRef(SymbolClass.typeConstructor.prefix, SymbolClass, List())
+ def longType = typeRef(LongClass.typeConstructor.prefix, LongClass, List())
// Product, Tuple, Function
private def mkArityArray(name: String, arity: Int, countFrom: Int = 1) = {
diff --git a/src/compiler/scala/tools/nsc/transform/CleanUp.scala b/src/compiler/scala/tools/nsc/transform/CleanUp.scala
index 556f4d6de4..1806035596 100644
--- a/src/compiler/scala/tools/nsc/transform/CleanUp.scala
+++ b/src/compiler/scala/tools/nsc/transform/CleanUp.scala
@@ -28,7 +28,7 @@ abstract class CleanUp extends Transform with ast.TreeDSL {
private val newInits = new ListBuffer[Tree]
private val classConstantMeth = new HashMap[String, Symbol]
- private val symbolStaticFields = new HashMap[String, (Symbol, Tree, Tree)] // alex
+ private val symbolStaticFields = new HashMap[String, (Symbol, Tree, Tree)]
private var localTyper: analyzer.Typer = null
@@ -502,7 +502,7 @@ abstract class CleanUp extends Transform with ast.TreeDSL {
* constructor. */
case Template(parents, self, body) =>
localTyper = typer.atOwner(tree, currentClass)
- val transformedTemplate = if (!forMSIL) { // alex - assigned this to a val
+ val transformedTemplate = if (!forMSIL) {
classConstantMeth.clear
newDefs.clear
newInits.clear
@@ -526,7 +526,7 @@ abstract class CleanUp extends Transform with ast.TreeDSL {
treeCopy.Template(tree, parents, self, newBody)
}
else super.transform(tree)
- applySymbolFieldInitsToStaticCtor(transformedTemplate.asInstanceOf[Template]) // alex - postprocess to include static ctors
+ applySymbolFieldInitsToStaticCtor(transformedTemplate.asInstanceOf[Template]) // postprocess to include static ctors
case Literal(c) if (c.tag == ClassTag) && !forMSIL=>
val tpe = c.typeValue
@@ -603,7 +603,7 @@ abstract class CleanUp extends Transform with ast.TreeDSL {
* have little in common.
*/
case symapp @ Apply(Select(Select(a @ Ident(nme.scala_), b @ nme.Symbol), nme.apply),
- List(Literal(Constant(symname)))) => // alex
+ List(Literal(Constant(symname)))) =>
// add the symbol name to a map if it's not there already
val rhs = treeGen.mkCast(Apply(treeGen.scalaDot(nme.Symbol), List(Literal(Constant(symname)))), symbolType)
val (staticFieldSym, sfdef, sfinit) = getSymbolStaticField(symapp.pos, symname.asInstanceOf[String], rhs, symapp)
@@ -625,7 +625,7 @@ abstract class CleanUp extends Transform with ast.TreeDSL {
* If it doesn't exist, i.e. the symbol is encountered the first time,
* it creates a new static field definition and initalization and returns it.
*/
- private def getSymbolStaticField(pos: Position, symname: String, rhs: Tree, tree: Tree): (Symbol, Tree, Tree) = { // alex
+ private def getSymbolStaticField(pos: Position, symname: String, rhs: Tree, tree: Tree): (Symbol, Tree, Tree) = {
if (symbolStaticFields.contains(symname)) symbolStaticFields(symname)
else {
val freshname = unit.fresh.newName(pos, "symbol$")
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index 6347251a5e..ff57aabcb2 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -1733,7 +1733,7 @@ trait Typers { self: Analyzer =>
ddef.tpt.setType(tpt1.tpe)
val typedMods = removeAnnotations(ddef.mods)
var rhs1 =
- if (ddef.name == nme.CONSTRUCTOR && !ddef.symbol.hasFlag(STATIC)) { // alex - need this to make it possible to generate static ctors
+ if (ddef.name == nme.CONSTRUCTOR && !ddef.symbol.hasFlag(STATIC)) { // need this to make it possible to generate static ctors
if (!meth.isPrimaryConstructor &&
(!meth.owner.isClass ||
meth.owner.isModuleClass ||