| 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 dart2js.constants.expressions; | 5 library dart2js.constants.expressions; |
| 6 | 6 |
| 7 import '../constants/constant_system.dart'; | 7 import '../constants/constant_system.dart'; |
| 8 import '../core_types.dart'; | 8 import '../core_types.dart'; |
| 9 import '../dart_types.dart'; | 9 import '../dart_types.dart'; |
| 10 import '../diagnostics/invariant.dart' show | 10 import '../diagnostics/invariant.dart' show |
| (...skipping 1545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1556 } | 1556 } |
| 1557 | 1557 |
| 1558 @override | 1558 @override |
| 1559 void visitNamed(NamedArgumentReference exp, [_]) { | 1559 void visitNamed(NamedArgumentReference exp, [_]) { |
| 1560 // TODO(johnniwinther): Maybe this should throw. | 1560 // TODO(johnniwinther): Maybe this should throw. |
| 1561 sb.write('args[${exp.name}]'); | 1561 sb.write('args[${exp.name}]'); |
| 1562 } | 1562 } |
| 1563 | 1563 |
| 1564 @override | 1564 @override |
| 1565 void visitDeferred(DeferredConstantExpression exp, context) { | 1565 void visitDeferred(DeferredConstantExpression exp, context) { |
| 1566 sb.write(exp.prefix.deferredImport.prefix.source); | 1566 sb.write(exp.prefix.name); |
| 1567 sb.write('.'); | 1567 sb.write('.'); |
| 1568 write(exp, exp.expression); | 1568 write(exp, exp.expression); |
| 1569 } | 1569 } |
| 1570 | 1570 |
| 1571 @override | 1571 @override |
| 1572 void visitBoolFromEnvironment(BoolFromEnvironmentConstantExpression exp, | 1572 void visitBoolFromEnvironment(BoolFromEnvironmentConstantExpression exp, |
| 1573 [_]) { | 1573 [_]) { |
| 1574 sb.write('const bool.fromEnvironment('); | 1574 sb.write('const bool.fromEnvironment('); |
| 1575 visit(exp.name); | 1575 visit(exp.name); |
| 1576 if (exp.defaultValue != null) { | 1576 if (exp.defaultValue != null) { |
| (...skipping 21 matching lines...) Expand all Loading... |
| 1598 visit(exp.name); | 1598 visit(exp.name); |
| 1599 if (exp.defaultValue != null) { | 1599 if (exp.defaultValue != null) { |
| 1600 sb.write(', defaultValue: '); | 1600 sb.write(', defaultValue: '); |
| 1601 visit(exp.defaultValue); | 1601 visit(exp.defaultValue); |
| 1602 } | 1602 } |
| 1603 sb.write(')'); | 1603 sb.write(')'); |
| 1604 } | 1604 } |
| 1605 | 1605 |
| 1606 String toString() => sb.toString(); | 1606 String toString() => sb.toString(); |
| 1607 } | 1607 } |
| OLD | NEW |