-
Notifications
You must be signed in to change notification settings - Fork 1.1k
added HashTableBuilder.rootNode to white list #19943
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
e91006a
8a5cf8b
8315f78
2a9f366
c222381
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,7 +66,9 @@ import dotty.tools.dotc.core.Flags.AbstractOrTrait | |
* whole-program analysis. However, the check is not modular in terms of project boundaries. | ||
* | ||
*/ | ||
class Objects: | ||
class Objects(using Context @constructorOnly): | ||
val immutableHashSetBuider: Symbol = requiredClass("scala.collection.immutable.HashSetBuilder") | ||
val HashSetBuilder_rootNode: Symbol = immutableHashSetBuider.requiredValue("rootNode") | ||
|
||
// ----------------------------- abstract domain ----------------------------- | ||
|
||
|
@@ -1683,10 +1685,11 @@ class Objects: | |
end if | ||
|
||
// class body | ||
val whiteList = Set(HashSetBuilder_rootNode) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would move it to be a field of the class |
||
tpl.body.foreach { | ||
case vdef : ValDef if !vdef.symbol.is(Flags.Lazy) && !vdef.rhs.isEmpty => | ||
val res = eval(vdef.rhs, thisV, klass) | ||
val sym = vdef.symbol | ||
var res = if (whiteList.contains(sym)) Bottom else eval(vdef.rhs, thisV, klass) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It can be a val now There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed. |
||
if sym.is(Flags.Mutable) then | ||
val addr = Heap.fieldVarAddr(summon[Regions.Data], sym, State.currentObject) | ||
thisV.initVar(sym, addr) | ||
|
Uh oh!
There was an error while loading. Please reload this page.