diff options
author | 2017-01-13 14:17:29 +0000 | |
---|---|---|
committer | 2017-01-16 23:42:09 +0000 | |
commit | 5247c08fb186a5a2ac02226827cf6b994f41a681 (patch) | |
tree | 8b1305f9fb918024302382b8e8aa43962098e9fa /compiler/optimizing/nodes.cc | |
parent | 0d478f289f0e33f19693d135f1d562b57427ed32 (diff) |
Put the resolved class in HLoadClass.
To avoid repeated lookups in sharpening/rtp/inlining.
Test: test-art-host test-art-target
Change-Id: I08d0da36a4bb061cdaa490ea2af3a3217a875bbe
Diffstat (limited to 'compiler/optimizing/nodes.cc')
-rw-r--r-- | compiler/optimizing/nodes.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/optimizing/nodes.cc b/compiler/optimizing/nodes.cc index 0af0d19849..fa51287dba 100644 --- a/compiler/optimizing/nodes.cc +++ b/compiler/optimizing/nodes.cc @@ -2440,9 +2440,9 @@ std::ostream& operator<<(std::ostream& os, HInvokeStaticOrDirect::ClinitCheckReq // mirrors, they are stored in a variable size handle scope which is always // visited during a pause. Also, the only caller of this helper // only uses the mirror for pointer comparison. -static inline mirror::Class* AsMirrorInternal(uint64_t address) +static inline mirror::Class* AsMirrorInternal(Handle<mirror::Class> handle) NO_THREAD_SAFETY_ANALYSIS { - return reinterpret_cast<StackReference<mirror::Class>*>(address)->AsMirrorPtr(); + return handle.Get(); } bool HLoadClass::InstructionDataEquals(const HInstruction* other) const { @@ -2455,9 +2455,8 @@ bool HLoadClass::InstructionDataEquals(const HInstruction* other) const { } switch (GetLoadKind()) { case LoadKind::kBootImageAddress: - return GetAddress() == other_load_class->GetAddress(); case LoadKind::kJitTableAddress: - return AsMirrorInternal(GetAddress()) == AsMirrorInternal(other_load_class->GetAddress()); + return AsMirrorInternal(GetClass()) == AsMirrorInternal(other_load_class->GetClass()); default: DCHECK(HasTypeReference(GetLoadKind())); return IsSameDexFile(GetDexFile(), other_load_class->GetDexFile()); |