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 part of dart2js; | 5 part of dart2js; |
6 | 6 |
7 /** | 7 /** |
8 * If true, print a warning for each method that was resolved, but not | 8 * If true, print a warning for each method that was resolved, but not |
9 * compiled. | 9 * compiled. |
10 */ | 10 */ |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 | 89 |
90 // TODO(ahe,karlklose): rename this? | 90 // TODO(ahe,karlklose): rename this? |
91 void dumpInferredTypes() {} | 91 void dumpInferredTypes() {} |
92 | 92 |
93 ItemCompilationContext createItemCompilationContext() { | 93 ItemCompilationContext createItemCompilationContext() { |
94 return new ItemCompilationContext(); | 94 return new ItemCompilationContext(); |
95 } | 95 } |
96 | 96 |
97 SourceString getCheckedModeHelper(DartType type) => null; | 97 SourceString getCheckedModeHelper(DartType type) => null; |
98 void registerInstantiatedClass(ClassElement cls, Enqueuer enqueuer) {} | 98 void registerInstantiatedClass(ClassElement cls, Enqueuer enqueuer) {} |
99 | |
100 Element getInterceptor(Selector selector); | |
101 } | 99 } |
102 | 100 |
103 abstract class Compiler implements DiagnosticListener { | 101 abstract class Compiler implements DiagnosticListener { |
104 final Map<String, LibraryElement> libraries; | 102 final Map<String, LibraryElement> libraries; |
105 int nextFreeClassId = 0; | 103 int nextFreeClassId = 0; |
106 World world; | 104 World world; |
107 String assembledCode; | 105 String assembledCode; |
108 Types types; | 106 Types types; |
109 | 107 |
110 final bool enableMinification; | 108 final bool enableMinification; |
(...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
940 // TODO(johnniwinther): Use [spannable] and [message] to provide better | 938 // TODO(johnniwinther): Use [spannable] and [message] to provide better |
941 // information on assertion errors. | 939 // information on assertion errors. |
942 if (condition is Function){ | 940 if (condition is Function){ |
943 condition = condition(); | 941 condition = condition(); |
944 } | 942 } |
945 if (spannable == null || !condition) { | 943 if (spannable == null || !condition) { |
946 throw new SpannableAssertionFailure(spannable, message); | 944 throw new SpannableAssertionFailure(spannable, message); |
947 } | 945 } |
948 return true; | 946 return true; |
949 } | 947 } |
OLD | NEW |