Add GetClsRGProp bytecode and IR
commit52bff9e624ef3b898a4e801e1867e26f7e514be1
authorMichael Christensen <mchristensen@fb.com>
Tue, 26 Jul 2022 06:01:02 +0000 (25 23:01 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Tue, 26 Jul 2022 06:01:02 +0000 (25 23:01 -0700)
tree4842f08c536f26c4800fca7a40f2043a4d9096ee
parent7aaf633bee2acbfaf360a17713e33ea7b7c162b1
Add GetClsRGProp bytecode and IR

Summary:
This adds a bytecode and IR `GetClsRGProp`, for getting the reified generics property on an object.

The reason why we can't just use `QueryM` to get said property is because `QueryM` uses the current context's class (i.e. the class of `$this`), while what's needed is the class referred to by `self`, `static`, or  `parent`. This is precisely what's done in the `getClsReifiedGenericsProp` function currently, so we can expose and use it.

Reviewed By: oulgen

Differential Revision: D37424312

fbshipit-source-id: 27c8ee55a3b41f8502af9582f899794267044cd5
37 files changed:
hphp/doc/bytecode.specification
hphp/doc/ir.specification
hphp/hack/src/hackc/emitter/label_rewriter.rs
hphp/hack/src/hackc/ir/conversions/bc_to_ir/instrs.rs
hphp/hack/src/hackc/ir/conversions/ir_to_bc/emitter.rs
hphp/hack/src/hackc/ir/conversions/ir_to_bc/push_count.rs
hphp/hack/src/hackc/ir/core/instr.rs
hphp/hack/src/hackc/ir/print/print.rs
hphp/hack/src/hackc/sem_diff/local_info.rs
hphp/hack/src/hackc/sem_diff/sequence.rs
hphp/hack/src/hackc/sem_diff/state.rs
hphp/hhbbc/dce.cpp
hphp/hhbbc/interp.cpp
hphp/runtime/vm/bytecode.cpp
hphp/runtime/vm/jit/dce.cpp
hphp/runtime/vm/jit/ir-opcode.cpp
hphp/runtime/vm/jit/irgen-create.cpp
hphp/runtime/vm/jit/irlower-object.cpp
hphp/runtime/vm/jit/memory-effects.cpp
hphp/runtime/vm/jit/native-calls.cpp
hphp/runtime/vm/jit/translator.cpp
hphp/runtime/vm/opcodes.h
hphp/runtime/vm/reified-generics.cpp
hphp/runtime/vm/reified-generics.h
hphp/runtime/vm/super-inlining-bros.cpp
hphp/runtime/vm/taint/interpreter.cpp
hphp/runtime/vm/taint/interpreter.h
hphp/test/slow/new_object_expression/new-parent.php [new file with mode: 0644]
hphp/test/slow/new_object_expression/new-parent.php.expectf [new file with mode: 0644]
hphp/test/slow/new_object_expression/new-self.php [new file with mode: 0644]
hphp/test/slow/new_object_expression/new-self.php.expectf [new file with mode: 0644]
hphp/test/slow/reified-generics/new-parent-lazy.php [new file with mode: 0644]
hphp/test/slow/reified-generics/new-parent-lazy.php.expect [new file with mode: 0644]
hphp/test/slow/reified-generics/new-self-lazy.php [new file with mode: 0644]
hphp/test/slow/reified-generics/new-self-lazy.php.expect [new file with mode: 0644]
hphp/test/slow/reified-generics/new-static-lazy.php [new file with mode: 0644]
hphp/test/slow/reified-generics/new-static-lazy.php.expect [new file with mode: 0644]