Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.
Herman Venter edited this page Jun 27, 2017 · 1 revision

member expression object is unknown

The target object (base) part of a member expression is unknown value.

If it turns out that the value is undefined or null at runtime, this will cause an exception which will alter control flow and thus the effect of the expression on the subsequent heap. Furthermore, since the target object is not known, any assignment to the member expression must be assumed to potentially modify all objects, even those without such a member. Likewise, reading from an unknown object results in an abstract value of which very little will be known and which might involve executing a getter, which might throw an exception or change the heap in ways that Prepack cannot accurately track.

Although Prepack could, in principle, track all of the possibilities, this will very likely greatly increase the cost of the analysis and reduce precision to the extent that very little work can be eliminated at compile time, thus defeating the reason for running Prepack in the first place.

To make this error go away find out why the object is unknown and make the relevant parts environmental model more precise. For example, if the object expression refers to an environmental property that is marked as abstract in the model, refine the model so that the property is known to have an object value, preferably with some structure so that the entire member expression can be resolved.