@@ -14,7 +14,7 @@ import dotty.tools.dotc.ast.{untpd, tpd}
14
14
import dotty .tools .dotc .core .Constants .Constant
15
15
import dotty .tools .dotc .core .Types .{ExprType , NoType , MethodType }
16
16
import dotty .tools .dotc .core .Names .Name
17
- import dotty .runtime .LazyVals
17
+ import dotty .runtime .{ LazyVals => RLazyVals } // dotty deviation
18
18
import SymUtils ._
19
19
import scala .collection .mutable .ListBuffer
20
20
import dotty .tools .dotc .core .Denotations .SingleDenotation
@@ -288,15 +288,15 @@ class LazyVals extends MiniPhaseTransform with SymTransformer {
288
288
val thiz = This (claz)(ctx.fresh.setOwner(claz))
289
289
val companion = claz.companionModule
290
290
val helperModule = ctx.requiredModule(" dotty.runtime.LazyVals" )
291
- val getOffset = Select (ref(helperModule), LazyVals .Names .getOffset.toTermName)
291
+ val getOffset = Select (ref(helperModule), RLazyVals .Names .getOffset.toTermName)
292
292
var offsetSymbol : TermSymbol = null
293
293
var flag : Tree = EmptyTree
294
294
var ord = 0
295
295
296
296
// compute or create appropriate offsetSymol, bitmap and bits used by current ValDef
297
297
appendOffsetDefs.get(companion.name.moduleClassName) match {
298
298
case Some (info) =>
299
- val flagsPerLong = 64 / LazyVals .BITS_PER_LAZY_VAL
299
+ val flagsPerLong = 64 / RLazyVals .BITS_PER_LAZY_VAL
300
300
info.ord += 1
301
301
ord = info.ord % flagsPerLong
302
302
val id = info.ord / flagsPerLong
@@ -327,11 +327,11 @@ class LazyVals extends MiniPhaseTransform with SymTransformer {
327
327
val containerTree = ValDef (containerSymbol, initValue(tpe))
328
328
329
329
val offset = Select (ref(companion), offsetSymbol.name)
330
- val getFlag = Select (ref(helperModule), LazyVals .Names .get.toTermName)
331
- val setFlag = Select (ref(helperModule), LazyVals .Names .setFlag.toTermName)
332
- val wait = Select (ref(helperModule), LazyVals .Names .wait4Notification.toTermName)
333
- val state = Select (ref(helperModule), LazyVals .Names .state.toTermName)
334
- val cas = Select (ref(helperModule), LazyVals .Names .cas.toTermName)
330
+ val getFlag = Select (ref(helperModule), RLazyVals .Names .get.toTermName)
331
+ val setFlag = Select (ref(helperModule), RLazyVals .Names .setFlag.toTermName)
332
+ val wait = Select (ref(helperModule), RLazyVals .Names .wait4Notification.toTermName)
333
+ val state = Select (ref(helperModule), RLazyVals .Names .state.toTermName)
334
+ val cas = Select (ref(helperModule), RLazyVals .Names .cas.toTermName)
335
335
336
336
val accessor = mkThreadSafeDef(x.symbol.asTerm, claz, ord, containerSymbol, rhs, tpe, offset, getFlag, state, cas, setFlag, wait)
337
337
if (flag eq EmptyTree )
0 commit comments