Move vmfp, vmsp, and vmpc into RDS
commit7d92b063680ab26f3170b682249dd141ea7fa31a
authorbsimmers <bsimmers@fb.com>
Fri, 30 May 2014 05:35:41 +0000 (29 22:35 -0700)
committerJoelMarcey <joelm@fb.com>
Mon, 2 Jun 2014 23:15:00 +0000 (2 16:15 -0700)
tree7f4483394e70f97ebd5b13b0013e818970206373
parent9361896d6cafe6570056d6270daf9d20ac891b8a
Move vmfp, vmsp, and vmpc into RDS

Summary: The three registers now live in the RDS header struct instead of the
execution context. This makes accessing them from translated code more
efficient, though we do that rarely enough that it doesn't matter much in
practice. The speed of the accessor functions should be unchanged: they're
still loading a pointer from TLS then reading at a fixed offset from that
pointer. This will slow down parts of the interpreter a little, since they now
access TLS instead of a member on this.

Most of the diff is just changing uses of the old accessors to use the "new"
ones and is pretty uninteresting. The biggest change is that the
vmfp()/vmsp()/vmpc() accessors have moved out of translator-inline.h into their
own header, runtime/vm/vm-regs.h, and are now the canonical way to access these
registers. VMRegAnchor and CallerFrame have also moved out of the JIT namespace
since they're such an integral part of the VM now.

Reviewed By: @jdelong

Differential Revision: D1357112
65 files changed:
hphp/runtime/base/array-iterator.cpp
hphp/runtime/base/array-sort.cpp
hphp/runtime/base/builtin-functions.cpp
hphp/runtime/base/execution-context.cpp
hphp/runtime/base/execution-context.h
hphp/runtime/base/memory-profile.cpp
hphp/runtime/base/preg.cpp
hphp/runtime/base/rds-header.h [new file with mode: 0644]
hphp/runtime/base/rds-inl.h
hphp/runtime/base/rds.cpp
hphp/runtime/base/rds.h
hphp/runtime/base/request-injection-data.cpp
hphp/runtime/base/url-file.cpp
hphp/runtime/base/user-fs-node.cpp
hphp/runtime/debugger/break_point.cpp
hphp/runtime/debugger/cmd/cmd_flow_control.cpp
hphp/runtime/debugger/cmd/cmd_next.cpp
hphp/runtime/debugger/cmd/cmd_out.cpp
hphp/runtime/debugger/debugger_proxy.cpp
hphp/runtime/ext/asio/waitable_wait_handle.cpp
hphp/runtime/ext/debugger/ext_debugger.cpp
hphp/runtime/ext/ext_array.cpp
hphp/runtime/ext/ext_collections.cpp
hphp/runtime/ext/ext_function.cpp
hphp/runtime/ext/ext_hotprofiler.cpp
hphp/runtime/ext/ext_misc.cpp
hphp/runtime/ext/ext_xml.cpp
hphp/runtime/ext/gd/ext_gd.cpp
hphp/runtime/ext/reflection/ext_reflection.cpp
hphp/runtime/ext/session/ext_session.cpp
hphp/runtime/ext/std/ext_std_classobj.cpp
hphp/runtime/ext/std/ext_std_options.cpp
hphp/runtime/ext/std/ext_std_variable.cpp
hphp/runtime/ext_zend_compat/hhvm/zend-object-store.cpp
hphp/runtime/ext_zend_compat/hhvm/zend-wrap-func.cpp
hphp/runtime/ext_zend_compat/php-src/Zend/zend_API.cpp
hphp/runtime/ext_zend_compat/php-src/Zend/zend_execute_API.cpp
hphp/runtime/ext_zend_compat/php-src/Zend/zend_list.cpp
hphp/runtime/vm/bytecode.cpp
hphp/runtime/vm/bytecode.h
hphp/runtime/vm/event-hook.cpp
hphp/runtime/vm/event-hook.h
hphp/runtime/vm/jit/back-end-x64.cpp
hphp/runtime/vm/jit/code-gen-arm.cpp
hphp/runtime/vm/jit/code-gen-helpers-arm.cpp
hphp/runtime/vm/jit/code-gen-helpers-x64.cpp
hphp/runtime/vm/jit/code-gen-x64.cpp
hphp/runtime/vm/jit/fixup.cpp
hphp/runtime/vm/jit/function-entry-helpers-x64.cpp
hphp/runtime/vm/jit/mc-generator.cpp
hphp/runtime/vm/jit/service-requests-arm.cpp
hphp/runtime/vm/jit/target-cache.cpp
hphp/runtime/vm/jit/translator-helpers.cpp
hphp/runtime/vm/jit/translator-helpers.h
hphp/runtime/vm/jit/translator-inline.h
hphp/runtime/vm/jit/translator-runtime.cpp
hphp/runtime/vm/jit/translator.cpp
hphp/runtime/vm/jit/translator.h
hphp/runtime/vm/jit/unique-stubs-arm.cpp
hphp/runtime/vm/jit/unique-stubs-x64.cpp
hphp/runtime/vm/type-constraint.cpp
hphp/runtime/vm/unit.cpp
hphp/runtime/vm/unwind.cpp
hphp/runtime/vm/vm-regs.cpp [copied from hphp/runtime/vm/jit/translator-helpers.cpp with 55% similarity]
hphp/runtime/vm/vm-regs.h [copied from hphp/runtime/vm/jit/translator-inline.h with 54% similarity]