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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/ir/ir_tracer.dart

Issue 329983002: Implement references to "this" in the new IR. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase Created 6 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
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ir/ir_nodes.dart ('k') | no next file » | 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 library dart2js.ir_tracer; 5 library dart2js.ir_tracer;
6 6
7 import 'dart:async' show EventSink; 7 import 'dart:async' show EventSink;
8 8
9 import 'ir_nodes.dart' as ir hide Function; 9 import 'ir_nodes.dart' as ir hide Function;
10 import '../tracer.dart'; 10 import '../tracer.dart';
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 } 155 }
156 printStmt(dummy, "LiteralMap (${entries.join(', ')})"); 156 printStmt(dummy, "LiteralMap (${entries.join(', ')})");
157 } 157 }
158 158
159 visitInvokeConstConstructor(ir.InvokeConstConstructor node) { 159 visitInvokeConstConstructor(ir.InvokeConstConstructor node) {
160 String dummy = names.name(node); 160 String dummy = names.name(node);
161 String values = node.arguments.map(formatReference).join(', '); 161 String values = node.arguments.map(formatReference).join(', ');
162 printStmt(dummy, "ConstConstruction ($values)"); 162 printStmt(dummy, "ConstConstruction ($values)");
163 } 163 }
164 164
165 165 visitThis(ir.This node) {
166 String dummy = names.name(node);
167 printStmt(dummy, "This");
168 }
166 169
167 visitInvokeContinuation(ir.InvokeContinuation node) { 170 visitInvokeContinuation(ir.InvokeContinuation node) {
168 String dummy = names.name(node); 171 String dummy = names.name(node);
169 String kont = formatReference(node.continuation); 172 String kont = formatReference(node.continuation);
170 String args = node.arguments.map(formatReference).join(', '); 173 String args = node.arguments.map(formatReference).join(', ');
171 printStmt(dummy, "InvokeContinuation $kont ($args)"); 174 printStmt(dummy, "InvokeContinuation $kont ($args)");
172 } 175 }
173 176
174 visitBranch(ir.Branch node) { 177 visitBranch(ir.Branch node) {
175 String dummy = names.name(node); 178 String dummy = names.name(node);
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 } 344 }
342 } 345 }
343 346
344 visitContinuation(ir.Continuation c) { 347 visitContinuation(ir.Continuation c) {
345 var old_node = current_block; 348 var old_node = current_block;
346 current_block = getBlock(c); 349 current_block = getBlock(c);
347 visit(c.body); 350 visit(c.body);
348 current_block = old_node; 351 current_block = old_node;
349 } 352 }
350 } 353 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ir/ir_nodes.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698