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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/ssa/optimize.dart

Issue 15381002: Fix a pretty bad bug of a class inheriting a patched class. The fix is (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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 ssa; 5 part of ssa;
6 6
7 abstract class OptimizationPhase { 7 abstract class OptimizationPhase {
8 String get name; 8 String get name;
9 void visitGraph(HGraph graph); 9 void visitGraph(HGraph graph);
10 } 10 }
(...skipping 1568 matching lines...) Expand 10 before | Expand all | Expand 10 after
1579 // Here we handle members in superclasses as well, as the handling of 1579 // Here we handle members in superclasses as well, as the handling of
1580 // the generative constructor bodies will ensure, that the initializer 1580 // the generative constructor bodies will ensure, that the initializer
1581 // type will not be used if the field is in any of these. 1581 // type will not be used if the field is in any of these.
1582 int j = 0; 1582 int j = 0;
1583 node.element.forEachInstanceField( 1583 node.element.forEachInstanceField(
1584 (ClassElement enclosingClass, Element element) { 1584 (ClassElement enclosingClass, Element element) {
1585 backend.registerFieldInitializer( 1585 backend.registerFieldInitializer(
1586 element, node.inputs[j].instructionType); 1586 element, node.inputs[j].instructionType);
1587 j++; 1587 j++;
1588 }, 1588 },
1589 includeBackendMembers: false, 1589 includeSuperAndInjectedMembers: true);
1590 includeSuperMembers: true);
1591 } 1590 }
1592 1591
1593 visitFieldSet(HFieldSet node) { 1592 visitFieldSet(HFieldSet node) {
1594 Element field = node.element; 1593 Element field = node.element;
1595 HInstruction value = node.value; 1594 HInstruction value = node.value;
1596 HType type = value.instructionType; 1595 HType type = value.instructionType;
1597 // [HFieldSet] is also used for variables in try/catch. 1596 // [HFieldSet] is also used for variables in try/catch.
1598 if (field.isField()) allSetters.add(field); 1597 if (field.isField()) allSetters.add(field);
1599 // Don't handle fields defined in superclasses. Given that the field is 1598 // Don't handle fields defined in superclasses. Given that the field is
1600 // always added to the [allSetters] set, setting a field defined in a 1599 // always added to the [allSetters] set, setting a field defined in a
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
1714 HBasicBlock block = user.block; 1713 HBasicBlock block = user.block;
1715 block.addAfter(user, interceptor); 1714 block.addAfter(user, interceptor);
1716 block.rewrite(user, interceptor); 1715 block.rewrite(user, interceptor);
1717 block.remove(user); 1716 block.remove(user);
1718 1717
1719 // The interceptor will be removed in the dead code elimination 1718 // The interceptor will be removed in the dead code elimination
1720 // phase. Note that removing it here would not work because of how 1719 // phase. Note that removing it here would not work because of how
1721 // the [visitBasicBlock] is implemented. 1720 // the [visitBasicBlock] is implemented.
1722 } 1721 }
1723 } 1722 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698