| 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 final JavaScriptBackend backend; | 6 final JavaScriptBackend backend; |
| 7 SsaCodeGeneratorTask(JavaScriptBackend backend) | 7 SsaCodeGeneratorTask(JavaScriptBackend backend) |
| 8 : this.backend = backend, | 8 : this.backend = backend, |
| 9 super(backend.compiler); | 9 super(backend.compiler); |
| 10 String get name() => 'SSA code generator'; | 10 String get name() => 'SSA code generator'; |
| (...skipping 1846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1857 String name = compiler.namer.getName(node.element); | 1857 String name = compiler.namer.getName(node.element); |
| 1858 beginExpression(JSPrecedence.ASSIGNMENT_PRECEDENCE); | 1858 beginExpression(JSPrecedence.ASSIGNMENT_PRECEDENCE); |
| 1859 use(node.receiver, JSPrecedence.MEMBER_PRECEDENCE); | 1859 use(node.receiver, JSPrecedence.MEMBER_PRECEDENCE); |
| 1860 buffer.add('.'); | 1860 buffer.add('.'); |
| 1861 buffer.add(name); | 1861 buffer.add(name); |
| 1862 Type type = node.receiver.propagatedType.computeType(compiler); | 1862 Type type = node.receiver.propagatedType.computeType(compiler); |
| 1863 if (type != null) { | 1863 if (type != null) { |
| 1864 if (!work.element.isGenerativeConstructorBody()) { | 1864 if (!work.element.isGenerativeConstructorBody()) { |
| 1865 world.registerFieldSetter(node.element.name, type); | 1865 world.registerFieldSetter(node.element.name, type); |
| 1866 } | 1866 } |
| 1867 backend.updateFieldIntegerSetters(node.element, | 1867 backend.updateFieldSetters(node.element, |
| 1868 node.value.isInteger()); | 1868 node.value.propagatedType); |
| 1869 } | 1869 } |
| 1870 buffer.add(' = '); | 1870 buffer.add(' = '); |
| 1871 use(node.value, JSPrecedence.ASSIGNMENT_PRECEDENCE); | 1871 use(node.value, JSPrecedence.ASSIGNMENT_PRECEDENCE); |
| 1872 endExpression(JSPrecedence.ASSIGNMENT_PRECEDENCE); | 1872 endExpression(JSPrecedence.ASSIGNMENT_PRECEDENCE); |
| 1873 } | 1873 } |
| 1874 | 1874 |
| 1875 visitLocalGet(HLocalGet node) { | 1875 visitLocalGet(HLocalGet node) { |
| 1876 use(node.receiver, JSPrecedence.EXPRESSION_PRECEDENCE); | 1876 use(node.receiver, JSPrecedence.EXPRESSION_PRECEDENCE); |
| 1877 } | 1877 } |
| 1878 | 1878 |
| (...skipping 1229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3108 startBailoutSwitch(); | 3108 startBailoutSwitch(); |
| 3109 } | 3109 } |
| 3110 } | 3110 } |
| 3111 | 3111 |
| 3112 void endLabeledBlock(HLabeledBlockInformation labeledBlockInfo) { | 3112 void endLabeledBlock(HLabeledBlockInformation labeledBlockInfo) { |
| 3113 if (labeledBlockInfo.body.start.hasGuards()) { | 3113 if (labeledBlockInfo.body.start.hasGuards()) { |
| 3114 endBailoutSwitch(); | 3114 endBailoutSwitch(); |
| 3115 } | 3115 } |
| 3116 } | 3116 } |
| 3117 } | 3117 } |
| OLD | NEW |