Commit 0d3413f8 authored by bgeron's avatar bgeron Committed by Commit bot

Print MachineTypes when using --trace-turbo-graph.

Previously, ZoneVector<MachineType>* printed just as a pointer; now we
print each MachineType in it, separated by commas.

BUG=

Review-Url: https://codereview.chromium.org/2030323002
Cr-Commit-Position: refs/heads/master@{#36736}
parent 960a87bb
......@@ -167,6 +167,20 @@ std::ostream& operator<<(std::ostream& os,
return os << p.value() << "|" << p.rmode() << "|" << p.type();
}
std::ostream& operator<<(std::ostream& os,
const ZoneVector<MachineType>* types) {
// Print all the MachineTypes, separated by commas.
bool first = true;
for (MachineType elem : *types) {
if (!first) {
os << ", ";
}
first = false;
os << elem;
}
return os;
}
#define CACHED_OP_LIST(V) \
V(Dead, Operator::kFoldable, 0, 0, 0, 1, 1, 1) \
V(DeoptimizeIf, Operator::kFoldable, 2, 1, 1, 0, 1, 1) \
......
......@@ -136,6 +136,8 @@ bool operator!=(RelocatablePtrConstantInfo const& lhs,
RelocatablePtrConstantInfo const& rhs);
std::ostream& operator<<(std::ostream&, RelocatablePtrConstantInfo const&);
size_t hash_value(RelocatablePtrConstantInfo const& p);
std::ostream& operator<<(std::ostream& os,
const ZoneVector<MachineType>* types);
// Interface for building common operators that can be used at any level of IR,
// including JavaScript, mid-level, and low-level.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment