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

Side by Side Diff: pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart

Issue 861713002: Handle super-method invocations in CPS->JS backend. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 visitInvokeMethod(cps_ir.InvokeMethod node) { 131 visitInvokeMethod(cps_ir.InvokeMethod node) {
132 String dummy = names.name(node); 132 String dummy = names.name(node);
133 String receiver = formatReference(node.receiver); 133 String receiver = formatReference(node.receiver);
134 String callName = node.selector.name; 134 String callName = node.selector.name;
135 String args = node.arguments.map(formatReference).join(', '); 135 String args = node.arguments.map(formatReference).join(', ');
136 String kont = formatReference(node.continuation); 136 String kont = formatReference(node.continuation);
137 printStmt(dummy, 137 printStmt(dummy,
138 "InvokeMethod $receiver $callName ($args) $kont"); 138 "InvokeMethod $receiver $callName ($args) $kont");
139 } 139 }
140 140
141 visitInvokeSuperMethod(cps_ir.InvokeSuperMethod node) { 141 visitInvokeMethodDirectly(cps_ir.InvokeMethodDirectly node) {
142 String dummy = names.name(node); 142 String dummy = names.name(node);
143 String receiver = formatReference(node.receiver);
143 String callName = node.selector.name; 144 String callName = node.selector.name;
144 String args = node.arguments.map(formatReference).join(', '); 145 String args = node.arguments.map(formatReference).join(', ');
145 String kont = formatReference(node.continuation); 146 String kont = formatReference(node.continuation);
146 printStmt(dummy, 147 printStmt(dummy,
147 "InvokeSuperMethod $callName ($args) $kont"); 148 "InvokeMethodDirectly $receiver $callName ($args) $kont");
148 } 149 }
149 150
150 visitInvokeConstructor(cps_ir.InvokeConstructor node) { 151 visitInvokeConstructor(cps_ir.InvokeConstructor node) {
151 String dummy = names.name(node); 152 String dummy = names.name(node);
152 String callName; 153 String callName;
153 if (node.target.name.isEmpty) { 154 if (node.target.name.isEmpty) {
154 callName = '${node.type}'; 155 callName = '${node.type}';
155 } else { 156 } else {
156 callName = '${node.type}.${node.target.name}'; 157 callName = '${node.type}.${node.target.name}';
157 } 158 }
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 } 479 }
479 } 480 }
480 481
481 visitContinuation(cps_ir.Continuation c) { 482 visitContinuation(cps_ir.Continuation c) {
482 var old_node = current_block; 483 var old_node = current_block;
483 current_block = getBlock(c); 484 current_block = getBlock(c);
484 visit(c.body); 485 visit(c.body);
485 current_block = old_node; 486 current_block = old_node;
486 } 487 }
487 } 488 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698