Skip to content

Commit

Permalink
Address comment
Browse files Browse the repository at this point in the history
  • Loading branch information
EnzeXing committed Aug 31, 2024
1 parent 7e46861 commit d398457
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions compiler/src/dotty/tools/dotc/transform/init/Objects.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1710,15 +1710,13 @@ class Objects(using Context @constructorOnly):
tpl.body.foreach {
case vdef : ValDef if !vdef.symbol.is(Flags.Lazy) && !vdef.rhs.isEmpty =>
val sym = vdef.symbol
if klass.name.toString.contains("BitVector$") || klass.name.toString.contains("ByteVector$") then println("Begin initializing field " + sym + " in " + klass)
val res = if (whiteList.contains(sym)) Bottom else eval(vdef.rhs, thisV, klass)
if sym.is(Flags.Mutable) then
val addr = Heap.fieldVarAddr(summon[Regions.Data], sym, State.currentObject)
thisV.initVar(sym, addr)
Heap.writeJoin(addr, res)
else
thisV.initVal(sym, res)
if klass.name.toString.contains("BitVector$") || klass.name.toString.contains("ByteVector$") then println("Finished initializing field " + sym + " in " + klass)

case _: MemberDef =>

Expand Down

0 comments on commit d398457

Please sign in to comment.