Allow zoned_local/shallow to memoize objects
commit5b39f1087ab7fdc4d897ddc193c0e9c90dd70d7a
authorJames Wu <jjwu@fb.com>
Thu, 26 May 2022 04:43:47 +0000 (25 21:43 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Thu, 26 May 2022 04:43:47 +0000 (25 21:43 -0700)
tree2074419e3716efb7367d52de801da90596628bbb
parente54c792237079059fe394e906f525d8dc77bb213
Allow zoned_local/shallow to memoize objects

Summary: Allow zoned_local and zoned_shallow to memoize objects even though they technicaly don't have access to globals. Once the local and shallow variants are moved to zoned, they will use PolicyShardedMemoize, which is safe.

Reviewed By: viratyosin

Differential Revision: D36680535

fbshipit-source-id: f4db2c2eeef38c34e1297fc3565d98ba541acd48
hphp/hack/src/typing/typing_local_ops.ml
hphp/hack/test/typecheck/coeffects/memoize_without_globals_shallow.php [new file with mode: 0644]
hphp/hack/test/typecheck/coeffects/memoize_without_globals_shallow.php.exp [new file with mode: 0644]
hphp/hack/test/typecheck/memoize_obj_policied.php.exp