Bug 1310155 - IonMonkey, part 0.2: Make sure debug_check_operand works again, r=nbp
authorHannes Verschore <hv1989@gmail.com>
Thu, 08 Dec 2016 13:53:03 -1000
changeset 325457 1e24f4d1c415a49452226305d1304ce6b5dc5a97
parent 325456 a0625815bdd078d2a2519ecac5a21691f3772538
child 325458 3daa33144b64225d2a36c4eb579a682a9ecfc6b3
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
reviewersnbp
bugs1310155
milestone53.0a1
Bug 1310155 - IonMonkey, part 0.2: Make sure debug_check_operand works again, r=nbp
js/src/jit/IonAnalysis.cpp
--- a/js/src/jit/IonAnalysis.cpp
+++ b/js/src/jit/IonAnalysis.cpp
@@ -2605,39 +2605,41 @@ static void
 CheckOperand(const MNode* consumer, const MUse* use, int32_t* usesBalance)
 {
     MOZ_ASSERT(use->hasProducer());
     MDefinition* producer = use->producer();
     MOZ_ASSERT(!producer->isDiscarded());
     MOZ_ASSERT(producer->block() != nullptr);
     MOZ_ASSERT(use->consumer() == consumer);
 #ifdef _DEBUG_CHECK_OPERANDS_USES_BALANCE
-    fprintf(stderr, "==Check Operand\n");
-    use->producer()->dump(stderr);
-    fprintf(stderr, "  index: %" PRIuSIZE "\n", use->consumer()->indexOf(use));
-    use->consumer()->dump(stderr);
-    fprintf(stderr, "==End\n");
+    Fprinter print(stderr);
+    print.printf("==Check Operand\n");
+    use->producer()->dump(print);
+    print.printf("  index: %" PRIuSIZE "\n", use->consumer()->indexOf(use));
+    use->consumer()->dump(print);
+    print.printf("==End\n");
 #endif
     --*usesBalance;
 }
 
 static void
 CheckUse(const MDefinition* producer, const MUse* use, int32_t* usesBalance)
 {
     MOZ_ASSERT(!use->consumer()->block()->isDead());
     MOZ_ASSERT_IF(use->consumer()->isDefinition(),
                   !use->consumer()->toDefinition()->isDiscarded());
     MOZ_ASSERT(use->consumer()->block() != nullptr);
     MOZ_ASSERT(use->consumer()->getOperand(use->index()) == producer);
 #ifdef _DEBUG_CHECK_OPERANDS_USES_BALANCE
-    fprintf(stderr, "==Check Use\n");
-    use->producer()->dump(stderr);
-    fprintf(stderr, "  index: %" PRIuSIZE "\n", use->consumer()->indexOf(use));
-    use->consumer()->dump(stderr);
-    fprintf(stderr, "==End\n");
+    Fprinter print(stderr);
+    print.printf("==Check Use\n");
+    use->producer()->dump(print);
+    print.printf("  index: %" PRIuSIZE "\n", use->consumer()->indexOf(use));
+    use->consumer()->dump(print);
+    print.printf("==End\n");
 #endif
     ++*usesBalance;
 }
 
 // To properly encode entry resume points, we have to ensure that all the
 // operands of the entry resume point are located before the safeInsertTop
 // location.
 static void