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

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

Issue 355373002: dart2dart: Fixed treatment of dynamic type literals in new IR. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Pass DartType to LiteralType 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
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/dart_backend/dart_printer.dart » ('j') | 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 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 612 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 623
624 Expression visitConcatenate(ConcatenateConstExp exp) { 624 Expression visitConcatenate(ConcatenateConstExp exp) {
625 return new StringConcat(exp.arguments.map(visit).toList(growable: false)); 625 return new StringConcat(exp.arguments.map(visit).toList(growable: false));
626 } 626 }
627 627
628 Expression visitSymbol(SymbolConstExp exp) { 628 Expression visitSymbol(SymbolConstExp exp) {
629 return new LiteralSymbol(exp.name); 629 return new LiteralSymbol(exp.name);
630 } 630 }
631 631
632 Expression visitType(TypeConstExp exp) { 632 Expression visitType(TypeConstExp exp) {
633 return new LiteralType(exp.element.name) 633 DartType type = exp.type;
634 ..element = exp.element; 634 return new LiteralType(type.name)
635 ..type = type;
635 } 636 }
636 637
637 Expression visitVariable(VariableConstExp exp) { 638 Expression visitVariable(VariableConstExp exp) {
638 String name = parent.getConstantName(exp.element); 639 String name = parent.getConstantName(exp.element);
639 return new Identifier(name) 640 return new Identifier(name)
640 ..element = exp.element; 641 ..element = exp.element;
641 } 642 }
642 643
643 Expression visitFunction(FunctionConstExp exp) { 644 Expression visitFunction(FunctionConstExp exp) {
644 return new Identifier(exp.element.name) 645 return new Identifier(exp.element.name)
645 ..element = exp.element; 646 ..element = exp.element;
646 } 647 }
647 648
648 } 649 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/dart_backend/dart_printer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698