| 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 generateMethod(WorkItem work, HGraph graph) { | 10 String generateMethod(WorkItem work, HGraph graph) { |
| (...skipping 1743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1754 checkType(input, element); | 1754 checkType(input, element); |
| 1755 buffer.add(')'); | 1755 buffer.add(')'); |
| 1756 endExpression(JSPrecedence.LOGICAL_OR_PRECEDENCE); | 1756 endExpression(JSPrecedence.LOGICAL_OR_PRECEDENCE); |
| 1757 endExpression(JSPrecedence.LOGICAL_AND_PRECEDENCE); | 1757 endExpression(JSPrecedence.LOGICAL_AND_PRECEDENCE); |
| 1758 } | 1758 } |
| 1759 | 1759 |
| 1760 void visitIs(HIs node) { | 1760 void visitIs(HIs node) { |
| 1761 Type type = node.typeExpression; | 1761 Type type = node.typeExpression; |
| 1762 Element element = type.element; | 1762 Element element = type.element; |
| 1763 if (element.kind === ElementKind.TYPE_VARIABLE) { | 1763 if (element.kind === ElementKind.TYPE_VARIABLE) { |
| 1764 compiler.unimplemented("visitIs for type variables"); | 1764 compiler.unimplemented("visitIs for type variables", instruction: node); |
| 1765 } else if (element.kind === ElementKind.TYPEDEF) { | 1765 } else if (element.kind === ElementKind.TYPEDEF) { |
| 1766 compiler.unimplemented("visitIs for typedefs"); | 1766 compiler.unimplemented("visitIs for typedefs", instruction: node); |
| 1767 } | 1767 } |
| 1768 compiler.registerIsCheck(type.element); | 1768 compiler.registerIsCheck(type.element); |
| 1769 LibraryElement coreLibrary = compiler.coreLibrary; | 1769 LibraryElement coreLibrary = compiler.coreLibrary; |
| 1770 ClassElement objectClass = compiler.objectClass; | 1770 ClassElement objectClass = compiler.objectClass; |
| 1771 HInstruction input = node.expression; | 1771 HInstruction input = node.expression; |
| 1772 | 1772 |
| 1773 if (node.nullOk) { | 1773 if (node.nullOk) { |
| 1774 beginExpression(JSPrecedence.LOGICAL_OR_PRECEDENCE); | 1774 beginExpression(JSPrecedence.LOGICAL_OR_PRECEDENCE); |
| 1775 checkNull(input); | 1775 checkNull(input); |
| 1776 buffer.add(' || '); | 1776 buffer.add(' || '); |
| (...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2229 startBailoutSwitch(); | 2229 startBailoutSwitch(); |
| 2230 } | 2230 } |
| 2231 } | 2231 } |
| 2232 | 2232 |
| 2233 void endLabeledBlock(HLabeledBlockInformation labeledBlockInfo) { | 2233 void endLabeledBlock(HLabeledBlockInformation labeledBlockInfo) { |
| 2234 if (labeledBlockInfo.body.start.hasGuards()) { | 2234 if (labeledBlockInfo.body.start.hasGuards()) { |
| 2235 endBailoutSwitch(); | 2235 endBailoutSwitch(); |
| 2236 } | 2236 } |
| 2237 } | 2237 } |
| 2238 } | 2238 } |
| OLD | NEW |