Chromium Code Reviews| Index: runtime/vm/assembler_mips.h |
| diff --git a/runtime/vm/assembler_mips.h b/runtime/vm/assembler_mips.h |
| index 2236b7fc3d8b6fe6766d4731c71a057ecbdede2f..117f8f9188ea6b113fcbea99baf1ba2454460f22 100644 |
| --- a/runtime/vm/assembler_mips.h |
| +++ b/runtime/vm/assembler_mips.h |
| @@ -177,6 +177,12 @@ class Condition : public ValueObject { |
| bits_ = RelOpBits::update(value, bits_); |
| } |
| + void SetToInvalidState() { |
|
Vyacheslav Egorov (Google)
2017/06/15 11:32:46
Maybe this method should be private?
erikcorry
2017/06/19 07:15:08
Done.
|
| + bits_ = RelOpBits::update(INVALID_RELATION, bits_); |
| + } |
| + |
| + bool IsValid() { return rel_op() != INVALID_RELATION; } |
| + |
| // Uninitialized condition. |
| Condition() : ValueObject(), bits_(0) {} |
|
Vyacheslav Egorov (Google)
2017/06/15 11:32:46
I would suggest that this one sets bits_ to invali
erikcorry
2017/06/19 07:15:09
Done.
|
| @@ -200,7 +206,11 @@ class Condition : public ValueObject { |
| ASSERT((imm != 0) == ((left == IMM) || (right == IMM))); |
| set_left(left); |
| set_right(right); |
| - set_rel_op(rel_op); |
| + if (rel_op == INVALID_RELATION) { |
|
Vyacheslav Egorov (Google)
2017/06/15 11:32:46
... and here ASSERT(rel_op != INVALID_RELATION)
erikcorry
2017/06/19 07:15:09
I put the assert in the getters for the register n
|
| + SetToInvalidState(); |
| + } else { |
| + set_rel_op(rel_op); |
| + } |
| set_imm(imm); |
| } |