| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/il_printer.h" | 5 #include "vm/il_printer.h" |
| 6 | 6 |
| 7 #include "vm/flow_graph_range_analysis.h" | 7 #include "vm/flow_graph_range_analysis.h" |
| 8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
| 9 #include "vm/os.h" | 9 #include "vm/os.h" |
| 10 #include "vm/parser.h" | 10 #include "vm/parser.h" |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 | 130 |
| 131 const char* CompileType::ToCString() const { | 131 const char* CompileType::ToCString() const { |
| 132 char buffer[1024]; | 132 char buffer[1024]; |
| 133 BufferFormatter f(buffer, sizeof(buffer)); | 133 BufferFormatter f(buffer, sizeof(buffer)); |
| 134 PrintTo(&f); | 134 PrintTo(&f); |
| 135 return Isolate::Current()->current_zone()->MakeCopyOfString(buffer); | 135 return Isolate::Current()->current_zone()->MakeCopyOfString(buffer); |
| 136 } | 136 } |
| 137 | 137 |
| 138 | 138 |
| 139 static void PrintICDataHelper(BufferFormatter* f, const ICData& ic_data) { | 139 static void PrintICDataHelper(BufferFormatter* f, const ICData& ic_data) { |
| 140 f->Print(" IC[%" Pd ": ", ic_data.NumberOfChecks()); | 140 f->Print(" IC["); |
| 141 if (ic_data.HasRangeFeedback()) { |
| 142 f->Print("{%s", |
| 143 ICData::RangeFeedbackToString(ic_data.DecodeRangeFeedbackAt(0))); |
| 144 if (ic_data.NumArgsTested() == 2) { |
| 145 f->Print(" x %s", |
| 146 ICData::RangeFeedbackToString(ic_data.DecodeRangeFeedbackAt(1))); |
| 147 } |
| 148 f->Print("->%s} ", |
| 149 ICData::RangeFeedbackToString(ic_data.DecodeRangeFeedbackAt(2))); |
| 150 } |
| 151 f->Print("%" Pd ": ", ic_data.NumberOfChecks()); |
| 141 Function& target = Function::Handle(); | 152 Function& target = Function::Handle(); |
| 142 for (intptr_t i = 0; i < ic_data.NumberOfChecks(); i++) { | 153 for (intptr_t i = 0; i < ic_data.NumberOfChecks(); i++) { |
| 143 GrowableArray<intptr_t> class_ids; | 154 GrowableArray<intptr_t> class_ids; |
| 144 ic_data.GetCheckAt(i, &class_ids, &target); | 155 ic_data.GetCheckAt(i, &class_ids, &target); |
| 145 const intptr_t count = ic_data.GetCountAt(i); | 156 const intptr_t count = ic_data.GetCountAt(i); |
| 146 if (i > 0) { | 157 if (i > 0) { |
| 147 f->Print(" | "); | 158 f->Print(" | "); |
| 148 } | 159 } |
| 149 for (intptr_t k = 0; k < class_ids.length(); k++) { | 160 for (intptr_t k = 0; k < class_ids.length(); k++) { |
| 150 if (k > 0) { | 161 if (k > 0) { |
| (...skipping 997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1148 } | 1159 } |
| 1149 | 1160 |
| 1150 const char* Environment::ToCString() const { | 1161 const char* Environment::ToCString() const { |
| 1151 char buffer[1024]; | 1162 char buffer[1024]; |
| 1152 BufferFormatter bf(buffer, 1024); | 1163 BufferFormatter bf(buffer, 1024); |
| 1153 PrintTo(&bf); | 1164 PrintTo(&bf); |
| 1154 return Isolate::Current()->current_zone()->MakeCopyOfString(buffer); | 1165 return Isolate::Current()->current_zone()->MakeCopyOfString(buffer); |
| 1155 } | 1166 } |
| 1156 | 1167 |
| 1157 } // namespace dart | 1168 } // namespace dart |
| OLD | NEW |