We'd like to start using ##mixed## instead of ##var## for attribute types to be consistent with Hack. As a followup to this (once released), we would codemod all ##var## to ##mixed##.
Having everybody and their uncle reading and writing fields out
of a.code and stubs.code was making assembler work hard. This replaces most
reads with accessors, and all writes with structured friends of
X64SAssembler.
Because stronger types are better types, and this will make
future refactoring easier. I considered trying to purge the Opcode
type from the codebase too but that would be a much bigger project.
This diff reserves r11 for the GP scratch register used by the
CodeGenerator (in case no better register is available). rScratch
(r10) is now reserved for the assembler, and was renamed to rAsm.
This avoids a class of subtle bugs where code-gen mixed uses of
rScratch with calls to the assembler that could also make use of this
register. (Tx64 code still uses rScratch/rAsm for now.)
While here, also moved the reserved XMM scratch registers from the
assembler to CodeGenerator, since the assembler doesn't really use
them. (The uses of these registers in Tx64 were renamed back to
xmm0/xmm1 as they were until recently.)
I was learning from @jdelong and he said that you should use
double quotes for local includes and angle brackets for library
includes. I asked why our code was the way it was, and he said he wanted
to clean it up. I beat him to it :)
Conflicts:
hphp/runtime/base/server/admin_request_handler.cpp
hphp/runtime/vm/named_entity.h
Sets up the translator analyze pass to create a Tracelet for
the callee at every statically-known FCall. If the callee has an
appropriate shape (in this diff, it must be a function consisting of
"return $this->foo" for a declared property), we can inline it in
HHIR. Restructures the IR relating to frames some so we can eliminate
the stores relating to ActRec in this simple case (see the comments in
dce.cpp and hhbctranslator.cpp for details). Includes partial support
for inlining callees with locals, but it's disabled for now because
they will keep the frame live.
This is a partial step towards merging the HPHP::VM namespace
up into its parent. To keep it reviewable/mergeable I'm not doing
everything at once here, but most of the code I've touched seems
improved. I've drawn an invisible line around the jit, Unit and
its cohort (Class, Func, PreClass, etc.); we'll get back to them
soon.