diff options
Diffstat (limited to 'compiler/optimizing/nodes.h')
-rw-r--r-- | compiler/optimizing/nodes.h | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h index d98dd0608b..abc8d5746a 100644 --- a/compiler/optimizing/nodes.h +++ b/compiler/optimizing/nodes.h @@ -3167,7 +3167,7 @@ class HEqual FINAL : public HCondition { } private: - template <typename T> bool Compute(T x, T y) const { return x == y; } + template <typename T> static bool Compute(T x, T y) { return x == y; } DISALLOW_COPY_AND_ASSIGN(HEqual); }; @@ -3210,7 +3210,7 @@ class HNotEqual FINAL : public HCondition { } private: - template <typename T> bool Compute(T x, T y) const { return x != y; } + template <typename T> static bool Compute(T x, T y) { return x != y; } DISALLOW_COPY_AND_ASSIGN(HNotEqual); }; @@ -3247,7 +3247,7 @@ class HLessThan FINAL : public HCondition { } private: - template <typename T> bool Compute(T x, T y) const { return x < y; } + template <typename T> static bool Compute(T x, T y) { return x < y; } DISALLOW_COPY_AND_ASSIGN(HLessThan); }; @@ -3284,7 +3284,7 @@ class HLessThanOrEqual FINAL : public HCondition { } private: - template <typename T> bool Compute(T x, T y) const { return x <= y; } + template <typename T> static bool Compute(T x, T y) { return x <= y; } DISALLOW_COPY_AND_ASSIGN(HLessThanOrEqual); }; @@ -3321,7 +3321,7 @@ class HGreaterThan FINAL : public HCondition { } private: - template <typename T> bool Compute(T x, T y) const { return x > y; } + template <typename T> static bool Compute(T x, T y) { return x > y; } DISALLOW_COPY_AND_ASSIGN(HGreaterThan); }; @@ -3358,7 +3358,7 @@ class HGreaterThanOrEqual FINAL : public HCondition { } private: - template <typename T> bool Compute(T x, T y) const { return x >= y; } + template <typename T> static bool Compute(T x, T y) { return x >= y; } DISALLOW_COPY_AND_ASSIGN(HGreaterThanOrEqual); }; @@ -3396,7 +3396,7 @@ class HBelow FINAL : public HCondition { } private: - template <typename T> bool Compute(T x, T y) const { + template <typename T> static bool Compute(T x, T y) { return MakeUnsigned(x) < MakeUnsigned(y); } @@ -3436,7 +3436,7 @@ class HBelowOrEqual FINAL : public HCondition { } private: - template <typename T> bool Compute(T x, T y) const { + template <typename T> static bool Compute(T x, T y) { return MakeUnsigned(x) <= MakeUnsigned(y); } @@ -3476,7 +3476,7 @@ class HAbove FINAL : public HCondition { } private: - template <typename T> bool Compute(T x, T y) const { + template <typename T> static bool Compute(T x, T y) { return MakeUnsigned(x) > MakeUnsigned(y); } @@ -3516,7 +3516,7 @@ class HAboveOrEqual FINAL : public HCondition { } private: - template <typename T> bool Compute(T x, T y) const { + template <typename T> static bool Compute(T x, T y) { return MakeUnsigned(x) >= MakeUnsigned(y); } @@ -4189,7 +4189,7 @@ class HNeg FINAL : public HUnaryOperation { DCHECK_EQ(result_type, Primitive::PrimitiveKind(input->GetType())); } - template <typename T> T Compute(T x) const { return -x; } + template <typename T> static T Compute(T x) { return -x; } HConstant* Evaluate(HIntConstant* x) const OVERRIDE { return GetBlock()->GetGraph()->GetIntConstant(Compute(x->GetValue()), GetDexPc()); @@ -4259,7 +4259,7 @@ class HAdd FINAL : public HBinaryOperation { bool IsCommutative() const OVERRIDE { return true; } - template <typename T> T Compute(T x, T y) const { return x + y; } + template <typename T> static T Compute(T x, T y) { return x + y; } HConstant* Evaluate(HIntConstant* x, HIntConstant* y) const OVERRIDE { return GetBlock()->GetGraph()->GetIntConstant( @@ -4292,7 +4292,7 @@ class HSub FINAL : public HBinaryOperation { uint32_t dex_pc = kNoDexPc) : HBinaryOperation(result_type, left, right, SideEffects::None(), dex_pc) {} - template <typename T> T Compute(T x, T y) const { return x - y; } + template <typename T> static T Compute(T x, T y) { return x - y; } HConstant* Evaluate(HIntConstant* x, HIntConstant* y) const OVERRIDE { return GetBlock()->GetGraph()->GetIntConstant( @@ -4327,7 +4327,7 @@ class HMul FINAL : public HBinaryOperation { bool IsCommutative() const OVERRIDE { return true; } - template <typename T> T Compute(T x, T y) const { return x * y; } + template <typename T> static T Compute(T x, T y) { return x * y; } HConstant* Evaluate(HIntConstant* x, HIntConstant* y) const OVERRIDE { return GetBlock()->GetGraph()->GetIntConstant( @@ -4493,7 +4493,7 @@ class HShl FINAL : public HBinaryOperation { } template <typename T> - T Compute(T value, int32_t distance, int32_t max_shift_distance) const { + static T Compute(T value, int32_t distance, int32_t max_shift_distance) { return value << (distance & max_shift_distance); } @@ -4539,7 +4539,7 @@ class HShr FINAL : public HBinaryOperation { } template <typename T> - T Compute(T value, int32_t distance, int32_t max_shift_distance) const { + static T Compute(T value, int32_t distance, int32_t max_shift_distance) { return value >> (distance & max_shift_distance); } @@ -4585,7 +4585,7 @@ class HUShr FINAL : public HBinaryOperation { } template <typename T> - T Compute(T value, int32_t distance, int32_t max_shift_distance) const { + static T Compute(T value, int32_t distance, int32_t max_shift_distance) { typedef typename std::make_unsigned<T>::type V; V ux = static_cast<V>(value); return static_cast<T>(ux >> (distance & max_shift_distance)); @@ -4631,7 +4631,7 @@ class HAnd FINAL : public HBinaryOperation { bool IsCommutative() const OVERRIDE { return true; } - template <typename T> T Compute(T x, T y) const { return x & y; } + template <typename T> static T Compute(T x, T y) { return x & y; } HConstant* Evaluate(HIntConstant* x, HIntConstant* y) const OVERRIDE { return GetBlock()->GetGraph()->GetIntConstant( @@ -4668,7 +4668,7 @@ class HOr FINAL : public HBinaryOperation { bool IsCommutative() const OVERRIDE { return true; } - template <typename T> T Compute(T x, T y) const { return x | y; } + template <typename T> static T Compute(T x, T y) { return x | y; } HConstant* Evaluate(HIntConstant* x, HIntConstant* y) const OVERRIDE { return GetBlock()->GetGraph()->GetIntConstant( @@ -4705,7 +4705,7 @@ class HXor FINAL : public HBinaryOperation { bool IsCommutative() const OVERRIDE { return true; } - template <typename T> T Compute(T x, T y) const { return x ^ y; } + template <typename T> static T Compute(T x, T y) { return x ^ y; } HConstant* Evaluate(HIntConstant* x, HIntConstant* y) const OVERRIDE { return GetBlock()->GetGraph()->GetIntConstant( @@ -4741,7 +4741,7 @@ class HRor FINAL : public HBinaryOperation { } template <typename T> - T Compute(T value, int32_t distance, int32_t max_shift_value) const { + static T Compute(T value, int32_t distance, int32_t max_shift_value) { typedef typename std::make_unsigned<T>::type V; V ux = static_cast<V>(value); if ((distance & max_shift_value) == 0) { @@ -4837,7 +4837,7 @@ class HNot FINAL : public HUnaryOperation { return true; } - template <typename T> T Compute(T x) const { return ~x; } + template <typename T> static T Compute(T x) { return ~x; } HConstant* Evaluate(HIntConstant* x) const OVERRIDE { return GetBlock()->GetGraph()->GetIntConstant(Compute(x->GetValue()), GetDexPc()); @@ -4870,7 +4870,7 @@ class HBooleanNot FINAL : public HUnaryOperation { return true; } - template <typename T> bool Compute(T x) const { + template <typename T> static bool Compute(T x) { DCHECK(IsUint<1>(x)) << x; return !x; } |