| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |