| 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 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 static Namer determineNamer(Compiler compiler) { | 359 static Namer determineNamer(Compiler compiler) { |
| 360 return compiler.enableMinification ? | 360 return compiler.enableMinification ? |
| 361 new MinifyNamer(compiler) : | 361 new MinifyNamer(compiler) : |
| 362 new Namer(compiler); | 362 new Namer(compiler); |
| 363 } | 363 } |
| 364 | 364 |
| 365 bool canBeUsedForGlobalOptimizations(Element element) { | 365 bool canBeUsedForGlobalOptimizations(Element element) { |
| 366 if (element.isParameter() | 366 if (element.isParameter() |
| 367 || element.isFieldParameter() | 367 || element.isFieldParameter() |
| 368 || element.isField()) { | 368 || element.isField()) { |
| 369 if (hasInsufficientMirrorsUsed && compiler.enabledInvokeOn) return false; |
| 369 if (!canBeUsedForGlobalOptimizations(element.enclosingElement)) { | 370 if (!canBeUsedForGlobalOptimizations(element.enclosingElement)) { |
| 370 return false; | 371 return false; |
| 371 } | 372 } |
| 372 } | 373 } |
| 373 element = element.declaration; | 374 element = element.declaration; |
| 374 return !isNeededForReflection(element) && !helpersUsed.contains(element); | 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; |
| (...skipping 1304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1683 copy(constant.values); | 1684 copy(constant.values); |
| 1684 copy(constant.protoValue); | 1685 copy(constant.protoValue); |
| 1685 copy(constant); | 1686 copy(constant); |
| 1686 } | 1687 } |
| 1687 | 1688 |
| 1688 void visitConstructed(ConstructedConstant constant) { | 1689 void visitConstructed(ConstructedConstant constant) { |
| 1689 copy(constant.fields); | 1690 copy(constant.fields); |
| 1690 copy(constant); | 1691 copy(constant); |
| 1691 } | 1692 } |
| 1692 } | 1693 } |
| OLD | NEW |