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 js_backend; | 5 part of js_backend; |
6 | 6 |
7 const VERBOSE_OPTIMIZER_HINTS = false; | 7 const VERBOSE_OPTIMIZER_HINTS = false; |
8 | 8 |
9 class JavaScriptItemCompilationContext extends ItemCompilationContext { | 9 class JavaScriptItemCompilationContext extends ItemCompilationContext { |
10 final Set<HInstruction> boundsChecked = new Set<HInstruction>(); | 10 final Set<HInstruction> boundsChecked = new Set<HInstruction>(); |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 } | 208 } |
209 | 209 |
210 void markAsMustInline(FunctionElement element) { | 210 void markAsMustInline(FunctionElement element) { |
211 _cachedDecisions[element] = _mustInline; | 211 _cachedDecisions[element] = _mustInline; |
212 } | 212 } |
213 } | 213 } |
214 | 214 |
215 enum SyntheticConstantKind { | 215 enum SyntheticConstantKind { |
216 DUMMY_INTERCEPTOR, | 216 DUMMY_INTERCEPTOR, |
217 EMPTY_VALUE, | 217 EMPTY_VALUE, |
218 TYPEVARIABLE_REFERENCE, // Reference to a type in reflection data. | 218 TYPEVARIABLE_REFERENCE, |
219 NAME | 219 NAME |
220 } | 220 } |
221 | 221 |
222 class JavaScriptBackend extends Backend { | 222 class JavaScriptBackend extends Backend { |
223 static final Uri DART_JS_HELPER = new Uri(scheme: 'dart', path: '_js_helper'); | 223 static final Uri DART_JS_HELPER = new Uri(scheme: 'dart', path: '_js_helper'); |
224 static final Uri DART_INTERCEPTORS = | 224 static final Uri DART_INTERCEPTORS = |
225 new Uri(scheme: 'dart', path: '_interceptors'); | 225 new Uri(scheme: 'dart', path: '_interceptors'); |
226 static final Uri DART_FOREIGN_HELPER = | 226 static final Uri DART_FOREIGN_HELPER = |
227 new Uri(scheme: 'dart', path: '_foreign_helper'); | 227 new Uri(scheme: 'dart', path: '_foreign_helper'); |
228 static final Uri DART_JS_MIRRORS = | 228 static final Uri DART_JS_MIRRORS = |
(...skipping 2944 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3173 } | 3173 } |
3174 } | 3174 } |
3175 | 3175 |
3176 /// Records that [constant] is used by the element behind [registry]. | 3176 /// Records that [constant] is used by the element behind [registry]. |
3177 class Dependency { | 3177 class Dependency { |
3178 final ConstantValue constant; | 3178 final ConstantValue constant; |
3179 final Element annotatedElement; | 3179 final Element annotatedElement; |
3180 | 3180 |
3181 const Dependency(this.constant, this.annotatedElement); | 3181 const Dependency(this.constant, this.annotatedElement); |
3182 } | 3182 } |
OLD | NEW |