| 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 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 613 } | 613 } |
| 614 } | 614 } |
| 615 | 615 |
| 616 void use(HInstruction argument) { | 616 void use(HInstruction argument) { |
| 617 if (isGenerateAtUseSite(argument)) { | 617 if (isGenerateAtUseSite(argument)) { |
| 618 visitExpression(argument); | 618 visitExpression(argument); |
| 619 } else if (argument is HCheck && !variableNames.hasName(argument)) { | 619 } else if (argument is HCheck && !variableNames.hasName(argument)) { |
| 620 HCheck check = argument; | 620 HCheck check = argument; |
| 621 use(check.checkedInput); | 621 use(check.checkedInput); |
| 622 } else { | 622 } else { |
| 623 assert(variableNames.hasName(argument)); |
| 623 push(new js.VariableUse(variableNames.getName(argument))); | 624 push(new js.VariableUse(variableNames.getName(argument))); |
| 624 } | 625 } |
| 625 } | 626 } |
| 626 | 627 |
| 627 visit(HInstruction node) { | 628 visit(HInstruction node) { |
| 628 node.accept(this); | 629 node.accept(this); |
| 629 } | 630 } |
| 630 | 631 |
| 631 visitExpression(HInstruction node) { | 632 visitExpression(HInstruction node) { |
| 632 bool oldIsGeneratingExpression = isGeneratingExpression; | 633 bool oldIsGeneratingExpression = isGeneratingExpression; |
| (...skipping 2379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3012 if (leftType.canBeNull() && rightType.canBeNull()) { | 3013 if (leftType.canBeNull() && rightType.canBeNull()) { |
| 3013 if (left.isConstantNull() || right.isConstantNull() || | 3014 if (left.isConstantNull() || right.isConstantNull() || |
| 3014 (leftType.isPrimitive() && leftType == rightType)) { | 3015 (leftType.isPrimitive() && leftType == rightType)) { |
| 3015 return '=='; | 3016 return '=='; |
| 3016 } | 3017 } |
| 3017 return null; | 3018 return null; |
| 3018 } else { | 3019 } else { |
| 3019 return '==='; | 3020 return '==='; |
| 3020 } | 3021 } |
| 3021 } | 3022 } |
| OLD | NEW |