| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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.compiler_base; | 5 library dart2js.compiler_base; |
| 6 | 6 |
| 7 import 'dart:async' show | 7 import 'dart:async' show |
| 8 EventSink, | 8 EventSink, |
| 9 Future; | 9 Future; |
| 10 | 10 |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 Tracer; | 120 Tracer; |
| 121 import 'tree/tree.dart' show | 121 import 'tree/tree.dart' show |
| 122 Node; | 122 Node; |
| 123 import 'typechecker.dart' show | 123 import 'typechecker.dart' show |
| 124 TypeCheckerTask; | 124 TypeCheckerTask; |
| 125 import 'types/types.dart' as ti; | 125 import 'types/types.dart' as ti; |
| 126 import 'universe/universe.dart' show | 126 import 'universe/universe.dart' show |
| 127 CallStructure, | 127 CallStructure, |
| 128 Selector, | 128 Selector, |
| 129 Universe; | 129 Universe; |
| 130 import 'util/characters.dart' show $_; | |
| 131 import 'util/util.dart' show | 130 import 'util/util.dart' show |
| 132 Link; | 131 Link; |
| 133 import 'world.dart' show | 132 import 'world.dart' show |
| 134 World; | 133 World; |
| 135 | 134 |
| 136 abstract class Compiler implements DiagnosticListener { | 135 abstract class Compiler implements DiagnosticListener { |
| 137 | 136 |
| 138 final Stopwatch totalCompileTime = new Stopwatch(); | 137 final Stopwatch totalCompileTime = new Stopwatch(); |
| 139 int nextFreeClassId = 0; | 138 int nextFreeClassId = 0; |
| 140 World world; | 139 World world; |
| (...skipping 1526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1667 // Disable output in test mode: The build bot currently uses the time | 1666 // Disable output in test mode: The build bot currently uses the time |
| 1668 // stamp of the generated file to determine whether the output is | 1667 // stamp of the generated file to determine whether the output is |
| 1669 // up-to-date. | 1668 // up-to-date. |
| 1670 return new NullSink('$name.$extension'); | 1669 return new NullSink('$name.$extension'); |
| 1671 } | 1670 } |
| 1672 } | 1671 } |
| 1673 return userOutputProvider.createEventSink(name, extension); | 1672 return userOutputProvider.createEventSink(name, extension); |
| 1674 } | 1673 } |
| 1675 } | 1674 } |
| 1676 | 1675 |
| 1677 /// Returns `true` when [s] is private if used as an identifier. | |
| 1678 bool isPrivateName(String s) => !s.isEmpty && s.codeUnitAt(0) == $_; | |
| 1679 | |
| 1680 /// Returns `true` when [s] is public if used as an identifier. | |
| 1681 bool isPublicName(String s) => !isPrivateName(s); | |
| 1682 | |
| 1683 /// Information about suppressed warnings and hints for a given library. | 1676 /// Information about suppressed warnings and hints for a given library. |
| 1684 class SuppressionInfo { | 1677 class SuppressionInfo { |
| 1685 int warnings = 0; | 1678 int warnings = 0; |
| 1686 int hints = 0; | 1679 int hints = 0; |
| 1687 } | 1680 } |
| 1688 | 1681 |
| 1689 class _CompilerCoreTypes implements CoreTypes { | 1682 class _CompilerCoreTypes implements CoreTypes { |
| 1690 final Compiler compiler; | 1683 final Compiler compiler; |
| 1691 | 1684 |
| 1692 ClassElement objectClass; | 1685 ClassElement objectClass; |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1785 | 1778 |
| 1786 @override | 1779 @override |
| 1787 InterfaceType streamType([DartType elementType]) { | 1780 InterfaceType streamType([DartType elementType]) { |
| 1788 InterfaceType type = streamClass.computeType(compiler); | 1781 InterfaceType type = streamClass.computeType(compiler); |
| 1789 if (elementType == null) { | 1782 if (elementType == null) { |
| 1790 return streamClass.rawType; | 1783 return streamClass.rawType; |
| 1791 } | 1784 } |
| 1792 return type.createInstantiation([elementType]); | 1785 return type.createInstantiation([elementType]); |
| 1793 } | 1786 } |
| 1794 } | 1787 } |
| OLD | NEW |