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: pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart

Issue 862703002: Implement constructor bodies and initializers in CPS->JS backend. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix test case Created 5 years, 11 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) 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 'cps_ir_nodes.dart' as cps_ir hide Function; 9 import 'cps_ir_nodes.dart' as cps_ir hide Function;
10 import '../tracer.dart'; 10 import '../tracer.dart';
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 visitGetField(cps_ir.GetField node) { 266 visitGetField(cps_ir.GetField node) {
267 String object = formatReference(node.object); 267 String object = formatReference(node.object);
268 String field = node.field.name; 268 String field = node.field.name;
269 return 'GetField($object.$field)'; 269 return 'GetField($object.$field)';
270 } 270 }
271 271
272 visitCreateBox(cps_ir.CreateBox node) { 272 visitCreateBox(cps_ir.CreateBox node) {
273 return 'CreateBox'; 273 return 'CreateBox';
274 } 274 }
275 275
276 visitCreateClosureClass(cps_ir.CreateClosureClass node) { 276 visitCreateInstance(cps_ir.CreateInstance node) {
277 String className = node.classElement.name; 277 String className = node.classElement.name;
278 String arguments = node.arguments.map(formatReference).join(', '); 278 String arguments = node.arguments.map(formatReference).join(', ');
279 return 'CreateClosureClass $className ($arguments)'; 279 return 'CreateInstance $className ($arguments)';
280 } 280 }
281 281
282 visitIdentical(cps_ir.Identical node) { 282 visitIdentical(cps_ir.Identical node) {
283 String left = formatReference(node.left); 283 String left = formatReference(node.left);
284 String right = formatReference(node.right); 284 String right = formatReference(node.right);
285 return "Identical($left, $right)"; 285 return "Identical($left, $right)";
286 } 286 }
287 287
288 visitInterceptor(cps_ir.Interceptor node) { 288 visitInterceptor(cps_ir.Interceptor node) {
289 return "Interceptor(${formatReference(node.input)})"; 289 return "Interceptor(${formatReference(node.input)})";
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 } 479 }
480 } 480 }
481 481
482 visitContinuation(cps_ir.Continuation c) { 482 visitContinuation(cps_ir.Continuation c) {
483 var old_node = current_block; 483 var old_node = current_block;
484 current_block = getBlock(c); 484 current_block = getBlock(c);
485 visit(c.body); 485 visit(c.body);
486 current_block = old_node; 486 current_block = old_node;
487 } 487 }
488 } 488 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698