@@ -72,7 +72,7 @@ trait BCodeBodyBuilder extends BCodeSkelBuilder {
72
72
lineNumber(tree)
73
73
74
74
tree match {
75
- case Assign (lhs @ SelectBI (qual, _), rhs) =>
75
+ case Assign (lhs @ DesugaredSelect (qual, _), rhs) =>
76
76
val isStatic = lhs.symbol.isStaticMember
77
77
if (! isStatic) { genLoadQualifier(lhs) }
78
78
genLoad(rhs, symInfoTK(lhs.symbol))
@@ -107,7 +107,7 @@ trait BCodeBodyBuilder extends BCodeSkelBuilder {
107
107
108
108
/* Generate code for primitive arithmetic operations. */
109
109
def genArithmeticOp (tree : Tree , code : Int ): BType = tree match {
110
- case Apply (fun @ SelectBI (larg, _), args) =>
110
+ case Apply (fun @ DesugaredSelect (larg, _), args) =>
111
111
var resKind = tpeTK(larg)
112
112
113
113
assert(resKind.isNumericType || (resKind == BOOL ),
@@ -163,7 +163,7 @@ trait BCodeBodyBuilder extends BCodeSkelBuilder {
163
163
/* Generate primitive array operations. */
164
164
def genArrayOp (tree : Tree , code : Int , expectedType : BType ): BType = tree match {
165
165
166
- case Apply (SelectBI (arrayObj, _), args) =>
166
+ case Apply (DesugaredSelect (arrayObj, _), args) =>
167
167
import ScalaPrimitivesOps ._
168
168
val k = tpeTK(arrayObj)
169
169
genLoad(arrayObj, k)
@@ -225,7 +225,7 @@ trait BCodeBodyBuilder extends BCodeSkelBuilder {
225
225
}
226
226
227
227
def genPrimitiveOp (tree : Apply , expectedType : BType ): BType = tree match {
228
- case Apply (fun @ SelectBI (receiver, _), _) =>
228
+ case Apply (fun @ DesugaredSelect (receiver, _), _) =>
229
229
val sym = tree.symbol
230
230
231
231
val code = primitives.getPrimitive(tree, receiver.tpe)
@@ -330,7 +330,7 @@ trait BCodeBodyBuilder extends BCodeSkelBuilder {
330
330
}
331
331
val (fun, args) = call match {
332
332
case Apply (fun, args) => (fun, args)
333
- case t @ SelectBI (_, _) => (t, Nil )
333
+ case t @ DesugaredSelect (_, _) => (t, Nil )
334
334
case t @ Ident (_) => (t, Nil )
335
335
}
336
336
@@ -341,7 +341,7 @@ trait BCodeBodyBuilder extends BCodeSkelBuilder {
341
341
// but I was able to derrive it by reading
342
342
// AbstractValidatingLambdaMetafactory.validateMetafactoryArgs
343
343
344
- val SelectBI (prefix, _) = fun
344
+ val DesugaredSelect (prefix, _) = fun
345
345
genLoad(prefix)
346
346
}
347
347
@@ -365,11 +365,11 @@ trait BCodeBodyBuilder extends BCodeSkelBuilder {
365
365
else classBTypeFromSymbol(claszSymbol)
366
366
}
367
367
368
- case SelectBI (Ident (nme.EMPTY_PACKAGE ), module) =>
368
+ case DesugaredSelect (Ident (nme.EMPTY_PACKAGE ), module) =>
369
369
assert(tree.symbol.is(Flags .Module ), s " Selection of non-module from empty package: $tree sym: ${tree.symbol} at: ${tree.span}" )
370
370
genLoadModule(tree)
371
371
372
- case SelectBI (qualifier, _) =>
372
+ case DesugaredSelect (qualifier, _) =>
373
373
val sym = tree.symbol
374
374
generatedType = symInfoTK(sym)
375
375
val qualSafeToElide = tpd.isIdempotentExpr(qualifier)
@@ -426,7 +426,7 @@ trait BCodeBodyBuilder extends BCodeSkelBuilder {
426
426
generatedType = UNIT
427
427
genStat(tree)
428
428
429
- case av @ ArrayValueBI (_, _) =>
429
+ case av @ ArrayValue (_, _) =>
430
430
generatedType = genArrayValue(av)
431
431
432
432
case mtch @ Match (_, _) =>
@@ -622,7 +622,7 @@ trait BCodeBodyBuilder extends BCodeSkelBuilder {
622
622
}
623
623
624
624
def genTypeApply (t : TypeApply ): BType = t match {
625
- case TypeApply (fun@ SelectBI (obj, _), targs) =>
625
+ case TypeApply (fun@ DesugaredSelect (obj, _), targs) =>
626
626
627
627
val sym = fun.symbol
628
628
val cast =
@@ -690,7 +690,7 @@ trait BCodeBodyBuilder extends BCodeSkelBuilder {
690
690
lineNumber(app)
691
691
app match {
692
692
case Apply (_, args) if app.symbol eq defn.newArrayMethod =>
693
- val List (elemClaz, Literal (c : Constant ), ArrayValueBI (_, dims)) = args
693
+ val List (elemClaz, Literal (c : Constant ), ArrayValue (_, dims)) = args
694
694
695
695
generatedType = toTypeKind(c.typeValue)
696
696
mkArrayConstructorCall(generatedType.asArrayBType, app, dims)
@@ -699,7 +699,7 @@ trait BCodeBodyBuilder extends BCodeSkelBuilder {
699
699
if (t.symbol ne defn.Object_synchronized ) genTypeApply(t)
700
700
else genSynchronized(app, expectedType)
701
701
702
- case Apply (fun @ SelectBI (Super (_, _), _), args) =>
702
+ case Apply (fun @ DesugaredSelect (Super (_, _), _), args) =>
703
703
def initModule (): Unit = {
704
704
// we initialize the MODULE$ field immediately after the super ctor
705
705
if (! isModuleInitialized &&
@@ -731,7 +731,7 @@ trait BCodeBodyBuilder extends BCodeSkelBuilder {
731
731
// thought to return an instance of what they construct,
732
732
// we have to 'simulate' it by DUPlicating the freshly created
733
733
// instance (on JVM, <init> methods return VOID).
734
- case Apply (fun @ SelectBI (New (tpt), nme.CONSTRUCTOR ), args) =>
734
+ case Apply (fun @ DesugaredSelect (New (tpt), nme.CONSTRUCTOR ), args) =>
735
735
val ctor = fun.symbol
736
736
assert(ctor.isClassConstructor, s " 'new' call to non-constructor: ${ctor.name}" )
737
737
@@ -781,9 +781,9 @@ trait BCodeBodyBuilder extends BCodeSkelBuilder {
781
781
if (invokeStyle.hasInstance) genLoadQualifier(fun)
782
782
genLoadArguments(args, paramTKs(app))
783
783
784
- val SelectBI (qual, _) = fun // fun is a Select, also checked in genLoadQualifier
784
+ val DesugaredSelect (qual, _) = fun // fun is a Select, also checked in genLoadQualifier
785
785
val isArrayClone = fun match {
786
- case SelectBI (qual, nme.clone_) if qual.tpe.widen.isInstanceOf [JavaArrayType ] => true
786
+ case DesugaredSelect (qual, nme.clone_) if qual.tpe.widen.isInstanceOf [JavaArrayType ] => true
787
787
case _ => false
788
788
}
789
789
if (isArrayClone) {
@@ -826,9 +826,8 @@ trait BCodeBodyBuilder extends BCodeSkelBuilder {
826
826
generatedType
827
827
} // end of genApply()
828
828
829
- private def genArrayValue (av : tpd.JavaSeqLiteral ): BType = av match {
830
- case ArrayValueBI (tpt, elems) =>
831
- val ArrayValueBI (tpt, elems) = av
829
+ private def genArrayValue (av : tpd.JavaSeqLiteral ): BType = {
830
+ val ArrayValue (tpt, elems) = av
832
831
833
832
lineNumber(av)
834
833
genArray(elems, tpt)
@@ -1013,7 +1012,7 @@ trait BCodeBodyBuilder extends BCodeSkelBuilder {
1013
1012
def genLoadQualifier (tree : Tree ): Unit = {
1014
1013
lineNumber(tree)
1015
1014
tree match {
1016
- case SelectBI (qualifier, _) => genLoad(qualifier)
1015
+ case DesugaredSelect (qualifier, _) => genLoad(qualifier)
1017
1016
case t : Ident => // dotty specific
1018
1017
desugarIdentBI(t) match {
1019
1018
case Some (sel) => genLoadQualifier(sel)
@@ -1191,7 +1190,7 @@ trait BCodeBodyBuilder extends BCodeSkelBuilder {
1191
1190
* It turns a chained call like "a".+("b").+("c") into a list of arguments.
1192
1191
*/
1193
1192
def liftStringConcat (tree : Tree ): List [Tree ] = tree match {
1194
- case tree @ Apply (fun @ SelectBI (larg, method), rarg) =>
1193
+ case tree @ Apply (fun @ DesugaredSelect (larg, method), rarg) =>
1195
1194
if (isPrimitive(fun) &&
1196
1195
primitives.getPrimitive(tree, larg.tpe) == ScalaPrimitivesOps .CONCAT )
1197
1196
liftStringConcat(larg) ::: rarg
@@ -1303,7 +1302,7 @@ trait BCodeBodyBuilder extends BCodeSkelBuilder {
1303
1302
import ScalaPrimitivesOps .{ ZNOT , ZAND , ZOR , EQ }
1304
1303
1305
1304
// lhs and rhs of test
1306
- lazy val SelectBI (lhs, _) = fun
1305
+ lazy val DesugaredSelect (lhs, _) = fun
1307
1306
val rhs = if (args.isEmpty) tpd.EmptyTree else args.head // args.isEmpty only for ZNOT
1308
1307
1309
1308
def genZandOrZor (and : Boolean ): Unit = {
0 commit comments