Commit 17748912 authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

[turbofan] Fix concatenation in parameter printing

... and make the printing more consistent.

Bug: v8:9518
Change-Id: I6e8b595124974ec7f8e5003624bd33d2b0787ac0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1864948Reviewed-by: 's avatarMichael Stanton <mvstanton@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Auto-Submit: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64450}
parent 419b4e7e
......@@ -60,7 +60,7 @@ TrapId TrapIdOf(const Operator* const op) {
}
std::ostream& operator<<(std::ostream& os, BranchOperatorInfo info) {
return os << info.hint << "|" << info.is_safety_check;
return os << info.hint << ", " << info.is_safety_check;
}
const BranchOperatorInfo& BranchOperatorInfoOf(const Operator* const op) {
......@@ -105,11 +105,8 @@ size_t hash_value(DeoptimizeParameters p) {
}
std::ostream& operator<<(std::ostream& os, DeoptimizeParameters p) {
os << p.kind() << ":" << p.reason() << ":" << p.is_safety_check();
if (p.feedback().IsValid()) {
os << "; " << p.feedback();
}
return os;
return os << p.kind() << ", " << p.reason() << ", " << p.is_safety_check()
<< ", " << p.feedback();
}
DeoptimizeParameters const& DeoptimizeParametersOf(Operator const* const op) {
......@@ -169,7 +166,7 @@ size_t hash_value(SelectParameters const& p) {
std::ostream& operator<<(std::ostream& os, SelectParameters const& p) {
return os << p.representation() << "|" << p.hint();
return os << p.representation() << ", " << p.hint();
}
......@@ -222,13 +219,13 @@ size_t hash_value(ParameterInfo const& p) { return p.index(); }
std::ostream& operator<<(std::ostream& os, ParameterInfo const& i) {
if (i.debug_name()) os << i.debug_name() << '#';
os << i.index();
if (i.debug_name()) os << ", debug name: " << i.debug_name();
return os;
}
std::ostream& operator<<(std::ostream& os, ObjectStateInfo const& i) {
return os << "id:" << i.object_id() << "|size:" << i.size();
return os << "id:" << i.object_id() << ", size:" << i.size();
}
size_t hash_value(ObjectStateInfo const& p) {
......@@ -236,7 +233,7 @@ size_t hash_value(ObjectStateInfo const& p) {
}
std::ostream& operator<<(std::ostream& os, TypedObjectStateInfo const& i) {
return os << "id:" << i.object_id() << "|" << i.machine_types();
return os << "id:" << i.object_id() << ", " << i.machine_types();
}
size_t hash_value(TypedObjectStateInfo const& p) {
......@@ -260,7 +257,7 @@ size_t hash_value(RelocatablePtrConstantInfo const& p) {
std::ostream& operator<<(std::ostream& os,
RelocatablePtrConstantInfo const& p) {
return os << p.value() << "|" << p.rmode() << "|" << p.type();
return os << p.value() << ", " << p.rmode() << ", " << p.type();
}
SparseInputMask::InputIterator::InputIterator(
......@@ -360,7 +357,7 @@ size_t hash_value(TypedStateValueInfo const& p) {
}
std::ostream& operator<<(std::ostream& os, TypedStateValueInfo const& p) {
return os << p.machine_types() << "|" << p.sparse_input_mask();
return os << p.machine_types() << ", " << p.sparse_input_mask();
}
size_t hash_value(RegionObservability observability) {
......
......@@ -225,7 +225,7 @@ size_t hash_value(FeedbackParameter const& p) {
}
std::ostream& operator<<(std::ostream& os, FeedbackParameter const& p) {
return os;
return os << p.feedback();
}
FeedbackParameter const& FeedbackParameterOf(const Operator* op) {
......@@ -436,7 +436,7 @@ size_t hash_value(CreateCollectionIteratorParameters const& p) {
std::ostream& operator<<(std::ostream& os,
CreateCollectionIteratorParameters const& p) {
return os << p.collection_kind() << " " << p.iteration_kind();
return os << p.collection_kind() << ", " << p.iteration_kind();
}
const CreateCollectionIteratorParameters& CreateCollectionIteratorParametersOf(
......
......@@ -29,8 +29,7 @@ size_t hash_value(StoreRepresentation rep) {
std::ostream& operator<<(std::ostream& os, StoreRepresentation rep) {
return os << "(" << rep.representation() << " : " << rep.write_barrier_kind()
<< ")";
return os << rep.representation() << ", " << rep.write_barrier_kind();
}
......@@ -71,7 +70,7 @@ size_t hash_value(StackSlotRepresentation rep) {
}
std::ostream& operator<<(std::ostream& os, StackSlotRepresentation rep) {
return os << "(" << rep.size() << " : " << rep.alignment() << ")";
return os << rep.size() << ", " << rep.alignment();
}
StackSlotRepresentation const& StackSlotRepresentationOf(Operator const* op) {
......
......@@ -218,9 +218,7 @@ CheckFloat64HoleParameters const& CheckFloat64HoleParametersOf(
std::ostream& operator<<(std::ostream& os,
CheckFloat64HoleParameters const& params) {
os << params.mode();
if (params.feedback().IsValid()) os << "; " << params.feedback();
return os;
return os << params.mode() << ", " << params.feedback();
}
size_t hash_value(const CheckFloat64HoleParameters& params) {
......@@ -259,13 +257,11 @@ std::ostream& operator<<(std::ostream& os, CheckForMinusZeroMode mode) {
}
std::ostream& operator<<(std::ostream& os, CheckMapsFlags flags) {
bool empty = true;
if (flags & CheckMapsFlag::kTryMigrateInstance) {
os << "TryMigrateInstance";
empty = false;
return os << "TryMigrateInstance";
} else {
return os << "None";
}
if (empty) os << "None";
return os;
}
bool operator==(CheckMapsParameters const& lhs,
......@@ -280,11 +276,7 @@ size_t hash_value(CheckMapsParameters const& p) {
}
std::ostream& operator<<(std::ostream& os, CheckMapsParameters const& p) {
os << p.flags() << p.maps();
if (p.feedback().IsValid()) {
os << "; " << p.feedback();
}
return os;
return os << p.flags() << ", " << p.maps() << ", " << p.feedback();
}
CheckMapsParameters const& CheckMapsParametersOf(Operator const* op) {
......@@ -338,11 +330,7 @@ inline size_t hash_value(const GrowFastElementsParameters& params) {
std::ostream& operator<<(std::ostream& os,
const GrowFastElementsParameters& params) {
os << params.mode();
if (params.feedback().IsValid()) {
os << params.feedback();
}
return os;
return os << params.mode() << ", " << params.feedback();
}
const GrowFastElementsParameters& GrowFastElementsParametersOf(
......@@ -583,7 +571,7 @@ size_t hash_value(NumberOperationParameters const& p) {
}
std::ostream& operator<<(std::ostream& os, NumberOperationParameters const& p) {
return os << p.hint() << " " << p.feedback();
return os << p.hint() << ", " << p.feedback();
}
NumberOperationParameters const& NumberOperationParametersOf(
......@@ -640,11 +628,7 @@ const CheckTaggedInputParameters& CheckTaggedInputParametersOf(
std::ostream& operator<<(std::ostream& os,
const CheckTaggedInputParameters& params) {
os << params.mode();
if (params.feedback().IsValid()) {
os << "; " << params.feedback();
}
return os;
return os << params.mode() << ", " << params.feedback();
}
size_t hash_value(const CheckTaggedInputParameters& params) {
......@@ -667,11 +651,7 @@ const CheckMinusZeroParameters& CheckMinusZeroParametersOf(const Operator* op) {
std::ostream& operator<<(std::ostream& os,
const CheckMinusZeroParameters& params) {
os << params.mode();
if (params.feedback().IsValid()) {
os << "; " << params.feedback();
}
return os;
return os << params.mode() << ", " << params.feedback();
}
size_t hash_value(const CheckMinusZeroParameters& params) {
......@@ -1629,7 +1609,7 @@ size_t hash_value(CheckBoundsParameters const& p) {
}
std::ostream& operator<<(std::ostream& os, CheckBoundsParameters const& p) {
os << p.check_parameters() << ",";
os << p.check_parameters() << ", ";
switch (p.mode()) {
case CheckBoundsParameters::kDeoptOnOutOfBounds:
os << "deopt";
......@@ -1656,7 +1636,7 @@ size_t hash_value(CheckIfParameters const& p) {
}
std::ostream& operator<<(std::ostream& os, CheckIfParameters const& p) {
return os << p.reason() << p.feedback();
return os << p.reason() << ", " << p.feedback();
}
CheckIfParameters const& CheckIfParametersOf(Operator const* op) {
......
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