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

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

Issue 10832126: Store pointer instead of reference to LocalVariable in ast and flow graph. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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 #include "vm/parser.h" 9 #include "vm/parser.h"
10 10
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 void StaticCallComp::PrintOperandsTo(BufferFormatter* f) const { 229 void StaticCallComp::PrintOperandsTo(BufferFormatter* f) const {
230 f->Print("%s", String::Handle(function().name()).ToCString()); 230 f->Print("%s", String::Handle(function().name()).ToCString());
231 for (intptr_t i = 0; i < ArgumentCount(); ++i) { 231 for (intptr_t i = 0; i < ArgumentCount(); ++i) {
232 if (i > 0) f->Print(", "); 232 if (i > 0) f->Print(", ");
233 ArgumentAt(i)->value()->PrintTo(f); 233 ArgumentAt(i)->value()->PrintTo(f);
234 } 234 }
235 } 235 }
236 236
237 237
238 void LoadLocalComp::PrintOperandsTo(BufferFormatter* f) const { 238 void LoadLocalComp::PrintOperandsTo(BufferFormatter* f) const {
239 f->Print("%s lvl:%d", local().name().ToCString(), context_level()); 239 f->Print("%s lvl:%d", local()->name().ToCString(), context_level());
240 } 240 }
241 241
242 242
243 void StoreLocalComp::PrintOperandsTo(BufferFormatter* f) const { 243 void StoreLocalComp::PrintOperandsTo(BufferFormatter* f) const {
244 f->Print("%s, ", local().name().ToCString()); 244 f->Print("%s, ", local()->name().ToCString());
245 value()->PrintTo(f); 245 value()->PrintTo(f);
246 f->Print(", lvl: %d", context_level()); 246 f->Print(", lvl: %d", context_level());
247 } 247 }
248 248
249 249
250 void NativeCallComp::PrintOperandsTo(BufferFormatter* f) const { 250 void NativeCallComp::PrintOperandsTo(BufferFormatter* f) const {
251 f->Print("%s", native_name().ToCString()); 251 f->Print("%s", native_name().ToCString());
252 } 252 }
253 253
254 254
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 } 365 }
366 366
367 367
368 void AllocateContextComp::PrintOperandsTo(BufferFormatter* f) const { 368 void AllocateContextComp::PrintOperandsTo(BufferFormatter* f) const {
369 f->Print("%d", num_context_variables()); 369 f->Print("%d", num_context_variables());
370 } 370 }
371 371
372 372
373 void CatchEntryComp::PrintOperandsTo(BufferFormatter* f) const { 373 void CatchEntryComp::PrintOperandsTo(BufferFormatter* f) const {
374 f->Print("%s, %s", 374 f->Print("%s, %s",
375 exception_var().name().ToCString(), 375 exception_var()->name().ToCString(),
376 stacktrace_var().name().ToCString()); 376 stacktrace_var()->name().ToCString());
377 } 377 }
378 378
379 379
380 void BinaryOpComp::PrintOperandsTo(BufferFormatter* f) const { 380 void BinaryOpComp::PrintOperandsTo(BufferFormatter* f) const {
381 f->Print("%s, ", Token::Str(op_kind())); 381 f->Print("%s, ", Token::Str(op_kind()));
382 left()->PrintTo(f); 382 left()->PrintTo(f);
383 f->Print(", "); 383 f->Print(", ");
384 right()->PrintTo(f); 384 right()->PrintTo(f);
385 } 385 }
386 386
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 if ((i < locations_.length()) && !locations_[i].IsInvalid()) { 787 if ((i < locations_.length()) && !locations_[i].IsInvalid()) {
788 f->Print(" ["); 788 f->Print(" [");
789 locations_[i].PrintTo(f); 789 locations_[i].PrintTo(f);
790 f->Print("]"); 790 f->Print("]");
791 } 791 }
792 } 792 }
793 f->Print(" }"); 793 f->Print(" }");
794 } 794 }
795 795
796 } // namespace dart 796 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698