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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/dart_backend/dart_codegen.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: 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
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_codegen; 5 library dart_codegen;
6 6
7 import 'dart_tree.dart' as tree; 7 import 'dart_tree.dart' as tree;
8 import 'dart_printer.dart'; 8 import 'dart_printer.dart';
9 import 'dart_tree_printer.dart' show TreePrinter; 9 import 'dart_tree_printer.dart' show TreePrinter;
10 import '../tree/tree.dart' as frontend; 10 import '../tree/tree.dart' as frontend;
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 } 330 }
331 331
332 Expression visitConstant(tree.Constant exp) { 332 Expression visitConstant(tree.Constant exp) {
333 return emitConstant(exp.value); 333 return emitConstant(exp.value);
334 } 334 }
335 335
336 Expression visitThis(tree.This exp) { 336 Expression visitThis(tree.This exp) {
337 return new This(); 337 return new This();
338 } 338 }
339 339
340 Expression visitSuper(tree.Super exp) {
341 return new Super();
342 }
343
340 Expression visitLiteralList(tree.LiteralList exp) { 344 Expression visitLiteralList(tree.LiteralList exp) {
341 return new LiteralList( 345 return new LiteralList(
342 exp.values.map(visitExpression).toList(growable: false), 346 exp.values.map(visitExpression).toList(growable: false),
343 isConst: exp.constant != null, 347 isConst: exp.constant != null,
344 typeArgument: emitOptionalType(exp.type.typeArguments.single)); 348 typeArgument: emitOptionalType(exp.type.typeArguments.single));
345 } 349 }
346 350
347 Expression visitLiteralMap(tree.LiteralMap exp) { 351 Expression visitLiteralMap(tree.LiteralMap exp) {
348 List<LiteralMapEntry> entries = new List<LiteralMapEntry>.generate( 352 List<LiteralMapEntry> entries = new List<LiteralMapEntry>.generate(
349 exp.values.length, 353 exp.values.length,
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 } else if (constant is dart2js.TypeConstant) { 519 } else if (constant is dart2js.TypeConstant) {
516 GenericType type = constant.representedType; 520 GenericType type = constant.representedType;
517 return new Identifier(type.name) 521 return new Identifier(type.name)
518 ..element = type.element; 522 ..element = type.element;
519 } else { 523 } else {
520 throw "Unsupported constant: $constant"; 524 throw "Unsupported constant: $constant";
521 } 525 }
522 } 526 }
523 } 527 }
524 528
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698