Env
The environment for method parameters
For performance and usability, we restrict parameters to be either Cold
or Hot
.
Despite that we have environment for evaluating expressions in secondary
constructors, we don't need to put environment as the cache key. The
reason is that constructor parameters are determined by the value of
this
--- it suffices to make the value of this
as part of the cache
key.
This crucially depends on the fact that in the initialization process there can be exactly one call to a specific constructor for a given receiver. However, once we relax the design to allow non-hot values to methods and functions, we have to put the environment as part of the cache key. The reason is that given the same receiver, a method or function may be called with different arguments -- they are not decided by the receiver anymore.