| 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 backend_ast_nodes; | 5 library backend_ast_nodes; |
| 6 | 6 |
| 7 import '../dart2jslib.dart' as dart2js; | 7 import '../dart2jslib.dart' as dart2js; |
| 8 import '../tree/tree.dart' as tree; | 8 import '../tree/tree.dart' as tree; |
| 9 import '../util/characters.dart' as characters; | 9 import '../util/characters.dart' as characters; |
| 10 import '../elements/elements.dart' as elements; | 10 import '../elements/elements.dart' as elements; |
| (...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 821 write('-1/0.0'); | 821 write('-1/0.0'); |
| 822 }); | 822 }); |
| 823 } else if (v.isNaN) { | 823 } else if (v.isNaN) { |
| 824 withPrecedence(MULTIPLICATIVE, () { | 824 withPrecedence(MULTIPLICATIVE, () { |
| 825 write('0/0.0'); | 825 write('0/0.0'); |
| 826 }); | 826 }); |
| 827 } else { | 827 } else { |
| 828 write(v.toString()); | 828 write(v.toString()); |
| 829 } | 829 } |
| 830 } else { | 830 } else { |
| 831 write(e.value.toString()); | 831 // TODO(sigurdm): Use [ConstExp] to generate valid code for any |
| 832 // constant. |
| 833 write(e.value.unparse()); |
| 832 } | 834 } |
| 833 } else if (e is LiteralList) { | 835 } else if (e is LiteralList) { |
| 834 if (e.isConst) { | 836 if (e.isConst) { |
| 835 write(' const '); | 837 write(' const '); |
| 836 } | 838 } |
| 837 if (e.typeArgument != null) { | 839 if (e.typeArgument != null) { |
| 838 write('<'); | 840 write('<'); |
| 839 writeType(e.typeArgument); | 841 writeType(e.typeArgument); |
| 840 write('>'); | 842 write('>'); |
| 841 } | 843 } |
| (...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1533 final StringChunk previous; | 1535 final StringChunk previous; |
| 1534 final tree.StringQuoting quoting; | 1536 final tree.StringQuoting quoting; |
| 1535 num cost; | 1537 num cost; |
| 1536 | 1538 |
| 1537 OpenStringChunk(this.previous, this.quoting, this.cost); | 1539 OpenStringChunk(this.previous, this.quoting, this.cost); |
| 1538 | 1540 |
| 1539 StringChunk end(int endIndex) { | 1541 StringChunk end(int endIndex) { |
| 1540 return new StringChunk(previous, quoting, endIndex); | 1542 return new StringChunk(previous, quoting, endIndex); |
| 1541 } | 1543 } |
| 1542 } | 1544 } |
| OLD | NEW |