@@ -143,7 +143,7 @@ class DottyBackendInterface(outputDirectory: AbstractFile, val superCallsMap: Ma
143
143
val externalEqualsNumNum : Symbol = defn.BoxesRunTimeModule .requiredMethod(nme.equalsNumNum)
144
144
val externalEqualsNumChar : Symbol = NoSymbol // ctx.requiredMethod(BoxesRunTimeTypeRef, nme.equalsNumChar) // this method is private
145
145
val externalEqualsNumObject : Symbol = defn.BoxesRunTimeModule .requiredMethod(nme.equalsNumObject)
146
- val externalEquals : Symbol = defn.BoxesRunTimeClass .info.decl(nme.equals_).suchThat(toDenot(_) .info.firstParamTypes.size == 2 ).symbol
146
+ val externalEquals : Symbol = defn.BoxesRunTimeClass .info.decl(nme.equals_).suchThat(_ .info.firstParamTypes.size == 2 ).symbol
147
147
val MaxFunctionArity : Int = Definitions .MaxImplementedFunctionArity
148
148
val FunctionClass : Array [Symbol ] = defn.FunctionClassPerRun ()
149
149
val AbstractFunctionClass : Array [Symbol ] = defn.AbstractFunctionClassPerRun ()
@@ -169,9 +169,9 @@ class DottyBackendInterface(outputDirectory: AbstractFile, val superCallsMap: Ma
169
169
}
170
170
171
171
def isBox (sym : Symbol ): Boolean =
172
- Erasure .Boxing .isBox(sym) && sym.denot. owner != defn.UnitModuleClass
172
+ Erasure .Boxing .isBox(sym) && sym.owner != defn.UnitModuleClass
173
173
def isUnbox (sym : Symbol ): Boolean =
174
- Erasure .Boxing .isUnbox(sym) && sym.denot. owner != defn.UnitModuleClass
174
+ Erasure .Boxing .isUnbox(sym) && sym.owner != defn.UnitModuleClass
175
175
176
176
val primitives : Primitives = new Primitives {
177
177
val primitives = new DottyPrimitives (ctx)
@@ -256,24 +256,24 @@ class DottyBackendInterface(outputDirectory: AbstractFile, val superCallsMap: Ma
256
256
av.visitEnum(name, edesc, evalue)
257
257
}
258
258
case t : TypeApply if (t.fun.symbol == Predef_classOf ) =>
259
- av.visit(name, t.args.head.tpe.classSymbol.denot. info.toTypeKind(bcodeStore)(innerClasesStore).toASMType)
259
+ av.visit(name, t.args.head.tpe.classSymbol.info.toTypeKind(bcodeStore)(innerClasesStore).toASMType)
260
260
case t : tpd.Select =>
261
- if (t.symbol.denot. owner.is(Flags .Enum )) {
261
+ if (t.symbol.owner.is(Flags .Enum )) {
262
262
val edesc = innerClasesStore.typeDescriptor(t.tpe.asInstanceOf [bcodeStore.int.Type ]) // the class descriptor of the enumeration class.
263
263
val evalue = t.symbol.name.mangledString // value the actual enumeration value.
264
264
av.visitEnum(name, edesc, evalue)
265
265
} else {
266
- // println(i"not an enum: ${t.symbol} / ${t.symbol.denot. owner} / ${t.symbol.denot. owner.isTerm} / ${t.symbol.denot .owner.flags}")
267
- assert(toDenot( t.symbol) .name.is(DefaultGetterName ),
268
- s " ${toDenot( t.symbol) .name.debugString}" ) // this should be default getter. do not emmit.
266
+ // println(i"not an enum: ${t.symbol} / ${t.symbol.owner} / ${t.symbol.owner.isTerm} / ${t.symbol.owner.flags}")
267
+ assert(t.symbol.name.is(DefaultGetterName ),
268
+ s " ${t.symbol.name.debugString}" ) // this should be default getter. do not emmit.
269
269
}
270
270
case t : SeqLiteral =>
271
271
val arrAnnotV : AnnotationVisitor = av.visitArray(name)
272
272
for (arg <- t.elems) { emitArgument(arrAnnotV, null , arg, bcodeStore)(innerClasesStore) }
273
273
arrAnnotV.visitEnd()
274
274
275
275
case Apply (fun, args) if fun.symbol == defn.ArrayClass .primaryConstructor ||
276
- toDenot( fun.symbol) .owner == defn.ArrayClass .linkedClass && fun.symbol.name == nme_apply =>
276
+ fun.symbol.owner == defn.ArrayClass .linkedClass && fun.symbol.name == nme_apply =>
277
277
val arrAnnotV : AnnotationVisitor = av.visitArray(name)
278
278
279
279
var actualArgs = if (fun.tpe.isImplicitMethod) {
@@ -304,7 +304,7 @@ class DottyBackendInterface(outputDirectory: AbstractFile, val superCallsMap: Ma
304
304
} // for the lazy val in ScalaSigBytes to be GC'ed, the invoker of emitAnnotations() should hold the ScalaSigBytes in a method-local var that doesn't escape.
305
305
*/
306
306
case t @ Apply (constr, args) if t.tpe.derivesFrom(JavaAnnotationClass ) =>
307
- val typ = t.tpe.classSymbol.denot. info
307
+ val typ = t.tpe.classSymbol.info
308
308
val assocs = assocsFromApply(t)
309
309
val desc = innerClasesStore.typeDescriptor(typ.asInstanceOf [bcodeStore.int.Type ]) // the class descriptor of the nested annotation class
310
310
val nestedVisitor = av.visitAnnotation(name, desc)
@@ -521,7 +521,7 @@ class DottyBackendInterface(outputDirectory: AbstractFile, val superCallsMap: Ma
521
521
522
522
if (! valid) {
523
523
ctx.error(
524
- i """ |compiler bug: created invalid generic signature for $sym in ${sym.denot. owner.showFullName}
524
+ i """ |compiler bug: created invalid generic signature for $sym in ${sym.owner.showFullName}
525
525
|signature: $sig
526
526
|if this is reproducible, please report bug at https://github.com/lampepfl/dotty/issues
527
527
""" .trim, sym.pos)
@@ -540,7 +540,7 @@ class DottyBackendInterface(outputDirectory: AbstractFile, val superCallsMap: Ma
540
540
def getGenericSignature (sym : Symbol , owner : Symbol ): String = {
541
541
ctx.atPhase(ctx.erasurePhase) { implicit ctx =>
542
542
val memberTpe =
543
- if (sym.is(Flags .Method )) sym.denot. info
543
+ if (sym.is(Flags .Method )) sym.info
544
544
else owner.denot.thisType.memberInfo(sym)
545
545
getGenericSignature(sym, owner, memberTpe).orNull
546
546
}
@@ -555,14 +555,14 @@ class DottyBackendInterface(outputDirectory: AbstractFile, val superCallsMap: Ma
555
555
556
556
val memberTpe = ctx.atPhase(ctx.erasurePhase) { implicit ctx => moduleClass.denot.thisType.memberInfo(sym) }
557
557
val erasedMemberType = TypeErasure .erasure(memberTpe)
558
- if (erasedMemberType =:= sym.denot. info)
558
+ if (erasedMemberType =:= sym.info)
559
559
getGenericSignature(sym, moduleClass, memberTpe).orNull
560
560
else null
561
561
}
562
562
563
563
private def getGenericSignature (sym : Symbol , owner : Symbol , memberTpe : Type )(implicit ctx : Context ): Option [String ] =
564
564
if (needsGenericSignature(sym)) {
565
- val erasedTypeSym = sym.denot. info.typeSymbol
565
+ val erasedTypeSym = sym.info.typeSymbol
566
566
if (erasedTypeSym.isPrimitiveValueClass) {
567
567
None
568
568
} else {
@@ -655,7 +655,7 @@ class DottyBackendInterface(outputDirectory: AbstractFile, val superCallsMap: Ma
655
655
def fullName (sep : Char ): String = sym.showFullName
656
656
def fullName : String = sym.showFullName
657
657
def simpleName : Name = sym.name
658
- def javaSimpleName : String = toDenot( sym) .name.mangledString // addModuleSuffix(simpleName.dropLocal)
658
+ def javaSimpleName : String = sym.name.mangledString // addModuleSuffix(simpleName.dropLocal)
659
659
def javaBinaryName : String = javaClassName.replace('.' , '/' ) // TODO: can we make this a string? addModuleSuffix(fullNameInternal('/'))
660
660
def javaClassName : String = toDenot(sym).fullName.mangledString // addModuleSuffix(fullNameInternal('.')).toString
661
661
def name : Name = sym.name
@@ -665,8 +665,8 @@ class DottyBackendInterface(outputDirectory: AbstractFile, val superCallsMap: Ma
665
665
}
666
666
667
667
// types
668
- def info : Type = toDenot( sym) .info
669
- def tpe : Type = toDenot( sym) .info // todo whats the differentce between tpe and info?
668
+ def info : Type = sym.info
669
+ def tpe : Type = sym.info // todo whats the differentce between tpe and info?
670
670
def thisType : Type = toDenot(sym).thisType
671
671
672
672
// tests
@@ -746,7 +746,7 @@ class DottyBackendInterface(outputDirectory: AbstractFile, val superCallsMap: Ma
746
746
747
747
748
748
// navigation
749
- def owner : Symbol = toDenot( sym) .owner
749
+ def owner : Symbol = sym.owner
750
750
def rawowner : Symbol = {
751
751
originalOwner
752
752
}
@@ -760,7 +760,7 @@ class DottyBackendInterface(outputDirectory: AbstractFile, val superCallsMap: Ma
760
760
val r = toDenot(sym)(shiftedContext).maybeOwner.lexicallyEnclosingClass(shiftedContext)
761
761
r
762
762
} else NoSymbol
763
- def parentSymbols : List [Symbol ] = toDenot( sym) .info.parents.map(_.typeSymbol)
763
+ def parentSymbols : List [Symbol ] = sym.info.parents.map(_.typeSymbol)
764
764
def superClass : Symbol = {
765
765
val t = toDenot(sym).asClass.superClass
766
766
if (t.exists) t
@@ -803,7 +803,7 @@ class DottyBackendInterface(outputDirectory: AbstractFile, val superCallsMap: Ma
803
803
private def definedClasses (phase : Phase ) =
804
804
if (sym.isDefinedInCurrentRun)
805
805
ctx.atPhase(phase) { implicit ctx =>
806
- toDenot( sym) .info.decls.filter(_.isClass)
806
+ sym.info.decls.filter(_.isClass)
807
807
}
808
808
else Nil
809
809
@@ -815,10 +815,10 @@ class DottyBackendInterface(outputDirectory: AbstractFile, val superCallsMap: Ma
815
815
else Nil
816
816
}
817
817
def fieldSymbols : List [Symbol ] = {
818
- toDenot( sym) .info.decls.filter(p => p.isTerm && ! p.is(Flags .Method ))
818
+ sym.info.decls.filter(p => p.isTerm && ! p.is(Flags .Method ))
819
819
}
820
820
def methodSymbols : List [Symbol ] =
821
- for (f <- toDenot( sym) .info.decls.toList if f.isMethod && f.isTerm && ! f.isModule) yield f
821
+ for (f <- sym.info.decls.toList if f.isMethod && f.isTerm && ! f.isModule) yield f
822
822
def serialVUID : Option [Long ] = None
823
823
824
824
@@ -856,7 +856,7 @@ class DottyBackendInterface(outputDirectory: AbstractFile, val superCallsMap: Ma
856
856
*/
857
857
def isTopLevelModuleClass : Boolean = sym.isModuleClass &&
858
858
ctx.atPhase(ctx.flattenPhase) { implicit ctx =>
859
- toDenot( sym) .owner.is(Flags .PackageClass )
859
+ sym.owner.is(Flags .PackageClass )
860
860
}
861
861
862
862
/**
@@ -874,7 +874,7 @@ class DottyBackendInterface(outputDirectory: AbstractFile, val superCallsMap: Ma
874
874
def addRemoteRemoteExceptionAnnotation : Unit = ()
875
875
876
876
def samMethod (): Symbol =
877
- toDenot( sym) .info.abstractTermMembers.headOption.getOrElse(toDenot( sym) .info.member(nme.apply)).symbol
877
+ sym.info.abstractTermMembers.headOption.getOrElse(sym.info.member(nme.apply)).symbol
878
878
}
879
879
880
880
0 commit comments