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

Side by Side Diff: runtime/vm/il_printer.cc

Issue 1377113004: VM: Support phis with pair representations. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: rebased Created 5 years, 2 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 unified diff | Download patch
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after
1043 case kNoRepresentation: 1043 case kNoRepresentation:
1044 return "none"; 1044 return "none";
1045 case kNumRepresentations: 1045 case kNumRepresentations:
1046 UNREACHABLE(); 1046 UNREACHABLE();
1047 } 1047 }
1048 return "?"; 1048 return "?";
1049 } 1049 }
1050 1050
1051 1051
1052 void PhiInstr::PrintTo(BufferFormatter* f) const { 1052 void PhiInstr::PrintTo(BufferFormatter* f) const {
1053 f->Print("v%" Pd " <- phi(", ssa_temp_index()); 1053 if (HasPairRepresentation()) {
1054 f->Print("(v%" Pd ", v%" Pd ") <- phi(",
1055 ssa_temp_index(), ssa_temp_index() + 1);
1056 } else {
1057 f->Print("v%" Pd " <- phi(", ssa_temp_index());
1058 }
1054 for (intptr_t i = 0; i < inputs_.length(); ++i) { 1059 for (intptr_t i = 0; i < inputs_.length(); ++i) {
1055 if (inputs_[i] != NULL) inputs_[i]->PrintTo(f); 1060 if (inputs_[i] != NULL) inputs_[i]->PrintTo(f);
1056 if (i < inputs_.length() - 1) f->Print(", "); 1061 if (i < inputs_.length() - 1) f->Print(", ");
1057 } 1062 }
1058 f->Print(")"); 1063 f->Print(")");
1059 if (is_alive()) { 1064 if (is_alive()) {
1060 f->Print(" alive"); 1065 f->Print(" alive");
1061 } else { 1066 } else {
1062 f->Print(" dead"); 1067 f->Print(" dead");
1063 } 1068 }
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
1212 } 1217 }
1213 1218
1214 const char* Environment::ToCString() const { 1219 const char* Environment::ToCString() const {
1215 char buffer[1024]; 1220 char buffer[1024];
1216 BufferFormatter bf(buffer, 1024); 1221 BufferFormatter bf(buffer, 1024);
1217 PrintTo(&bf); 1222 PrintTo(&bf);
1218 return Thread::Current()->zone()->MakeCopyOfString(buffer); 1223 return Thread::Current()->zone()->MakeCopyOfString(buffer);
1219 } 1224 }
1220 1225
1221 } // namespace dart 1226 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698