RFR: ShenandoahSupport: fix precedence and opcode check

Aleksey Shipilev shade at redhat.com
Wed Mar 22 09:58:46 UTC 2017


Hi Roland,

MSVC found these pitfalls:

diff -r 97aced46ce30 src/share/vm/opto/shenandoahSupport.cpp
--- a/src/share/vm/opto/shenandoahSupport.cpp   Tue Mar 21 22:47:25 2017 +0100
+++ b/src/share/vm/opto/shenandoahSupport.cpp   Wed Mar 22 10:36:59 2017 +0100
@@ -21,6 +21,7 @@
  *
  */

+#include "precompiled.hpp"
 #include "gc/shenandoah/brooksPointer.hpp"
 #include "gc/shenandoah/shenandoahHeap.hpp"
 #include "gc/shenandoah/shenandoahHeapRegion.hpp"
@@ -413,7 +414,7 @@

 bool ShenandoahWriteBarrierNode::is_evacuation_in_progress_test(Node* iff) {
   assert(iff->is_If(), "bad input");
-  if (!iff->Opcode() == Op_If) {
+  if (iff->Opcode() != Op_If) {
     return false;
   }
   Node* bol = iff->in(1);
@@ -2080,7 +2081,7 @@
         if (ctrl->is_Proj() &&
             ctrl->in(0)->is_Call() &&
             ctrl->unique_ctrl_out() != NULL &&
-            ctrl->unique_ctrl_out()->Opcode() == Op_Catch &
+            ctrl->unique_ctrl_out()->Opcode() == Op_Catch &&
             !phase->is_dominator(val_ctrl, ctrl->in(0)->in(0))) {
           continue;
         }


Do you agree with the fixes?

Thanks,
-Aleksey



More information about the shenandoah-dev mailing list