Gráfico de Commits

13 Commits

Autor SHA1 Mensagem Data
bsimmers a9e58686ab Pull Translator's translate* methods into a separate class
This diff creates IRTranslator, which creates and uses an
HhbcTranslator to implement the translate* methods. It can be used
independently of Translator or TranslatorX64 (it isn't yet but my next
region compiler diff uses it). I also moved a bunch of methods out of
inappropriate classes and changed the type guard/assert methods in
HhbcTranslator to use RegionDesc::Location instead of Transl::Location
and fixes a local tracking issue in translateRegion.
2013-07-18 17:28:34 -07:00
Eric Caruso c3d067f65c Optimize InstanceOfD when rhs is unique interface
We would normally have to load the class and do
a whole bunch of other noise. Now we don't.
2013-07-09 12:24:21 -07:00
Drew Paroski d336b46cc7 Merge ObjectData and Instance together, part 2
When object support was first added to HHVM, a class named "Instance"
was introduced (deriving from ObjectData) to represent instances of user
defined classes. Since then, things have evolved and HPHPc and HPHPi have
been retired, and now there really is no needed to have ObjectData and
Instance be separate classes anymore.

This diff moves all of the functionality from the Instance class to the
ObjectData and removes the Instance class. In the process, I got rid of
a bunch of dead methods and fixed some indentation and other style issues.
2013-07-08 10:30:57 -07:00
Jordan DeLong 5371743d9d Convert tv_comparisons/tv_conversions by-pointer TypedValue/Cells to by value
If we're not going to mutate the Cell, it might make sense to
pass it by value rather than pointer to const.  Do folks like this
better?  I can see a couple arguments various ways.  But it does seem
like even if we want to pass it by pointer at the hardware level we
would ideally passing by const reference at the language level, so
this choice would be transparent at callsite code.  This diff doesn't
change anything in tv_helpers.h for now.
2013-07-06 11:12:27 -07:00
Jordan DeLong 819f3877aa Fix trunk due to merge messup
I apparently merged badly and then committed diffs in a bad
order and broke trunk.
2013-07-01 13:41:02 -07:00
Jordan DeLong 6b92028afd Remove base parameter from tvCastToInt64InPlace
Nothing uses it, and it means we can't as easily drop
folly::to for int-string conversions into these guys, which I'd like
to try later.  (Non-base-10 conversions are probably much rarer so
it's fine to have different code, I think?)

Also removes tvCastToInt64 and ports its single callsite to cellToInt.
I plan to move the tvCastTo*InPlace to tv_conversions.h (probably
cell-based functions) in upcoming diffs.
2013-07-01 13:41:01 -07:00
Eric Caruso 3d21090118 Move type dispatch of ConvCellToDbl to simplifier
As D867556, but with doubles.
2013-07-01 13:40:57 -07:00
Eric Caruso 9a76c1ebe9 Move type dispatch of ConvCellToInt to simplifier
Currently, CastInt does this all in its HHBC -> HHIR
translation, but this could be improved.
2013-06-28 10:33:50 -07:00
Jordan DeLong 67bf707768 Fixes and improvements for type aliases
Replace NameDef with a new struct of runtime-resolved typedef
information.  This needs to include more than Class* or Typedef*,
because we might have nullable type aliases, or a non-nullable alias
to a nullable typedef, or vice versa.  Switch to the new
TypeAnnotation stuff in TypedefStatement instead of just strings so
support for this isn't weird (shapes are outside of this for now
though---see the hack in parser.cpp).  Also fixes support for type
aliases to mixed.
2013-06-27 15:14:22 -07:00
Edwin Smith 274ef6c45b Split ArrayData::append(ArrayOp) into plus() and merge()
We had two distinct functions dispatched by an enum that was
always known somewhere higher up on the callstack.
2013-06-12 11:34:41 -07:00
Edwin Smith 3515793e74 Remove ArrayData::nvSet() wrappers and several dead Array helpers.
nvSet() only casts the value from TypedValue* to const Variant&; do it
at callsites.  Inlined array_setm_ik1_v0() and array_setm_s0k1_v0() into
their only remaining callsites in translator-runtime.cpp.
2013-06-06 15:57:05 -07:00
Tim Starling 998951619f update copyright date
We did not intend to imply our copyrights last forever

Closes #759
2013-06-03 12:43:56 -07:00
bsimmers cf197fee81 Collapse runtime/vm/translator's contents into runtime/vm/jit
Facebook: ~bsimmers/bin/move-vm-files.sh
2013-06-03 10:54:43 -07:00