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

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

Issue 10540040: Inline setters, getters, various cleanups & restructuring. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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 | 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/intermediate_language.h" 7 #include "vm/intermediate_language.h"
8 #include "vm/os.h" 8 #include "vm/os.h"
9 9
10 namespace dart { 10 namespace dart {
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 value()->PrintTo(f); 160 value()->PrintTo(f);
161 f->Print(", lvl: %d", context_level()); 161 f->Print(", lvl: %d", context_level());
162 } 162 }
163 163
164 164
165 void NativeCallComp::PrintOperandsTo(BufferFormatter* f) const { 165 void NativeCallComp::PrintOperandsTo(BufferFormatter* f) const {
166 f->Print("%s", native_name().ToCString()); 166 f->Print("%s", native_name().ToCString());
167 } 167 }
168 168
169 169
170 static void PrintClassIds(BufferFormatter* f,
171 const ZoneGrowableArray<intptr_t>& class_ids) {
172 f->Print(" [");
173 for (intptr_t i = 0; i < class_ids.length(); i++) {
174 if (i != 0) f->Print(", ");
175 f->Print("%d", class_ids[i]);
176 }
177 f->Print("]");
178 }
179
180
170 void LoadInstanceFieldComp::PrintOperandsTo(BufferFormatter* f) const { 181 void LoadInstanceFieldComp::PrintOperandsTo(BufferFormatter* f) const {
171 f->Print("%s, ", String::Handle(field().name()).ToCString()); 182 f->Print("%s, ", String::Handle(field().name()).ToCString());
172 instance()->PrintTo(f); 183 instance()->PrintTo(f);
184 if (class_ids() != NULL) {
185 PrintClassIds(f, *class_ids());
186 }
173 } 187 }
174 188
175 189
176 void StoreInstanceFieldComp::PrintOperandsTo(BufferFormatter* f) const { 190 void StoreInstanceFieldComp::PrintOperandsTo(BufferFormatter* f) const {
177 f->Print("%s, ", String::Handle(field().name()).ToCString()); 191 f->Print("%s, ", String::Handle(field().name()).ToCString());
178 instance()->PrintTo(f); 192 instance()->PrintTo(f);
179 f->Print(", "); 193 f->Print(", ");
180 value()->PrintTo(f); 194 value()->PrintTo(f);
195 if (class_ids() != NULL) {
196 PrintClassIds(f, *class_ids());
197 }
181 } 198 }
182 199
183 200
184 void LoadStaticFieldComp::PrintOperandsTo(BufferFormatter* f) const { 201 void LoadStaticFieldComp::PrintOperandsTo(BufferFormatter* f) const {
185 f->Print("%s", String::Handle(field().name()).ToCString()); 202 f->Print("%s", String::Handle(field().name()).ToCString());
186 } 203 }
187 204
188 205
189 void StoreStaticFieldComp::PrintOperandsTo(BufferFormatter* f) const { 206 void StoreStaticFieldComp::PrintOperandsTo(BufferFormatter* f) const {
190 f->Print("%s, ", String::Handle(field().name()).ToCString()); 207 f->Print("%s, ", String::Handle(field().name()).ToCString());
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 f->Print("_ %s ", DebugName()); 554 f->Print("_ %s ", DebugName());
538 f->Print("if "); 555 f->Print("if ");
539 value()->PrintTo(f); 556 value()->PrintTo(f);
540 f->Print(" goto (B%d, B%d)", 557 f->Print(" goto (B%d, B%d)",
541 true_successor()->block_id(), 558 true_successor()->block_id(),
542 false_successor()->block_id()); 559 false_successor()->block_id());
543 } 560 }
544 561
545 562
546 } // namespace dart 563 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698