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

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

Issue 806973002: Cleanup access to Instruction's fields (especially deopt_id_). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years 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 | Annotate | Revision Log
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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 74
75 void FlowGraphPrinter::PrintOneInstruction(Instruction* instr, 75 void FlowGraphPrinter::PrintOneInstruction(Instruction* instr,
76 bool print_locations) { 76 bool print_locations) {
77 char str[4000]; 77 char str[4000];
78 BufferFormatter f(str, sizeof(str)); 78 BufferFormatter f(str, sizeof(str));
79 instr->PrintTo(&f); 79 instr->PrintTo(&f);
80 if (FLAG_print_environments && (instr->env() != NULL)) { 80 if (FLAG_print_environments && (instr->env() != NULL)) {
81 instr->env()->PrintTo(&f); 81 instr->env()->PrintTo(&f);
82 } 82 }
83 if (print_locations && (instr->locs_ != NULL)) { 83 if (print_locations && (instr->HasLocs())) {
84 instr->locs()->PrintTo(&f); 84 instr->locs()->PrintTo(&f);
85 } 85 }
86 if (instr->lifetime_position() != -1) { 86 if (instr->lifetime_position() != -1) {
87 OS::Print("%3" Pd ": ", instr->lifetime_position()); 87 OS::Print("%3" Pd ": ", instr->lifetime_position());
88 } 88 }
89 if (!instr->IsBlockEntry()) OS::Print(" "); 89 if (!instr->IsBlockEntry()) OS::Print(" ");
90 OS::Print("%s", str); 90 OS::Print("%s", str);
91 } 91 }
92 92
93 93
(...skipping 1054 matching lines...) Expand 10 before | Expand all | Expand 10 after
1148 } 1148 }
1149 1149
1150 const char* Environment::ToCString() const { 1150 const char* Environment::ToCString() const {
1151 char buffer[1024]; 1151 char buffer[1024];
1152 BufferFormatter bf(buffer, 1024); 1152 BufferFormatter bf(buffer, 1024);
1153 PrintTo(&bf); 1153 PrintTo(&bf);
1154 return Isolate::Current()->current_zone()->MakeCopyOfString(buffer); 1154 return Isolate::Current()->current_zone()->MakeCopyOfString(buffer);
1155 } 1155 }
1156 1156
1157 } // namespace dart 1157 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698