File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
compiler/src/dotty/tools/dotc/transform/init Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -239,9 +239,24 @@ object Semantic:
239
239
private val queryTreeMapper : MutableTreeWrapper = new MutableTreeWrapper
240
240
241
241
class Cache :
242
+ /** The cache for expression values from last iteration */
242
243
private var last : ExprValueCache = Map .empty
244
+
245
+ /** The updated cache for expression values based on the cache values from the last iteration */
243
246
private var current : ExprValueCache = Map .empty
247
+
248
+ /** Global cached values for expressions
249
+ *
250
+ * The values are only added when a fixed point is reached.
251
+ *
252
+ * It is intended to improve performance for computation related to warm values.
253
+ */
244
254
private var stable : ExprValueCache = Map .empty
255
+
256
+ /** Whether the current heap is different from the last heap?
257
+ *
258
+ * `changed == true` implies that the fixed point has been reached.
259
+ */
245
260
private var changed : Boolean = false
246
261
247
262
/** Abstract heap stores abstract objects
You can’t perform that action at this time.
0 commit comments