diff options
| author | 2015-11-23 08:58:58 +0000 | |
|---|---|---|
| committer | 2015-11-23 08:58:58 +0000 | |
| commit | 498121dfed54bb4be38d1ea302b38e55385ee1b4 (patch) | |
| tree | 0dbbc998527471123a96abb3f6b568c9329b1da2 /compiler/optimizing/nodes.h | |
| parent | f321ac3e9d866cc1897c743a56f3c66c4b8e4536 (diff) | |
| parent | 43392ff9c62fd106d087d28183b5be42ab1e2778 (diff) | |
Merge "Explicitly add HLoadClass/HClinitCheck for HNewInstance." am: 01b88a2c89
am: 43392ff9c6
* commit '43392ff9c62fd106d087d28183b5be42ab1e2778':
Explicitly add HLoadClass/HClinitCheck for HNewInstance.
Diffstat (limited to 'compiler/optimizing/nodes.h')
| -rw-r--r-- | compiler/optimizing/nodes.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h index 4f894b07c7..263795d47b 100644 --- a/compiler/optimizing/nodes.h +++ b/compiler/optimizing/nodes.h @@ -3652,9 +3652,10 @@ class HInvokeInterface : public HInvoke { DISALLOW_COPY_AND_ASSIGN(HInvokeInterface); }; -class HNewInstance : public HExpression<1> { +class HNewInstance : public HExpression<2> { public: - HNewInstance(HCurrentMethod* current_method, + HNewInstance(HInstruction* cls, + HCurrentMethod* current_method, uint32_t dex_pc, uint16_t type_index, const DexFile& dex_file, @@ -3667,7 +3668,8 @@ class HNewInstance : public HExpression<1> { can_throw_(can_throw), finalizable_(finalizable), entrypoint_(entrypoint) { - SetRawInputAt(0, current_method); + SetRawInputAt(0, cls); + SetRawInputAt(1, current_method); } uint16_t GetTypeIndex() const { return type_index_; } @@ -3687,6 +3689,10 @@ class HNewInstance : public HExpression<1> { QuickEntrypointEnum GetEntrypoint() const { return entrypoint_; } + void SetEntrypoint(QuickEntrypointEnum entrypoint) { + entrypoint_ = entrypoint; + } + DECLARE_INSTRUCTION(NewInstance); private: @@ -3694,7 +3700,7 @@ class HNewInstance : public HExpression<1> { const DexFile& dex_file_; const bool can_throw_; const bool finalizable_; - const QuickEntrypointEnum entrypoint_; + QuickEntrypointEnum entrypoint_; DISALLOW_COPY_AND_ASSIGN(HNewInstance); }; @@ -4927,6 +4933,7 @@ class HClinitCheck : public HExpression<1> { return true; } + bool CanThrow() const OVERRIDE { return true; } HLoadClass* GetLoadClass() const { return InputAt(0)->AsLoadClass(); } |