| 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 1603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1614 beginExpression(JSPrecedence.LOGICAL_OR_PRECEDENCE); | 1614 beginExpression(JSPrecedence.LOGICAL_OR_PRECEDENCE); |
| 1615 checkArray(input, '==='); | 1615 checkArray(input, '==='); |
| 1616 buffer.add(' || '); | 1616 buffer.add(' || '); |
| 1617 checkType(input, element); | 1617 checkType(input, element); |
| 1618 buffer.add(')'); | 1618 buffer.add(')'); |
| 1619 endExpression(JSPrecedence.LOGICAL_OR_PRECEDENCE); | 1619 endExpression(JSPrecedence.LOGICAL_OR_PRECEDENCE); |
| 1620 endExpression(JSPrecedence.LOGICAL_AND_PRECEDENCE); | 1620 endExpression(JSPrecedence.LOGICAL_AND_PRECEDENCE); |
| 1621 } | 1621 } |
| 1622 | 1622 |
| 1623 void visitIs(HIs node) { | 1623 void visitIs(HIs node) { |
| 1624 Type type = node.typeName; | 1624 Type type = node.typeExpression; |
| 1625 Element element = type.element; | 1625 Element element = type.element; |
| 1626 if (element.kind === ElementKind.TYPE_VARIABLE) { | 1626 if (element.kind === ElementKind.TYPE_VARIABLE) { |
| 1627 compiler.unimplemented("visitIs for type variables"); | 1627 compiler.unimplemented("visitIs for type variables", instruction: node); |
| 1628 } else if (element.kind === ElementKind.TYPEDEF) { | 1628 } else if (element.kind === ElementKind.TYPEDEF) { |
| 1629 compiler.unimplemented("visitIs for typedefs"); | 1629 compiler.unimplemented("visitIs for typedefs", instruction: node); |
| 1630 } | 1630 } |
| 1631 compiler.registerIsCheck(element); | 1631 compiler.registerIsCheck(element); |
| 1632 LibraryElement coreLibrary = compiler.coreLibrary; | 1632 LibraryElement coreLibrary = compiler.coreLibrary; |
| 1633 ClassElement objectClass = compiler.objectClass; | 1633 ClassElement objectClass = compiler.objectClass; |
| 1634 HInstruction input = node.expression; | 1634 HInstruction input = node.expression; |
| 1635 if (node.nullOk) { | 1635 if (node.nullOk) { |
| 1636 beginExpression(JSPrecedence.LOGICAL_OR_PRECEDENCE); | 1636 beginExpression(JSPrecedence.LOGICAL_OR_PRECEDENCE); |
| 1637 checkNull(input); | 1637 checkNull(input); |
| 1638 buffer.add(' || '); | 1638 buffer.add(' || '); |
| 1639 } | 1639 } |
| (...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2079 startBailoutSwitch(); | 2079 startBailoutSwitch(); |
| 2080 } | 2080 } |
| 2081 } | 2081 } |
| 2082 | 2082 |
| 2083 void endLabeledBlock(HLabeledBlockInformation labeledBlockInfo) { | 2083 void endLabeledBlock(HLabeledBlockInformation labeledBlockInfo) { |
| 2084 if (labeledBlockInfo.body.start.hasGuards()) { | 2084 if (labeledBlockInfo.body.start.hasGuards()) { |
| 2085 endBailoutSwitch(); | 2085 endBailoutSwitch(); |
| 2086 } | 2086 } |
| 2087 } | 2087 } |
| 2088 } | 2088 } |
| OLD | NEW |