| 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 SsaCodeGeneratorTask(Compiler compiler) : super(compiler); | 6 SsaCodeGeneratorTask(Compiler compiler) : super(compiler); |
| 7 String get name() => 'SSA code generator'; | 7 String get name() => 'SSA code generator'; |
| 8 | 8 |
| 9 | 9 |
| 10 String buildJavaScriptFunction(FunctionElement element, | 10 String buildJavaScriptFunction(FunctionElement element, |
| (...skipping 1662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1673 } | 1673 } |
| 1674 } | 1674 } |
| 1675 } | 1675 } |
| 1676 | 1676 |
| 1677 visitNot(HNot node) { | 1677 visitNot(HNot node) { |
| 1678 assert(node.inputs.length == 1); | 1678 assert(node.inputs.length == 1); |
| 1679 HInstruction input = node.inputs[0]; | 1679 HInstruction input = node.inputs[0]; |
| 1680 if (input is HBoolify && isGenerateAtUseSite(input)) { | 1680 if (input is HBoolify && isGenerateAtUseSite(input)) { |
| 1681 beginExpression(JSPrecedence.EQUALITY_PRECEDENCE); | 1681 beginExpression(JSPrecedence.EQUALITY_PRECEDENCE); |
| 1682 assert(node.inputs.length == 1); | 1682 assert(node.inputs.length == 1); |
| 1683 use(node.inputs[0], JSPrecedence.EQUALITY_PRECEDENCE); | 1683 use(input.inputs[0], JSPrecedence.EQUALITY_PRECEDENCE); |
| 1684 buffer.add(' !== true'); | 1684 buffer.add(' !== true'); |
| 1685 endExpression(JSPrecedence.EQUALITY_PRECEDENCE); | 1685 endExpression(JSPrecedence.EQUALITY_PRECEDENCE); |
| 1686 } else if (input is HRelational && | 1686 } else if (input is HRelational && |
| 1687 input.builtin && | 1687 input.builtin && |
| 1688 isGenerateAtUseSite(input)) { | 1688 isGenerateAtUseSite(input)) { |
| 1689 Map<String, String> inverseOperator = const <String>{ | 1689 Map<String, String> inverseOperator = const <String>{ |
| 1690 "==" : "!=", | 1690 "==" : "!=", |
| 1691 "!=" : "==", | 1691 "!=" : "==", |
| 1692 "===": "!==", | 1692 "===": "!==", |
| 1693 "!==": "===", | 1693 "!==": "===", |
| (...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2593 startBailoutSwitch(); | 2593 startBailoutSwitch(); |
| 2594 } | 2594 } |
| 2595 } | 2595 } |
| 2596 | 2596 |
| 2597 void endLabeledBlock(HLabeledBlockInformation labeledBlockInfo) { | 2597 void endLabeledBlock(HLabeledBlockInformation labeledBlockInfo) { |
| 2598 if (labeledBlockInfo.body.start.hasGuards()) { | 2598 if (labeledBlockInfo.body.start.hasGuards()) { |
| 2599 endBailoutSwitch(); | 2599 endBailoutSwitch(); |
| 2600 } | 2600 } |
| 2601 } | 2601 } |
| 2602 } | 2602 } |
| OLD | NEW |