| 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 class SsaCodeGeneratorTask extends CompilerTask { | 5 class SsaCodeGeneratorTask extends CompilerTask { |
| 6 | 6 |
| 7 final JavaScriptBackend backend; | 7 final JavaScriptBackend backend; |
| 8 | 8 |
| 9 SsaCodeGeneratorTask(JavaScriptBackend backend) | 9 SsaCodeGeneratorTask(JavaScriptBackend backend) |
| 10 : this.backend = backend, | 10 : this.backend = backend, |
| (...skipping 1685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1696 for (int i = 0; i < inputs.length; i++) { | 1696 for (int i = 0; i < inputs.length; i++) { |
| 1697 use(inputs[i]); | 1697 use(inputs[i]); |
| 1698 data.add(pop()); | 1698 data.add(pop()); |
| 1699 } | 1699 } |
| 1700 push(new js.LiteralExpression.withData(code, data), node); | 1700 push(new js.LiteralExpression.withData(code, data), node); |
| 1701 } | 1701 } |
| 1702 } | 1702 } |
| 1703 | 1703 |
| 1704 visitForeignNew(HForeignNew node) { | 1704 visitForeignNew(HForeignNew node) { |
| 1705 int j = 0; | 1705 int j = 0; |
| 1706 node.element.forEachInstanceField( | 1706 node.element.implementation.forEachInstanceField( |
| 1707 includeBackendMembers: true, | 1707 includeBackendMembers: true, |
| 1708 includeSuperMembers: true, | 1708 includeSuperMembers: true, |
| 1709 f: (ClassElement enclosingClass, Element member) { | 1709 f: (ClassElement enclosingClass, Element member) { |
| 1710 backend.updateFieldInitializers(member, types[node.inputs[j]]); | 1710 backend.updateFieldInitializers(member, types[node.inputs[j]]); |
| 1711 j++; | 1711 j++; |
| 1712 }); | 1712 }); |
| 1713 String jsClassReference = backend.namer.isolateAccess(node.element); | 1713 String jsClassReference = backend.namer.isolateAccess(node.element); |
| 1714 List<HInstruction> inputs = node.inputs; | 1714 List<HInstruction> inputs = node.inputs; |
| 1715 // We can't use 'visitArguments', since our arguments start at input[0]. | 1715 // We can't use 'visitArguments', since our arguments start at input[0]. |
| 1716 List<js.Expression> arguments = <js.Expression>[]; | 1716 List<js.Expression> arguments = <js.Expression>[]; |
| (...skipping 1277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2994 if (leftType.canBeNull() && rightType.canBeNull()) { | 2994 if (leftType.canBeNull() && rightType.canBeNull()) { |
| 2995 if (left.isConstantNull() || right.isConstantNull() || | 2995 if (left.isConstantNull() || right.isConstantNull() || |
| 2996 (leftType.isPrimitive() && leftType == rightType)) { | 2996 (leftType.isPrimitive() && leftType == rightType)) { |
| 2997 return '=='; | 2997 return '=='; |
| 2998 } | 2998 } |
| 2999 return null; | 2999 return null; |
| 3000 } else { | 3000 } else { |
| 3001 return '==='; | 3001 return '==='; |
| 3002 } | 3002 } |
| 3003 } | 3003 } |
| OLD | NEW |