Index: src/hydrogen-instructions.cc |
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc |
index 9209b88732538416919054f86750ecce775d3104..173a316847f669b324d08d13ed4f1e9b1d56d997 100644 |
--- a/src/hydrogen-instructions.cc |
+++ b/src/hydrogen-instructions.cc |
@@ -525,6 +525,15 @@ void HValue::SetBlock(HBasicBlock* block) { |
} |
+OStream& operator<<(OStream& os, const HValue& v) { |
+ // TODO(svenpanne) Temporary impedance matching, to be removed later. |
+ HeapStringAllocator allocator; |
+ StringStream stream(&allocator); |
+ const_cast<HValue*>(&v)->PrintTo(&stream); |
+ return os << stream.ToCString().get(); |
+} |
+ |
+ |
void HValue::PrintTypeTo(StringStream* stream) { |
if (!representation().IsTagged() || type().Equals(HType::Tagged())) return; |
stream->Add(" type:%s", type().ToString()); |
@@ -1214,8 +1223,9 @@ bool HBranch::KnownSuccessorBlock(HBasicBlock** block) { |
void HBranch::PrintDataTo(StringStream* stream) { |
HUnaryControlInstruction::PrintDataTo(stream); |
- stream->Add(" "); |
- expected_input_types().Print(stream); |
+ OStringStream os; |
+ os << " " << expected_input_types(); |
+ stream->Add(os.c_str()); |
} |