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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/dart_backend/tree_tracer.dart

Issue 349923004: Add support for superSend to the new IR and dart backend. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Also handle sendSet Created 6 years, 5 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 dart_backend.tracer; 5 library dart_backend.tracer;
6 6
7 import 'dart:async' show EventSink; 7 import 'dart:async' show EventSink;
8 import '../tracer.dart'; 8 import '../tracer.dart';
9 import 'dart_tree.dart'; 9 import 'dart_tree.dart';
10 10
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 return "$head($args)"; 284 return "$head($args)";
285 } 285 }
286 286
287 String visitInvokeMethod(InvokeMethod node) { 287 String visitInvokeMethod(InvokeMethod node) {
288 String receiver = node.receiver.accept(this); 288 String receiver = node.receiver.accept(this);
289 String name = node.selector.name; 289 String name = node.selector.name;
290 String args = formatArguments(node); 290 String args = formatArguments(node);
291 return "$receiver.$name($args)"; 291 return "$receiver.$name($args)";
292 } 292 }
293 293
294 String visitInvokeSuperMethod(InvokeSuperMethod node) {
295 String receiver = node.receiver.accept(this);
asgerf 2014/06/27 08:09:56 node does not have a receiver
sigurdm 2014/06/27 09:20:21 Done.
296 String name = node.selector.name;
297 String args = formatArguments(node);
298 return "super.$name($args)";
299 }
300
294 String visitInvokeConstructor(InvokeConstructor node) { 301 String visitInvokeConstructor(InvokeConstructor node) {
295 String callName; 302 String callName;
296 if (node.target.name.isEmpty) { 303 if (node.target.name.isEmpty) {
297 callName = '${node.type}'; 304 callName = '${node.type}';
298 } else { 305 } else {
299 callName = '${node.type}.${node.target.name}'; 306 callName = '${node.type}.${node.target.name}';
300 } 307 }
301 String args = formatArguments(node); 308 String args = formatArguments(node);
302 String keyword = node.constant != null ? 'const' : 'new'; 309 String keyword = node.constant != null ? 'const' : 'new';
303 return "$keyword $callName($args)"; 310 return "$keyword $callName($args)";
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 String prefix = v.element == null ? 'v' : '${v.element.name}_'; 399 String prefix = v.element == null ? 'v' : '${v.element.name}_';
393 while (name == null || _usedNames.contains(name)) { 400 while (name == null || _usedNames.contains(name)) {
394 name = "$prefix${_counter++}"; 401 name = "$prefix${_counter++}";
395 } 402 }
396 _names[v] = name; 403 _names[v] = name;
397 _usedNames.add(name); 404 _usedNames.add(name);
398 } 405 }
399 return name; 406 return name;
400 } 407 }
401 } 408 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698