Add FPushClsMethodR* as an optimizations for ReifiedName + FPushClsMethod*
commitef18aa7e94284e866fa06bf3d58d3173457ad3f9
authorOguz Ulgen <oulgen@fb.com>
Fri, 26 Apr 2019 07:45:00 +0000 (26 00:45 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Fri, 26 Apr 2019 07:48:48 +0000 (26 00:48 -0700)
tree93d9e1cff76101ff7edb95bfc22725d9fd8fd1e5
parent5a027a0783dad8657e5b2fcefa483ddff8baeaab
Add FPushClsMethodR* as an optimizations for ReifiedName + FPushClsMethod*

Summary: This diff adds a new bytecode to optimize the combination of `ReifiedName` + `FPushClsMethod` since for reified generics we do know the name of the function statically but using `FPushClsMethod` was preventing us from using this static knowledge. Also, according to strobelight data, most of the time is spend on generating the string from reified generics but in this case we do not need to do that, so this diff elides this string creation.

Reviewed By: jano

Differential Revision: D14932066

fbshipit-source-id: b31c7b4bae6a07e1fedb6c3c4cb4fde42e6bbe69
20 files changed:
hphp/doc/bytecode.specification
hphp/hack/src/hhbc/emit_expression.ml
hphp/hack/src/hhbc/emit_memoize_method.ml
hphp/hack/src/hhbc/hhbc_ast.ml
hphp/hack/src/hhbc/hhbc_hhas.ml
hphp/hack/src/hhbc/instruction_sequence.ml
hphp/hhbbc/dce.cpp
hphp/hhbbc/interp.cpp
hphp/runtime/vm/bytecode.cpp
hphp/runtime/vm/hhbc.h
hphp/runtime/vm/jit/annotation.cpp
hphp/runtime/vm/jit/irgen-call.cpp
hphp/runtime/vm/jit/translate-region.cpp
hphp/runtime/vm/jit/translator.cpp
hphp/runtime/vm/verifier/check-func.cpp
hphp/test/slow/reified_generics/cls-method-1.php [new file with mode: 0644]
hphp/test/slow/reified_generics/cls-method-1.php.expect [new file with mode: 0644]
hphp/test/slow/reified_generics/cls-method-2.php [new file with mode: 0644]
hphp/test/slow/reified_generics/cls-method-2.php.expect [new file with mode: 0644]
hphp/test/slow/reified_generics/memoize_static_method.php [moved from hphp/test/slow/reified_generics/memoize_static_method.php.disabled with 100% similarity]