Skip to content

Commit eb5e555

Browse files
author
EnzeXing
committed
Update syntax documentation
1 parent 143835b commit eb5e555

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

compiler/src/dotty/tools/dotc/transform/init/Objects.scala

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,19 +74,21 @@ object Objects:
7474
* ve ::= ObjectRef(class)
7575
* | OfClass(class, vs[outer], ctor, args, env)
7676
* | OfArray(object[owner], regions)
77-
* | Fun(..., env)
78-
* | Cold // abstract values in domain
77+
* | Fun(..., env) // value elements that can be contained in ValueSet
7978
* vs ::= ValueSet(ve) // set of abstract values
8079
* Bottom ::= ValueSet(Empty)
80+
* val ::= ve | Cold | vs // all possible abstract values in domain
81+
* Ref ::= ObjectRef | OfClass // values that represents a reference
82+
* ThisValue ::= Ref | Cold // possible values for 'this'
8183
*
82-
* refMap = ( ObjectRef | OfClass ) -> ( valsMap, varsMap, outersMap ) // refMap stores field informations of an object or instance
83-
* valsMap = valsym -> vs // maps immutable fields to their values
84+
* refMap = Ref -> ( valsMap, varsMap, outersMap ) // refMap stores field informations of an object or instance
85+
* valsMap = valsym -> val // maps immutable fields to their values
8486
* varsMap = valsym -> addr // each mutable field has an abstract address
85-
* outersMap = class -> ObjectRef | OfClass | Bottom // maps outer objects to their values
87+
* outersMap = class -> val // maps outer objects to their values
8688
*
8789
* arrayMap = OfArray -> addr // an array has one address that stores the join value of every element
8890
*
89-
* heap = addr -> vs // heap is mutable
91+
* heap = addr -> val // heap is mutable
9092
*
9193
* env = (valsMap, Option[env]) // stores local variables in the residing method, and possibly outer environments
9294
*

0 commit comments

Comments
 (0)