Skip to content

Commit

Permalink
[compiler] Track refs through object expressions and property lookups
Browse files Browse the repository at this point in the history
Summary:
This addresses the issue of the compiler being overly restrictive about refs escaping into object expressions. Rather than erroring whenever a ref flows into an object, we will now treat the object itself as a ref, and apply the same escape rules to it. Whenever we look up a property from a ref value, we now don't know whether that value is itself a ref or a ref value, so we assume it's both.

The same logic applies to ref-accessing functions--if such a function is stored in an object, we'll propagate that property to the object itself and any properties looked up from it.

ghstack-source-id: 5c6fcb895d4a1658ce9dddec286aad3a57a4c9f1
Pull Request resolved: #30821
  • Loading branch information
mvitousek committed Aug 27, 2024
1 parent f2841c2 commit 7771d3a
Show file tree
Hide file tree
Showing 5 changed files with 273 additions and 128 deletions.
Loading

0 comments on commit 7771d3a

Please sign in to comment.