Really basic readonly property emitter
commitdbdaa519b496d01247852f1e9e12537d134c4487
authorJames Wu <jjwu@fb.com>
Tue, 17 Aug 2021 22:10:42 +0000 (17 15:10 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Tue, 17 Aug 2021 22:14:55 +0000 (17 15:14 -0700)
tree7e88f27508d24300d9c1daa05bcf2243e529932b
parent25755504a382dab7616a209e066ff8231a110c7b
Really basic readonly property emitter

Summary:
Emit readonly immediates for most basic property access case. Add TODOs for others, which I'll add later as time goes on

Note: This diff will require that the runtime have a flag to control whether to turn on runtime support for properties, and uses that flag. HackC will emit the correct immediates for readonly expressions with or without readonly enforcement being on.

Reviewed By: kavoor

Differential Revision: D30115664

fbshipit-source-id: 7dca938354fc1a6aab8fcef19aecf0a7124216e9
hphp/hack/src/hhbc/hhbc_by_ref/emit_expression.rs
hphp/hack/src/hhbc/hhbc_by_ref/emit_statement.rs
hphp/test/slow/readonly/mut_to_mut_property.php [new file with mode: 0644]
hphp/test/slow/readonly/mut_to_mut_property.php.expectf [new file with mode: 0644]
hphp/test/slow/readonly/readonly_to_mut_property.php [new file with mode: 0644]
hphp/test/slow/readonly/readonly_to_mut_property.php.expectf [new file with mode: 0644]
hphp/test/slow/readonly/readonly_to_readonly_property.php [new file with mode: 0644]
hphp/test/slow/readonly/readonly_to_readonly_property.php.expectf [new file with mode: 0644]