| 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 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 static Namer determineNamer(Compiler compiler) { | 362 static Namer determineNamer(Compiler compiler) { |
| 363 return compiler.enableMinification ? | 363 return compiler.enableMinification ? |
| 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 if (hasInsufficientMirrorsUsed && compiler.enabledInvokeOn) return false; |
| 372 if (!canBeUsedForGlobalOptimizations(element.enclosingElement)) { | 373 if (!canBeUsedForGlobalOptimizations(element.enclosingElement)) { |
| 373 return false; | 374 return false; |
| 374 } | 375 } |
| 375 } | 376 } |
| 376 element = element.declaration; | 377 element = element.declaration; |
| 377 return !isNeededForReflection(element) && !helpersUsed.contains(element); | 378 return !isNeededForReflection(element) && !helpersUsed.contains(element); |
| 378 } | 379 } |
| 379 | 380 |
| 380 bool isInterceptorClass(ClassElement element) { | 381 bool isInterceptorClass(ClassElement element) { |
| 381 if (element == null) return false; | 382 if (element == null) return false; |
| (...skipping 1315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1697 copy(constant.values); | 1698 copy(constant.values); |
| 1698 copy(constant.protoValue); | 1699 copy(constant.protoValue); |
| 1699 copy(constant); | 1700 copy(constant); |
| 1700 } | 1701 } |
| 1701 | 1702 |
| 1702 void visitConstructed(ConstructedConstant constant) { | 1703 void visitConstructed(ConstructedConstant constant) { |
| 1703 copy(constant.fields); | 1704 copy(constant.fields); |
| 1704 copy(constant); | 1705 copy(constant); |
| 1705 } | 1706 } |
| 1706 } | 1707 } |
| OLD | NEW |