diff options
| author | 2017-12-15 10:08:11 +0000 | |
|---|---|---|
| committer | 2017-12-15 10:08:11 +0000 | |
| commit | fe8a8975cd843c9a7922aaf0badae2d47562e9cd (patch) | |
| tree | afaa12ffee3f70785607975c59f47e43111df61c /compiler/optimizing/nodes.h | |
| parent | c8d910399cfd33550c497cc3e1e05b0396903234 (diff) | |
| parent | 8758454d380a2b0de1f4a99e9623cfac5460ccdf (diff) | |
Merge changes Ib1381084,Icb2a838f
* changes:
Clean up InstanceOf/CheckCast.
X86: Clean up interface type check for heap poisoning.
Diffstat (limited to 'compiler/optimizing/nodes.h')
| -rw-r--r-- | compiler/optimizing/nodes.h | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h index d33f2f1d65..8efe5e5e91 100644 --- a/compiler/optimizing/nodes.h +++ b/compiler/optimizing/nodes.h @@ -6590,7 +6590,7 @@ std::ostream& operator<<(std::ostream& os, TypeCheckKind rhs); class HInstanceOf FINAL : public HExpression<2> { public: HInstanceOf(HInstruction* object, - HLoadClass* constant, + HLoadClass* target_class, TypeCheckKind check_kind, uint32_t dex_pc) : HExpression(DataType::Type::kBool, @@ -6599,7 +6599,13 @@ class HInstanceOf FINAL : public HExpression<2> { SetPackedField<TypeCheckKindField>(check_kind); SetPackedFlag<kFlagMustDoNullCheck>(true); SetRawInputAt(0, object); - SetRawInputAt(1, constant); + SetRawInputAt(1, target_class); + } + + HLoadClass* GetTargetClass() const { + HInstruction* load_class = InputAt(1); + DCHECK(load_class->IsLoadClass()); + return load_class->AsLoadClass(); } bool IsClonable() const OVERRIDE { return true; } @@ -6693,14 +6699,20 @@ class HBoundType FINAL : public HExpression<1> { class HCheckCast FINAL : public HTemplateInstruction<2> { public: HCheckCast(HInstruction* object, - HLoadClass* constant, + HLoadClass* target_class, TypeCheckKind check_kind, uint32_t dex_pc) : HTemplateInstruction(SideEffects::CanTriggerGC(), dex_pc) { SetPackedField<TypeCheckKindField>(check_kind); SetPackedFlag<kFlagMustDoNullCheck>(true); SetRawInputAt(0, object); - SetRawInputAt(1, constant); + SetRawInputAt(1, target_class); + } + + HLoadClass* GetTargetClass() const { + HInstruction* load_class = InputAt(1); + DCHECK(load_class->IsLoadClass()); + return load_class->AsLoadClass(); } bool IsClonable() const OVERRIDE { return true; } |