| 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 1573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1584 // TODO(ahe): Try to fix the enclosing element of ClosureClassElement | 1584 // TODO(ahe): Try to fix the enclosing element of ClosureClassElement |
| 1585 // instead. | 1585 // instead. |
| 1586 ClosureClassElement closureClass = element; | 1586 ClosureClassElement closureClass = element; |
| 1587 if (isNeededForReflection(closureClass.methodElement)) { | 1587 if (isNeededForReflection(closureClass.methodElement)) { |
| 1588 return registerNameOf(element); | 1588 return registerNameOf(element); |
| 1589 } | 1589 } |
| 1590 } | 1590 } |
| 1591 | 1591 |
| 1592 return false; | 1592 return false; |
| 1593 } | 1593 } |
| 1594 |
| 1595 bool isTypedArray(TypeMask mask) { |
| 1596 // Just checking for [:TypedData:] is not sufficient, as it is an |
| 1597 // abstract class any user-defined class can implement. So we also |
| 1598 // check for the interface [JavaScriptIndexingBehavior]. |
| 1599 return compiler.typedDataClass != null |
| 1600 && mask.satisfies(compiler.typedDataClass, compiler) |
| 1601 && mask.satisfies(jsIndexingBehaviorInterface, compiler); |
| 1602 } |
| 1594 } | 1603 } |
| 1595 | 1604 |
| 1596 /// Records that [type] is used by [user.element]. | 1605 /// Records that [type] is used by [user.element]. |
| 1597 class Dependency { | 1606 class Dependency { |
| 1598 final DartType type; | 1607 final DartType type; |
| 1599 final TreeElements user; | 1608 final TreeElements user; |
| 1600 | 1609 |
| 1601 const Dependency(this.type, this.user); | 1610 const Dependency(this.type, this.user); |
| 1602 } | 1611 } |
| 1603 | 1612 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1642 copy(constant.values); | 1651 copy(constant.values); |
| 1643 copy(constant.protoValue); | 1652 copy(constant.protoValue); |
| 1644 copy(constant); | 1653 copy(constant); |
| 1645 } | 1654 } |
| 1646 | 1655 |
| 1647 void visitConstructed(ConstructedConstant constant) { | 1656 void visitConstructed(ConstructedConstant constant) { |
| 1648 copy(constant.fields); | 1657 copy(constant.fields); |
| 1649 copy(constant); | 1658 copy(constant); |
| 1650 } | 1659 } |
| 1651 } | 1660 } |
| OLD | NEW |