| 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 class JavaScriptItemCompilationContext extends ItemCompilationContext { | 7 class JavaScriptItemCompilationContext extends ItemCompilationContext { |
| 8 final Set<HInstruction> boundsChecked; | 8 final Set<HInstruction> boundsChecked; |
| 9 | 9 |
| 10 JavaScriptItemCompilationContext() | 10 JavaScriptItemCompilationContext() |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 new MinifyNamer(compiler) : | 364 new MinifyNamer(compiler) : |
| 365 new Namer(compiler); | 365 new Namer(compiler); |
| 366 } | 366 } |
| 367 | 367 |
| 368 bool canBeUsedForGlobalOptimizations(Element element) { | 368 bool canBeUsedForGlobalOptimizations(Element element) { |
| 369 if (element.isParameter() | 369 if (element.isParameter() |
| 370 || element.isFieldParameter() | 370 || element.isFieldParameter() |
| 371 || element.isField()) { | 371 || element.isField()) { |
| 372 element = element.enclosingElement; | 372 element = element.enclosingElement; |
| 373 } | 373 } |
| 374 return !helpersUsed.contains(element.declaration); | 374 element = element.declaration; |
| 375 return !isNeededForReflection(element) && !helpersUsed.contains(element); |
| 375 } | 376 } |
| 376 | 377 |
| 377 bool isInterceptorClass(ClassElement element) { | 378 bool isInterceptorClass(ClassElement element) { |
| 378 if (element == null) return false; | 379 if (element == null) return false; |
| 379 if (Elements.isNativeOrExtendsNative(element)) return true; | 380 if (Elements.isNativeOrExtendsNative(element)) return true; |
| 380 if (interceptedClasses.contains(element)) return true; | 381 if (interceptedClasses.contains(element)) return true; |
| 381 if (classesMixedIntoNativeClasses.contains(element)) return true; | 382 if (classesMixedIntoNativeClasses.contains(element)) return true; |
| 382 return false; | 383 return false; |
| 383 } | 384 } |
| 384 | 385 |
| (...skipping 1304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1689 copy(constant.values); | 1690 copy(constant.values); |
| 1690 copy(constant.protoValue); | 1691 copy(constant.protoValue); |
| 1691 copy(constant); | 1692 copy(constant); |
| 1692 } | 1693 } |
| 1693 | 1694 |
| 1694 void visitConstructed(ConstructedConstant constant) { | 1695 void visitConstructed(ConstructedConstant constant) { |
| 1695 copy(constant.fields); | 1696 copy(constant.fields); |
| 1696 copy(constant); | 1697 copy(constant); |
| 1697 } | 1698 } |
| 1698 } | 1699 } |
| OLD | NEW |