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

Side by Side Diff: vm/il_printer.cc

Issue 10409043: Make saving and restoring of the context around closure calls explicit. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 7 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
« no previous file with comments | « vm/flow_graph_compiler_x64.cc ('k') | vm/intermediate_language.h » ('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/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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 } 93 }
94 if (instantiator_type_arguments() != NULL) { 94 if (instantiator_type_arguments() != NULL) {
95 f->Print(" (instantiator:"); 95 f->Print(" (instantiator:");
96 instantiator_type_arguments()->PrintTo(f); 96 instantiator_type_arguments()->PrintTo(f);
97 f->Print(")"); 97 f->Print(")");
98 } 98 }
99 } 99 }
100 100
101 101
102 void ClosureCallComp::PrintOperandsTo(BufferFormatter* f) const { 102 void ClosureCallComp::PrintOperandsTo(BufferFormatter* f) const {
103 context()->PrintTo(f);
104 for (intptr_t i = 0; i < ArgumentCount(); ++i) { 103 for (intptr_t i = 0; i < ArgumentCount(); ++i) {
105 f->Print(", "); 104 if (i == 0) f->Print(", ");
106 ArgumentAt(i)->PrintTo(f); 105 ArgumentAt(i)->PrintTo(f);
107 } 106 }
108 } 107 }
109 108
110 109
111 void InstanceCallComp::PrintOperandsTo(BufferFormatter* f) const { 110 void InstanceCallComp::PrintOperandsTo(BufferFormatter* f) const {
112 f->Print("%s", function_name().ToCString()); 111 f->Print("%s", function_name().ToCString());
113 for (intptr_t i = 0; i < ArgumentCount(); ++i) { 112 for (intptr_t i = 0; i < ArgumentCount(); ++i) {
114 f->Print(", "); 113 f->Print(", ");
115 ArgumentAt(i)->PrintTo(f); 114 ArgumentAt(i)->PrintTo(f);
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 f->Print(" %s ", DebugName()); 333 f->Print(" %s ", DebugName());
335 f->Print("if "); 334 f->Print("if ");
336 value()->PrintTo(f); 335 value()->PrintTo(f);
337 f->Print(" goto (%d, %d)", 336 f->Print(" goto (%d, %d)",
338 true_successor()->block_id(), 337 true_successor()->block_id(),
339 false_successor()->block_id()); 338 false_successor()->block_id());
340 } 339 }
341 340
342 341
343 } // namespace dart 342 } // namespace dart
OLDNEW
« no previous file with comments | « vm/flow_graph_compiler_x64.cc ('k') | vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698