diff options
author | 2018-05-22 15:33:48 +0100 | |
---|---|---|
committer | 2018-05-23 13:48:31 +0100 | |
commit | 6ec2a1bf1cbecf17546df780dd0ad769042e1874 (patch) | |
tree | 09f7430f020e04dc892ff2c2152bb773cd45c0dd /runtime/interpreter/interpreter_common.h | |
parent | 2d3065e6ca0bd707bc998b7d260bb8e8ec07cf87 (diff) |
ObjPtr<>-ify UnstartedRuntime, fix 2 stale reference uses.
Test: Rely on TreeHugger.
Bug: 31113334
Change-Id: I35f76c3e3b94dfca18dbe67aba065a1270f4e5ee
Diffstat (limited to 'runtime/interpreter/interpreter_common.h')
-rw-r--r-- | runtime/interpreter/interpreter_common.h | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/runtime/interpreter/interpreter_common.h b/runtime/interpreter/interpreter_common.h index 67a0349d7a..37234e1462 100644 --- a/runtime/interpreter/interpreter_common.h +++ b/runtime/interpreter/interpreter_common.h @@ -543,24 +543,6 @@ static inline bool IsBackwardBranch(int32_t branch_offset) { return branch_offset <= 0; } -// Assign register 'src_reg' from shadow_frame to register 'dest_reg' into new_shadow_frame. -static inline void AssignRegister(ShadowFrame* new_shadow_frame, const ShadowFrame& shadow_frame, - size_t dest_reg, size_t src_reg) - REQUIRES_SHARED(Locks::mutator_lock_) { - // Uint required, so that sign extension does not make this wrong on 64b systems - uint32_t src_value = shadow_frame.GetVReg(src_reg); - ObjPtr<mirror::Object> o = shadow_frame.GetVRegReference<kVerifyNone>(src_reg); - - // If both register locations contains the same value, the register probably holds a reference. - // Note: As an optimization, non-moving collectors leave a stale reference value - // in the references array even after the original vreg was overwritten to a non-reference. - if (src_value == reinterpret_cast<uintptr_t>(o.Ptr())) { - new_shadow_frame->SetVRegReference(dest_reg, o.Ptr()); - } else { - new_shadow_frame->SetVReg(dest_reg, src_value); - } -} - // The arg_offset is the offset to the first input register in the frame. void ArtInterpreterToCompiledCodeBridge(Thread* self, ArtMethod* caller, |