Remove tvScratch, take 2
commit2c974499ca010d85aeb2ec15b73290832b23e549
authorBrett Simmers <bsimmers@fb.com>
Sat, 29 Aug 2015 03:31:38 +0000 (28 20:31 -0700)
committerhhvm-bot <hhvm-bot@fb.com>
Sat, 29 Aug 2015 04:00:26 +0000 (28 21:00 -0700)
tree010430b085a75357fe99c5e0212f02a88267d277
parent1173f61773974fdd0c765c1b6ccd41726232482b
Remove tvScratch, take 2

Summary: It was meant as an optimization.  We would store member-inst bases in tvScratch
when we knew they weren't refcounted values.  However it doesn't end up being a
win because we don't distinguish IR instructions that just use tvScratch, versus
those that use all of MInstrState.  Thus instruction that would use tvScratch
would still be initializing and decreffing tvRef{1,2}.

This diff removes it, and replaces its uses with tvRef.

This first went in as D2376930 but was reverted. The issue was that we were
letting a pointer to the tempBase local in memberHelperPre() escape its
frame. tempBase has been moved to MemberState with the other similar
TypedValues; this diff is otherwise identical to D2376930.

Reviewed By: @markw65

Differential Revision: D2393320
12 files changed:
hphp/doc/ir.specification
hphp/runtime/base/object-data.cpp
hphp/runtime/base/object-data.h
hphp/runtime/base/string-data.cpp
hphp/runtime/vm/bytecode.cpp
hphp/runtime/vm/jit/irgen-minstr.cpp
hphp/runtime/vm/jit/memory-effects.cpp
hphp/runtime/vm/jit/minstr-helpers.h
hphp/runtime/vm/jit/native-calls.cpp
hphp/runtime/vm/jit/translator-runtime.cpp
hphp/runtime/vm/member-operations.h
hphp/runtime/vm/minstr-state.h