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 Jul 10, 2017 · 3 revisions

for in loops over unknown objects are not yet supported

The object value whose property names the for in loop is enumerating is an unknown value. In general, analyzing the loop body to determine the effects the loop has on the heap is complicated and makes the rest of the analysis lose precision. Therefore this is not yet supported except in very simple loops that just copy properties from one simple object to another.

To work around this limitation, consider changing the environment model so that the object value expression is known to Prepack. Alternatively (if the loop has no effect on the heap visible to Prepack), the entire loop can be placed inside a __residual call.

Clone this wiki locally