Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(268)

Unified Diff: runtime/vm/il_printer.cc

Issue 2974233002: VM: Re-format to use at most one newline between functions (Closed)
Patch Set: Rebase and merge Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/il_printer.h ('k') | runtime/vm/instructions_arm.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/il_printer.cc
diff --git a/runtime/vm/il_printer.cc b/runtime/vm/il_printer.cc
index 653d564e6a8feb722191aa3a05cbafd76556c4ea..d46c8ec54d298bc0867cc32cac64a6c5b3649faa 100644
--- a/runtime/vm/il_printer.cc
+++ b/runtime/vm/il_printer.cc
@@ -32,7 +32,6 @@ void BufferFormatter::Print(const char* format, ...) {
va_end(args);
}
-
void BufferFormatter::VPrint(const char* format, va_list args) {
intptr_t available = size_ - position_;
if (available <= 0) return;
@@ -42,7 +41,6 @@ void BufferFormatter::VPrint(const char* format, va_list args) {
}
}
-
// Checks whether function's name matches the given filter, which is
// a comma-separated list of strings.
bool FlowGraphPrinter::PassesFilter(const char* filter,
@@ -83,12 +81,10 @@ bool FlowGraphPrinter::PassesFilter(const char* filter,
return found;
}
-
bool FlowGraphPrinter::ShouldPrint(const Function& function) {
return PassesFilter(FLAG_print_flow_graph_filter, function);
}
-
void FlowGraphPrinter::PrintGraph(const char* phase, FlowGraph* flow_graph) {
LogBlock lb;
THR_Print("*** BEGIN CFG\n%s\n", phase);
@@ -98,7 +94,6 @@ void FlowGraphPrinter::PrintGraph(const char* phase, FlowGraph* flow_graph) {
fflush(stdout);
}
-
void FlowGraphPrinter::PrintBlock(BlockEntryInstr* block,
bool print_locations) {
// Print the block entry.
@@ -112,7 +107,6 @@ void FlowGraphPrinter::PrintBlock(BlockEntryInstr* block,
}
}
-
void FlowGraphPrinter::PrintBlocks() {
if (!function_.IsNull()) {
THR_Print("==== %s\n", function_.ToFullyQualifiedCString());
@@ -123,12 +117,10 @@ void FlowGraphPrinter::PrintBlocks() {
}
}
-
void FlowGraphPrinter::PrintInstruction(Instruction* instr) {
PrintOneInstruction(instr, print_locations_);
}
-
void FlowGraphPrinter::PrintOneInstruction(Instruction* instr,
bool print_locations) {
char str[4000];
@@ -150,7 +142,6 @@ void FlowGraphPrinter::PrintOneInstruction(Instruction* instr,
}
}
-
void FlowGraphPrinter::PrintTypeCheck(const ParsedFunction& parsed_function,
TokenPosition token_pos,
Value* value,
@@ -169,7 +160,6 @@ void FlowGraphPrinter::PrintTypeCheck(const ParsedFunction& parsed_function,
String::Handle(dst_type.Name()).ToCString(), dst_name.ToCString());
}
-
void CompileType::PrintTo(BufferFormatter* f) const {
const char* type_name = "?";
if ((cid_ != kIllegalCid) && (cid_ != kDynamicCid)) {
@@ -186,7 +176,6 @@ void CompileType::PrintTo(BufferFormatter* f) const {
f->Print("T{%s%s}", type_name, is_nullable_ ? "?" : "");
}
-
const char* CompileType::ToCString() const {
char buffer[1024];
BufferFormatter f(buffer, sizeof(buffer));
@@ -194,7 +183,6 @@ const char* CompileType::ToCString() const {
return Thread::Current()->zone()->MakeCopyOfString(buffer);
}
-
static void PrintTargetsHelper(BufferFormatter* f,
const CallTargets& targets,
intptr_t num_checks_to_print) {
@@ -231,7 +219,6 @@ static void PrintTargetsHelper(BufferFormatter* f,
f->Print("]");
}
-
static void PrintCidsHelper(BufferFormatter* f,
const Cids& targets,
intptr_t num_checks_to_print) {
@@ -261,7 +248,6 @@ static void PrintCidsHelper(BufferFormatter* f,
f->Print("]");
}
-
static void PrintICDataHelper(BufferFormatter* f,
const ICData& ic_data,
intptr_t num_checks_to_print) {
@@ -295,7 +281,6 @@ static void PrintICDataHelper(BufferFormatter* f,
f->Print("]");
}
-
static void PrintICDataSortedHelper(BufferFormatter* f,
const ICData& ic_data_orig) {
const ICData& ic_data =
@@ -311,7 +296,6 @@ static void PrintICDataSortedHelper(BufferFormatter* f,
f->Print("]");
}
-
void FlowGraphPrinter::PrintICData(const ICData& ic_data,
intptr_t num_checks_to_print) {
char buffer[1024];
@@ -322,7 +306,6 @@ void FlowGraphPrinter::PrintICData(const ICData& ic_data,
THR_Print(" arg-desc %" Pd "\n", a.Length());
}
-
void FlowGraphPrinter::PrintCidRangeData(const CallTargets& targets,
intptr_t num_checks_to_print) {
char buffer[1024];
@@ -332,7 +315,6 @@ void FlowGraphPrinter::PrintCidRangeData(const CallTargets& targets,
// TODO(erikcorry): Print args descriptor.
}
-
static void PrintUse(BufferFormatter* f, const Definition& definition) {
if (definition.HasSSATemp()) {
if (definition.HasPairRepresentation()) {
@@ -346,7 +328,6 @@ static void PrintUse(BufferFormatter* f, const Definition& definition) {
}
}
-
const char* Instruction::ToCString() const {
char buffer[1024];
BufferFormatter f(buffer, sizeof(buffer));
@@ -354,7 +335,6 @@ const char* Instruction::ToCString() const {
return Thread::Current()->zone()->MakeCopyOfString(buffer);
}
-
void Instruction::PrintTo(BufferFormatter* f) const {
if (GetDeoptId() != Thread::kNoDeoptId) {
f->Print("%s:%" Pd "(", DebugName(), GetDeoptId());
@@ -365,7 +345,6 @@ void Instruction::PrintTo(BufferFormatter* f) const {
f->Print(")");
}
-
void Instruction::PrintOperandsTo(BufferFormatter* f) const {
for (int i = 0; i < InputCount(); ++i) {
if (i > 0) f->Print(", ");
@@ -373,7 +352,6 @@ void Instruction::PrintOperandsTo(BufferFormatter* f) const {
}
}
-
void Definition::PrintTo(BufferFormatter* f) const {
PrintUse(f, *this);
if (HasSSATemp() || HasTemp()) f->Print(" <- ");
@@ -396,7 +374,6 @@ void Definition::PrintTo(BufferFormatter* f) const {
}
}
-
void Definition::PrintOperandsTo(BufferFormatter* f) const {
for (int i = 0; i < InputCount(); ++i) {
if (i > 0) f->Print(", ");
@@ -406,7 +383,6 @@ void Definition::PrintOperandsTo(BufferFormatter* f) const {
}
}
-
void Value::PrintTo(BufferFormatter* f) const {
PrintUse(f, *definition());
@@ -416,7 +392,6 @@ void Value::PrintTo(BufferFormatter* f) const {
}
}
-
void ConstantInstr::PrintOperandsTo(BufferFormatter* f) const {
const char* cstr = value().ToCString();
const char* new_line = strchr(cstr, '\n');
@@ -431,14 +406,12 @@ void ConstantInstr::PrintOperandsTo(BufferFormatter* f) const {
}
}
-
void ConstraintInstr::PrintOperandsTo(BufferFormatter* f) const {
value()->PrintTo(f);
f->Print(" ^ ");
constraint()->PrintTo(f);
}
-
void Range::PrintTo(BufferFormatter* f) const {
f->Print("[");
min_.PrintTo(f);
@@ -447,7 +420,6 @@ void Range::PrintTo(BufferFormatter* f) const {
f->Print("]");
}
-
const char* Range::ToCString(const Range* range) {
if (range == NULL) return "[_|_, _|_]";
@@ -457,7 +429,6 @@ const char* Range::ToCString(const Range* range) {
return Thread::Current()->zone()->MakeCopyOfString(buffer);
}
-
void RangeBoundary::PrintTo(BufferFormatter* f) const {
switch (kind_) {
case kSymbol:
@@ -480,7 +451,6 @@ void RangeBoundary::PrintTo(BufferFormatter* f) const {
}
}
-
const char* RangeBoundary::ToCString() const {
char buffer[256];
BufferFormatter f(buffer, sizeof(buffer));
@@ -488,7 +458,6 @@ const char* RangeBoundary::ToCString() const {
return Thread::Current()->zone()->MakeCopyOfString(buffer);
}
-
void DropTempsInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("%" Pd "", num_temps());
if (value() != NULL) {
@@ -497,7 +466,6 @@ void DropTempsInstr::PrintOperandsTo(BufferFormatter* f) const {
}
}
-
void AssertAssignableInstr::PrintOperandsTo(BufferFormatter* f) const {
value()->PrintTo(f);
f->Print(", %s, '%s',", dst_type().ToCString(), dst_name().ToCString());
@@ -508,12 +476,10 @@ void AssertAssignableInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print(")");
}
-
void AssertBooleanInstr::PrintOperandsTo(BufferFormatter* f) const {
value()->PrintTo(f);
}
-
void ClosureCallInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print(" function=");
InputAt(0)->PrintTo(f);
@@ -524,7 +490,6 @@ void ClosureCallInstr::PrintOperandsTo(BufferFormatter* f) const {
}
}
-
void InstanceCallInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print(" %s<%" Pd ">", function_name().ToCString(), type_args_len());
for (intptr_t i = 0; i < ArgumentCount(); ++i) {
@@ -540,7 +505,6 @@ void InstanceCallInstr::PrintOperandsTo(BufferFormatter* f) const {
}
}
-
void PolymorphicInstanceCallInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print(" %s<%" Pd ">", instance_call()->function_name().ToCString(),
instance_call()->type_args_len());
@@ -554,7 +518,6 @@ void PolymorphicInstanceCallInstr::PrintOperandsTo(BufferFormatter* f) const {
}
}
-
void StrictCompareInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("%s, ", Token::Str(kind()));
left()->PrintTo(f);
@@ -565,7 +528,6 @@ void StrictCompareInstr::PrintOperandsTo(BufferFormatter* f) const {
}
}
-
void TestCidsInstr::PrintOperandsTo(BufferFormatter* f) const {
left()->PrintTo(f);
f->Print(" %s [", Token::Str(kind()));
@@ -584,14 +546,12 @@ void TestCidsInstr::PrintOperandsTo(BufferFormatter* f) const {
}
}
-
void EqualityCompareInstr::PrintOperandsTo(BufferFormatter* f) const {
left()->PrintTo(f);
f->Print(" %s ", Token::Str(kind()));
right()->PrintTo(f);
}
-
void StaticCallInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print(" %s<%" Pd "> ", String::Handle(function().name()).ToCString(),
type_args_len());
@@ -601,30 +561,25 @@ void StaticCallInstr::PrintOperandsTo(BufferFormatter* f) const {
}
}
-
void LoadLocalInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("%s @%d", local().name().ToCString(), local().index());
}
-
void StoreLocalInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("%s @%d, ", local().name().ToCString(), local().index());
value()->PrintTo(f);
}
-
void NativeCallInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("%s", native_name().ToCString());
}
-
void GuardFieldInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("%s %s, ", String::Handle(field().name()).ToCString(),
field().GuardedPropertiesAsCString());
value()->PrintTo(f);
}
-
void StoreInstanceFieldInstr::PrintOperandsTo(BufferFormatter* f) const {
if (field().IsNull()) {
f->Print("{%" Pd "}, ", offset_in_bytes());
@@ -637,24 +592,20 @@ void StoreInstanceFieldInstr::PrintOperandsTo(BufferFormatter* f) const {
value()->PrintTo(f);
}
-
void IfThenElseInstr::PrintOperandsTo(BufferFormatter* f) const {
comparison()->PrintOperandsTo(f);
f->Print(" ? %" Pd " : %" Pd, if_true_, if_false_);
}
-
void LoadStaticFieldInstr::PrintOperandsTo(BufferFormatter* f) const {
field_value()->PrintTo(f);
}
-
void StoreStaticFieldInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("%s, ", String::Handle(field().name()).ToCString());
value()->PrintTo(f);
}
-
void InstanceOfInstr::PrintOperandsTo(BufferFormatter* f) const {
value()->PrintTo(f);
f->Print(" IS %s,", String::Handle(type().Name()).ToCString());
@@ -665,7 +616,6 @@ void InstanceOfInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print(")");
}
-
void RelationalOpInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("%s, ", Token::Str(kind()));
left()->PrintTo(f);
@@ -673,7 +623,6 @@ void RelationalOpInstr::PrintOperandsTo(BufferFormatter* f) const {
right()->PrintTo(f);
}
-
void AllocateObjectInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("%s", String::Handle(cls().ScrubbedName()).ToCString());
for (intptr_t i = 0; i < ArgumentCount(); i++) {
@@ -686,7 +635,6 @@ void AllocateObjectInstr::PrintOperandsTo(BufferFormatter* f) const {
}
}
-
void MaterializeObjectInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("%s", String::Handle(cls_.ScrubbedName()).ToCString());
for (intptr_t i = 0; i < InputCount(); i++) {
@@ -696,7 +644,6 @@ void MaterializeObjectInstr::PrintOperandsTo(BufferFormatter* f) const {
}
}
-
void LoadFieldInstr::PrintOperandsTo(BufferFormatter* f) const {
instance()->PrintTo(f);
f->Print(", %" Pd, offset_in_bytes());
@@ -717,7 +664,6 @@ void LoadFieldInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print(", immutable=%d", immutable_);
}
-
void InstantiateTypeInstr::PrintOperandsTo(BufferFormatter* f) const {
const String& type_name = String::Handle(type().Name());
f->Print("%s,", type_name.ToCString());
@@ -728,7 +674,6 @@ void InstantiateTypeInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print(")");
}
-
void InstantiateTypeArgumentsInstr::PrintOperandsTo(BufferFormatter* f) const {
const String& type_args = String::Handle(type_arguments().Name());
f->Print("%s,", type_args.ToCString());
@@ -739,12 +684,10 @@ void InstantiateTypeArgumentsInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print(")");
}
-
void AllocateContextInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("%" Pd "", num_context_variables());
}
-
void AllocateUninitializedContextInstr::PrintOperandsTo(
BufferFormatter* f) const {
f->Print("%" Pd "", num_context_variables());
@@ -754,30 +697,25 @@ void AllocateUninitializedContextInstr::PrintOperandsTo(
}
}
-
void MathUnaryInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("'%s', ", MathUnaryInstr::KindToCString(kind()));
value()->PrintTo(f);
}
-
void TruncDivModInstr::PrintOperandsTo(BufferFormatter* f) const {
Definition::PrintOperandsTo(f);
}
-
void ExtractNthOutputInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("Extract %" Pd " from ", index());
Definition::PrintOperandsTo(f);
}
-
void UnaryIntegerOpInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("%s, ", Token::Str(op_kind()));
value()->PrintTo(f);
}
-
void CheckedSmiOpInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("%s", Token::Str(op_kind()));
f->Print(", ");
@@ -786,7 +724,6 @@ void CheckedSmiOpInstr::PrintOperandsTo(BufferFormatter* f) const {
right()->PrintTo(f);
}
-
void CheckedSmiComparisonInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("%s", Token::Str(kind()));
f->Print(", ");
@@ -795,7 +732,6 @@ void CheckedSmiComparisonInstr::PrintOperandsTo(BufferFormatter* f) const {
right()->PrintTo(f);
}
-
void BinaryIntegerOpInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("%s", Token::Str(op_kind()));
if (is_truncating()) {
@@ -809,7 +745,6 @@ void BinaryIntegerOpInstr::PrintOperandsTo(BufferFormatter* f) const {
right()->PrintTo(f);
}
-
void BinaryDoubleOpInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("%s, ", Token::Str(op_kind()));
left()->PrintTo(f);
@@ -817,7 +752,6 @@ void BinaryDoubleOpInstr::PrintOperandsTo(BufferFormatter* f) const {
right()->PrintTo(f);
}
-
void DoubleTestOpInstr::PrintOperandsTo(BufferFormatter* f) const {
switch (op_kind()) {
case MethodRecognizer::kDouble_getIsNaN:
@@ -832,7 +766,6 @@ void DoubleTestOpInstr::PrintOperandsTo(BufferFormatter* f) const {
value()->PrintTo(f);
}
-
void BinaryFloat32x4OpInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("%s, ", Token::Str(op_kind()));
left()->PrintTo(f);
@@ -840,7 +773,6 @@ void BinaryFloat32x4OpInstr::PrintOperandsTo(BufferFormatter* f) const {
right()->PrintTo(f);
}
-
void BinaryFloat64x2OpInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("%s, ", Token::Str(op_kind()));
left()->PrintTo(f);
@@ -848,14 +780,12 @@ void BinaryFloat64x2OpInstr::PrintOperandsTo(BufferFormatter* f) const {
right()->PrintTo(f);
}
-
void Simd32x4ShuffleInstr::PrintOperandsTo(BufferFormatter* f) const {
// TODO(johnmccutchan): Add proper string enumeration of shuffle.
f->Print("%s, ", MethodRecognizer::KindToCString(op_kind()));
value()->PrintTo(f);
}
-
void Simd32x4ShuffleMixInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("%s, ", MethodRecognizer::KindToCString(op_kind()));
xy()->PrintTo(f);
@@ -863,7 +793,6 @@ void Simd32x4ShuffleMixInstr::PrintOperandsTo(BufferFormatter* f) const {
zw()->PrintTo(f);
}
-
void Simd32x4GetSignMaskInstr::PrintOperandsTo(BufferFormatter* f) const {
if (op_kind() == MethodRecognizer::kFloat32x4GetSignMask) {
f->Print("Float32x4.getSignMask ");
@@ -874,13 +803,11 @@ void Simd32x4GetSignMaskInstr::PrintOperandsTo(BufferFormatter* f) const {
value()->PrintTo(f);
}
-
void Float32x4SplatInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("SPLAT ");
value()->PrintTo(f);
}
-
void Float32x4ConstructorInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("Float32x4(");
value0()->PrintTo(f);
@@ -893,7 +820,6 @@ void Float32x4ConstructorInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print(")");
}
-
void Float32x4ComparisonInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("Float32x4 Comparison %s, ",
MethodRecognizer::KindToCString(op_kind()));
@@ -902,7 +828,6 @@ void Float32x4ComparisonInstr::PrintOperandsTo(BufferFormatter* f) const {
right()->PrintTo(f);
}
-
void Float32x4MinMaxInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("%s, ", MethodRecognizer::KindToCString(op_kind()));
left()->PrintTo(f);
@@ -910,13 +835,11 @@ void Float32x4MinMaxInstr::PrintOperandsTo(BufferFormatter* f) const {
right()->PrintTo(f);
}
-
void Float32x4SqrtInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("%s, ", MethodRecognizer::KindToCString(op_kind()));
left()->PrintTo(f);
}
-
void Float32x4ScaleInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("%s, ", MethodRecognizer::KindToCString(op_kind()));
left()->PrintTo(f);
@@ -924,19 +847,16 @@ void Float32x4ScaleInstr::PrintOperandsTo(BufferFormatter* f) const {
right()->PrintTo(f);
}
-
void Float32x4ZeroArgInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("%s, ", MethodRecognizer::KindToCString(op_kind()));
left()->PrintTo(f);
}
-
void Float32x4ClampInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("Float32x4.clamp, ");
left()->PrintTo(f);
}
-
void Float32x4WithInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("%s, ", MethodRecognizer::KindToCString(op_kind()));
left()->PrintTo(f);
@@ -944,26 +864,22 @@ void Float32x4WithInstr::PrintOperandsTo(BufferFormatter* f) const {
replacement()->PrintTo(f);
}
-
void Float32x4ToInt32x4Instr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("Float32x4.toInt32x4 ");
left()->PrintTo(f);
}
-
void Simd64x2ShuffleInstr::PrintOperandsTo(BufferFormatter* f) const {
// TODO(johnmccutchan): Add proper string enumeration of shuffle.
f->Print("%s, ", MethodRecognizer::KindToCString(op_kind()));
value()->PrintTo(f);
}
-
void Float64x2SplatInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("Float64x2.splat ");
value()->PrintTo(f);
}
-
void Float64x2ConstructorInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("Float64x2(");
value0()->PrintTo(f);
@@ -972,25 +888,21 @@ void Float64x2ConstructorInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print(")");
}
-
void Float32x4ToFloat64x2Instr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("Float64x2.fromFloat32x4 ");
left()->PrintTo(f);
}
-
void Float64x2ToFloat32x4Instr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("Float32x4.fromFloat64x2 ");
left()->PrintTo(f);
}
-
void Float64x2ZeroArgInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("%s, ", MethodRecognizer::KindToCString(op_kind()));
left()->PrintTo(f);
}
-
void Float64x2OneArgInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("%s(", MethodRecognizer::KindToCString(op_kind()));
left()->PrintTo(f);
@@ -999,7 +911,6 @@ void Float64x2OneArgInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print(")");
}
-
void Int32x4ConstructorInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("Int32x4(");
value0()->PrintTo(f);
@@ -1012,7 +923,6 @@ void Int32x4ConstructorInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print(")");
}
-
void Int32x4BoolConstructorInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("Int32x4.bool(");
value0()->PrintTo(f);
@@ -1025,13 +935,11 @@ void Int32x4BoolConstructorInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print(")");
}
-
void Int32x4GetFlagInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("Int32x4.%s ", MethodRecognizer::KindToCString(op_kind()));
value()->PrintTo(f);
}
-
void Int32x4SetFlagInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("Int32x4.%s ", MethodRecognizer::KindToCString(op_kind()));
value()->PrintTo(f);
@@ -1039,7 +947,6 @@ void Int32x4SetFlagInstr::PrintOperandsTo(BufferFormatter* f) const {
flagValue()->PrintTo(f);
}
-
void Int32x4SelectInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("Int32x4.select ");
mask()->PrintTo(f);
@@ -1049,13 +956,11 @@ void Int32x4SelectInstr::PrintOperandsTo(BufferFormatter* f) const {
falseValue()->PrintTo(f);
}
-
void Int32x4ToFloat32x4Instr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("Int32x4.toFloat32x4 ");
left()->PrintTo(f);
}
-
void BinaryInt32x4OpInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("%s, ", Token::Str(op_kind()));
left()->PrintTo(f);
@@ -1063,13 +968,11 @@ void BinaryInt32x4OpInstr::PrintOperandsTo(BufferFormatter* f) const {
right()->PrintTo(f);
}
-
void UnaryDoubleOpInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("%s, ", Token::Str(op_kind()));
value()->PrintTo(f);
}
-
void CheckClassIdInstr::PrintOperandsTo(BufferFormatter* f) const {
value()->PrintTo(f);
@@ -1087,7 +990,6 @@ void CheckClassIdInstr::PrintOperandsTo(BufferFormatter* f) const {
}
}
-
void CheckClassInstr::PrintOperandsTo(BufferFormatter* f) const {
value()->PrintTo(f);
PrintCidsHelper(f, cids_, FlowGraphPrinter::kPrintAll);
@@ -1096,13 +998,11 @@ void CheckClassInstr::PrintOperandsTo(BufferFormatter* f) const {
}
}
-
void InvokeMathCFunctionInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("%s, ", MethodRecognizer::KindToCString(recognized_kind_));
Definition::PrintOperandsTo(f);
}
-
void GraphEntryInstr::PrintTo(BufferFormatter* f) const {
const GrowableArray<Definition*>& defns = initial_definitions_;
f->Print("B%" Pd "[graph]:%" Pd, block_id(), GetDeoptId());
@@ -1117,7 +1017,6 @@ void GraphEntryInstr::PrintTo(BufferFormatter* f) const {
}
}
-
void JoinEntryInstr::PrintTo(BufferFormatter* f) const {
if (try_index() != CatchClauseNode::kInvalidTryIndex) {
f->Print("B%" Pd "[join try_idx %" Pd "]:%" Pd " pred(", block_id(),
@@ -1145,7 +1044,6 @@ void JoinEntryInstr::PrintTo(BufferFormatter* f) const {
}
}
-
void IndirectEntryInstr::PrintTo(BufferFormatter* f) const {
ASSERT(try_index() == CatchClauseNode::kInvalidTryIndex);
f->Print("B%" Pd "[join indirect]:%" Pd " pred(", block_id(), GetDeoptId());
@@ -1169,7 +1067,6 @@ void IndirectEntryInstr::PrintTo(BufferFormatter* f) const {
}
}
-
static const char* RepresentationToCString(Representation rep) {
switch (rep) {
case kTagged:
@@ -1200,7 +1097,6 @@ static const char* RepresentationToCString(Representation rep) {
return "?";
}
-
void PhiInstr::PrintTo(BufferFormatter* f) const {
if (HasPairRepresentation()) {
f->Print("(v%" Pd ", v%" Pd ") <- phi(", ssa_temp_index(),
@@ -1233,7 +1129,6 @@ void PhiInstr::PrintTo(BufferFormatter* f) const {
}
}
-
void UnboxIntegerInstr::PrintOperandsTo(BufferFormatter* f) const {
if (is_truncating()) {
f->Print("[tr], ");
@@ -1241,24 +1136,20 @@ void UnboxIntegerInstr::PrintOperandsTo(BufferFormatter* f) const {
Definition::PrintOperandsTo(f);
}
-
void UnboxedIntConverterInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("%s->%s%s, ", RepresentationToCString(from()),
RepresentationToCString(to()), is_truncating() ? "[tr]" : "");
Definition::PrintOperandsTo(f);
}
-
void ParameterInstr::PrintOperandsTo(BufferFormatter* f) const {
f->Print("%" Pd, index());
}
-
void CheckStackOverflowInstr::PrintOperandsTo(BufferFormatter* f) const {
if (in_loop()) f->Print("depth %" Pd, loop_depth());
}
-
void TargetEntryInstr::PrintTo(BufferFormatter* f) const {
if (try_index() != CatchClauseNode::kInvalidTryIndex) {
f->Print("B%" Pd "[target try_idx %" Pd "]:%" Pd, block_id(), try_index(),
@@ -1272,7 +1163,6 @@ void TargetEntryInstr::PrintTo(BufferFormatter* f) const {
}
}
-
void CatchBlockEntryInstr::PrintTo(BufferFormatter* f) const {
f->Print("B%" Pd "[target catch try_idx %" Pd " catch_try_idx %" Pd "]",
block_id(), try_index(), catch_try_index());
@@ -1293,12 +1183,10 @@ void CatchBlockEntryInstr::PrintTo(BufferFormatter* f) const {
}
}
-
void PushArgumentInstr::PrintOperandsTo(BufferFormatter* f) const {
value()->PrintTo(f);
}
-
void GotoInstr::PrintTo(BufferFormatter* f) const {
if (HasParallelMove()) {
parallel_move()->PrintTo(f);
@@ -1311,7 +1199,6 @@ void GotoInstr::PrintTo(BufferFormatter* f) const {
}
}
-
void IndirectGotoInstr::PrintTo(BufferFormatter* f) const {
if (GetDeoptId() != Thread::kNoDeoptId) {
f->Print("igoto:%" Pd "(", GetDeoptId());
@@ -1322,7 +1209,6 @@ void IndirectGotoInstr::PrintTo(BufferFormatter* f) const {
f->Print(")");
}
-
void BranchInstr::PrintTo(BufferFormatter* f) const {
f->Print("%s ", DebugName());
f->Print("if ");
@@ -1332,7 +1218,6 @@ void BranchInstr::PrintTo(BufferFormatter* f) const {
false_successor()->block_id());
}
-
void ParallelMoveInstr::PrintTo(BufferFormatter* f) const {
f->Print("%s ", DebugName());
for (intptr_t i = 0; i < moves_.length(); i++) {
@@ -1343,7 +1228,6 @@ void ParallelMoveInstr::PrintTo(BufferFormatter* f) const {
}
}
-
void Environment::PrintTo(BufferFormatter* f) const {
f->Print(" env={ ");
int arg_count = 0;
@@ -1371,21 +1255,17 @@ const char* Environment::ToCString() const {
return Thread::Current()->zone()->MakeCopyOfString(buffer);
}
-
#else // PRODUCT
-
const char* Instruction::ToCString() const {
return DebugName();
}
-
void FlowGraphPrinter::PrintOneInstruction(Instruction* instr,
bool print_locations) {
UNREACHABLE();
}
-
void FlowGraphPrinter::PrintTypeCheck(const ParsedFunction& parsed_function,
TokenPosition token_pos,
Value* value,
@@ -1395,24 +1275,20 @@ void FlowGraphPrinter::PrintTypeCheck(const ParsedFunction& parsed_function,
UNREACHABLE();
}
-
void FlowGraphPrinter::PrintBlock(BlockEntryInstr* block,
bool print_locations) {
UNREACHABLE();
}
-
void FlowGraphPrinter::PrintGraph(const char* phase, FlowGraph* flow_graph) {
UNREACHABLE();
}
-
void FlowGraphPrinter::PrintICData(const ICData& ic_data,
intptr_t num_checks_to_print) {
UNREACHABLE();
}
-
bool FlowGraphPrinter::ShouldPrint(const Function& function) {
return false;
}
« no previous file with comments | « runtime/vm/il_printer.h ('k') | runtime/vm/instructions_arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698