| 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 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 generator = new SsaCodeGeneratorTask(this); | 351 generator = new SsaCodeGeneratorTask(this); |
| 352 } | 352 } |
| 353 | 353 |
| 354 static Namer determineNamer(Compiler compiler) { | 354 static Namer determineNamer(Compiler compiler) { |
| 355 return compiler.enableMinification ? | 355 return compiler.enableMinification ? |
| 356 new MinifyNamer(compiler) : | 356 new MinifyNamer(compiler) : |
| 357 new Namer(compiler); | 357 new Namer(compiler); |
| 358 } | 358 } |
| 359 | 359 |
| 360 bool canBeUsedForGlobalOptimizations(Element element) { | 360 bool canBeUsedForGlobalOptimizations(Element element) { |
| 361 // TODO(ngeoffray): Re-enable after investigating bug. | |
| 362 return true; | |
| 363 if (element.isParameter() || element.isFieldParameter()) { | 361 if (element.isParameter() || element.isFieldParameter()) { |
| 364 element = element.enclosingElement; | 362 element = element.enclosingElement; |
| 365 } | 363 } |
| 366 return !helpersUsed.contains(element.declaration); | 364 return !helpersUsed.contains(element.declaration); |
| 367 } | 365 } |
| 368 | 366 |
| 369 bool isInterceptorClass(ClassElement element) { | 367 bool isInterceptorClass(ClassElement element) { |
| 370 if (element == null) return false; | 368 if (element == null) return false; |
| 371 if (element.isNative()) return true; | 369 if (element.isNative()) return true; |
| 372 if (interceptedClasses.contains(element)) return true; | 370 if (interceptedClasses.contains(element)) return true; |
| (...skipping 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1585 copy(constant.values); | 1583 copy(constant.values); |
| 1586 copy(constant.protoValue); | 1584 copy(constant.protoValue); |
| 1587 copy(constant); | 1585 copy(constant); |
| 1588 } | 1586 } |
| 1589 | 1587 |
| 1590 void visitConstructed(ConstructedConstant constant) { | 1588 void visitConstructed(ConstructedConstant constant) { |
| 1591 copy(constant.fields); | 1589 copy(constant.fields); |
| 1592 copy(constant); | 1590 copy(constant); |
| 1593 } | 1591 } |
| 1594 } | 1592 } |
| OLD | NEW |