diff options
author | Andreas Gampe <agampe@google.com> | 2015-10-29 04:02:22 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2015-10-29 04:02:22 +0000 |
commit | deb2a896cad5bcd22bbe21c3b09fd8efa6ad1d13 (patch) | |
tree | d2c5cefb419cd0f9bdad2bba939235fbe2c5fbfd /compiler/optimizing/nodes.h | |
parent | 59a984e8e2dc3a4d5c220518f762ba9b1c0de44c (diff) | |
parent | 594c0612519e96bcc1bd42ff4dcbfa2c53b09c5a (diff) |
Merge "Revert "Enable store elimination for singleton objects.""
am: 594c061251
* commit '594c0612519e96bcc1bd42ff4dcbfa2c53b09c5a':
Revert "Enable store elimination for singleton objects."
Diffstat (limited to 'compiler/optimizing/nodes.h')
-rw-r--r-- | compiler/optimizing/nodes.h | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h index 7ac39d1a8e0..6028d4b6fa4 100644 --- a/compiler/optimizing/nodes.h +++ b/compiler/optimizing/nodes.h @@ -3595,14 +3595,10 @@ class HNewInstance : public HExpression<1> { uint32_t dex_pc, uint16_t type_index, const DexFile& dex_file, - bool can_throw, - bool finalizable, QuickEntrypointEnum entrypoint) : HExpression(Primitive::kPrimNot, SideEffects::CanTriggerGC(), dex_pc), type_index_(type_index), dex_file_(dex_file), - can_throw_(can_throw), - finalizable_(finalizable), entrypoint_(entrypoint) { SetRawInputAt(0, current_method); } @@ -3612,11 +3608,11 @@ class HNewInstance : public HExpression<1> { // Calls runtime so needs an environment. bool NeedsEnvironment() const OVERRIDE { return true; } - - // It may throw when called on type that's not instantiable/accessible. - bool CanThrow() const OVERRIDE { return can_throw_; } - - bool IsFinalizable() const { return finalizable_; } + // It may throw when called on: + // - interfaces + // - abstract/innaccessible/unknown classes + // TODO: optimize when possible. + bool CanThrow() const OVERRIDE { return true; } bool CanBeNull() const OVERRIDE { return false; } @@ -3627,8 +3623,6 @@ class HNewInstance : public HExpression<1> { private: const uint16_t type_index_; const DexFile& dex_file_; - const bool can_throw_; - const bool finalizable_; const QuickEntrypointEnum entrypoint_; DISALLOW_COPY_AND_ASSIGN(HNewInstance); |