| 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 ssa; | 5 part of ssa; |
| 6 | 6 |
| 7 class SsaCodeGeneratorTask extends CompilerTask { | 7 class SsaCodeGeneratorTask extends CompilerTask { |
| 8 | 8 |
| 9 final JavaScriptBackend backend; | 9 final JavaScriptBackend backend; |
| 10 | 10 |
| (...skipping 1599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1610 | 1610 |
| 1611 push(new js.VariableUse(backend.namer.isolateAccess(node.element))); | 1611 push(new js.VariableUse(backend.namer.isolateAccess(node.element))); |
| 1612 push(new js.Call(pop(), visitArguments(node.inputs, start: 0)), node); | 1612 push(new js.Call(pop(), visitArguments(node.inputs, start: 0)), node); |
| 1613 } | 1613 } |
| 1614 | 1614 |
| 1615 visitInvokeSuper(HInvokeSuper node) { | 1615 visitInvokeSuper(HInvokeSuper node) { |
| 1616 Element superMethod = node.element; | 1616 Element superMethod = node.element; |
| 1617 world.registerStaticUse(superMethod); | 1617 world.registerStaticUse(superMethod); |
| 1618 ClassElement superClass = superMethod.getEnclosingClass(); | 1618 ClassElement superClass = superMethod.getEnclosingClass(); |
| 1619 if (superMethod.kind == ElementKind.FIELD) { | 1619 if (superMethod.kind == ElementKind.FIELD) { |
| 1620 String fieldName = node.caller.isShadowedByField(superMethod) | 1620 String fieldName = superMethod.hasFixedBackendName() |
| 1621 ? backend.namer.shadowedFieldName(superMethod) | 1621 ? superMethod.fixedBackendName() |
| 1622 : backend.namer.instanceFieldName(superMethod); | 1622 : node.caller.isShadowedByField(superMethod) |
| 1623 ? backend.namer.shadowedFieldName(superMethod) |
| 1624 : backend.namer.instanceFieldName(superMethod); |
| 1623 use(node.inputs[0]); | 1625 use(node.inputs[0]); |
| 1624 js.PropertyAccess access = | 1626 js.PropertyAccess access = |
| 1625 new js.PropertyAccess.field(pop(), fieldName); | 1627 new js.PropertyAccess.field(pop(), fieldName); |
| 1626 if (node.isSetter) { | 1628 if (node.isSetter) { |
| 1627 use(node.value); | 1629 use(node.value); |
| 1628 push(new js.Assignment(access, pop()), node); | 1630 push(new js.Assignment(access, pop()), node); |
| 1629 } else { | 1631 } else { |
| 1630 push(access, node); | 1632 push(access, node); |
| 1631 } | 1633 } |
| 1632 } else { | 1634 } else { |
| (...skipping 954 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2587 if (left.isConstantNull() || right.isConstantNull() || | 2589 if (left.isConstantNull() || right.isConstantNull() || |
| 2588 (left.isPrimitive(compiler) && | 2590 (left.isPrimitive(compiler) && |
| 2589 left.instructionType == right.instructionType)) { | 2591 left.instructionType == right.instructionType)) { |
| 2590 return '=='; | 2592 return '=='; |
| 2591 } | 2593 } |
| 2592 return null; | 2594 return null; |
| 2593 } else { | 2595 } else { |
| 2594 return '==='; | 2596 return '==='; |
| 2595 } | 2597 } |
| 2596 } | 2598 } |
| OLD | NEW |