Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(126)

Side by Side Diff: sdk/lib/_internal/compiler/implementation/js_backend/backend.dart

Issue 23766002: Work around runtime engine deficiencies. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698