Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Speedup ForbidDynamicCall implementation
Summary: The existing dynamic call checking infrastructure has high overhead when turned on, mainly because it inserts a dynamic call check in the prologue of every function. Improve this by moving the dynamic call check to the caller (instead of the callee). When making a function call which is known to be dynamic, check if the target function is dynamically callable, and if not, emit the warning. The dynamic call checks for frame accessing functions and for builtins still remain in the prologue. Its more optimal to do those there as they benefit more from knowing the func statically. Therefore we now have "caller dynamic call checks" and "callee dynamic call checks". Reviewed By: paulbiss Differential Revision: D7170451 fbshipit-source-id: d8378ae4e82876fe04bb73f35e4a91dd9fd6a011
- Loading branch information
Showing
with
363 additions
and 184 deletions.
- +15 −0 hphp/doc/ir.specification
- +2 −0 hphp/runtime/base/execution-context.cpp
- +8 −3 hphp/runtime/vm/bytecode.cpp
- +23 −18 hphp/runtime/vm/interp-helpers.h
- +3 −0 hphp/runtime/vm/jit/dce.cpp
- +1 −0 hphp/runtime/vm/jit/extra-data.h
- +12 −1 hphp/runtime/vm/jit/frame-state.cpp
- +5 −0 hphp/runtime/vm/jit/frame-state.h
- +17 −0 hphp/runtime/vm/jit/ir-builder.cpp
- +1 −0 hphp/runtime/vm/jit/ir-builder.h
- +50 −0 hphp/runtime/vm/jit/irgen-call.cpp
- +4 −0 hphp/runtime/vm/jit/irgen-call.h
- +3 −16 hphp/runtime/vm/jit/irgen-func-prologue.cpp
- +1 −1 hphp/runtime/vm/jit/irgen-func-prologue.h
- +7 −3 hphp/runtime/vm/jit/irgen-inlining.cpp
- +2 −1 hphp/runtime/vm/jit/irgen.h
- +14 −0 hphp/runtime/vm/jit/irlower-act-rec.cpp
- +10 −0 hphp/runtime/vm/jit/irlower-class-func.cpp
- +26 −0 hphp/runtime/vm/jit/irlower-exception.cpp
- +8 −0 hphp/runtime/vm/jit/memory-effects.cpp
- +8 −0 hphp/runtime/vm/jit/simplify.cpp
- +2 −1 hphp/runtime/vm/jit/translate-region.cpp
- +2 −1 hphp/system/systemlib.cpp
- +139 −139 hphp/test/slow/dynamic-calls/forbid-notice.php.expectf
Oops, something went wrong.