summaryrefslogtreecommitdiffstats
path: root/compiler/optimizing/nodes.h
diff options
context:
space:
mode:
authorCalin Juravle <calin@google.com>2015-04-23 14:34:33 +0100
committerCalin Juravle <calin@google.com>2015-04-23 14:38:07 +0100
commitedad8add1f1216850cb3f179ba6f57b0d885b016 (patch)
tree0467b99624818ead8a86a192d05c7a28dad18311 /compiler/optimizing/nodes.h
parentbe52c68dca2f146a571ffa65624acf2e6c7adeb2 (diff)
downloadart-edad8add1f1216850cb3f179ba6f57b0d885b016.tar.gz
art-edad8add1f1216850cb3f179ba6f57b0d885b016.tar.bz2
art-edad8add1f1216850cb3f179ba6f57b0d885b016.zip
Remove ActAsNullConstant
We now properly type null constants during ssa builder so this is not needed anymore. Bug: 20322006 Change-Id: Ic060a52d4fa2d4f00755dd6427f822d368392d7b
Diffstat (limited to 'compiler/optimizing/nodes.h')
-rw-r--r--compiler/optimizing/nodes.h9
1 files changed, 0 insertions, 9 deletions
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h
index 1a24cb516b..4923b3c1ff 100644
--- a/compiler/optimizing/nodes.h
+++ b/compiler/optimizing/nodes.h
@@ -1154,8 +1154,6 @@ class HInstruction : public ArenaObject<kArenaAllocMisc> {
virtual bool CanThrow() const { return false; }
bool HasSideEffects() const { return side_effects_.HasSideEffects(); }
- virtual bool ActAsNullConstant() const { return false; }
-
// Does not apply for all instructions, but having this at top level greatly
// simplifies the null check elimination.
virtual bool CanBeNull() const {
@@ -2080,8 +2078,6 @@ class HNullConstant : public HConstant {
size_t ComputeHashCode() const OVERRIDE { return 0; }
- bool ActAsNullConstant() const OVERRIDE { return true; }
-
DECLARE_INSTRUCTION(NullConstant);
private:
@@ -2103,11 +2099,6 @@ class HIntConstant : public HConstant {
size_t ComputeHashCode() const OVERRIDE { return GetValue(); }
- // TODO: Null is represented by the `0` constant. In most cases we replace it
- // with a HNullConstant but we don't do it when comparing (a != null). This
- // method is an workaround until we fix the above.
- bool ActAsNullConstant() const OVERRIDE { return value_ == 0; }
-
bool IsMinusOne() const OVERRIDE { return GetValue() == -1; }
bool IsZero() const OVERRIDE { return GetValue() == 0; }
bool IsOne() const OVERRIDE { return GetValue() == 1; }