| 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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 endGraph(HGraph graph); | 292 endGraph(HGraph graph); |
| 293 | 293 |
| 294 preLabeledBlock(HLabeledBlockInformation labeledBlockInfo); | 294 preLabeledBlock(HLabeledBlockInformation labeledBlockInfo); |
| 295 startLabeledBlock(HLabeledBlockInformation labeledBlockInfo); | 295 startLabeledBlock(HLabeledBlockInformation labeledBlockInfo); |
| 296 endLabeledBlock(HLabeledBlockInformation labeledBlockInfo); | 296 endLabeledBlock(HLabeledBlockInformation labeledBlockInfo); |
| 297 | 297 |
| 298 void preGenerateMethod(HGraph graph) { | 298 void preGenerateMethod(HGraph graph) { |
| 299 new SsaInstructionMerger(generateAtUseSite, compiler).visitGraph(graph); | 299 new SsaInstructionMerger(generateAtUseSite, compiler).visitGraph(graph); |
| 300 new SsaConditionMerger( | 300 new SsaConditionMerger( |
| 301 generateAtUseSite, controlFlowOperators).visitGraph(graph); | 301 generateAtUseSite, controlFlowOperators).visitGraph(graph); |
| 302 SsaLiveIntervalBuilder intervalBuilder = | 302 SsaLiveIntervalBuilder intervalBuilder = new SsaLiveIntervalBuilder( |
| 303 new SsaLiveIntervalBuilder(compiler, generateAtUseSite); | 303 compiler, generateAtUseSite, controlFlowOperators); |
| 304 intervalBuilder.visitGraph(graph); | 304 intervalBuilder.visitGraph(graph); |
| 305 SsaVariableAllocator allocator = new SsaVariableAllocator( | 305 SsaVariableAllocator allocator = new SsaVariableAllocator( |
| 306 compiler, | 306 compiler, |
| 307 intervalBuilder.liveInstructions, | 307 intervalBuilder.liveInstructions, |
| 308 intervalBuilder.liveIntervals, | 308 intervalBuilder.liveIntervals, |
| 309 generateAtUseSite); | 309 generateAtUseSite); |
| 310 allocator.visitGraph(graph); | 310 allocator.visitGraph(graph); |
| 311 variableNames = allocator.names; | 311 variableNames = allocator.names; |
| 312 shouldGroupVarDeclarations = allocator.names.numberOfVariables > 1; | 312 shouldGroupVarDeclarations = allocator.names.numberOfVariables > 1; |
| 313 } | 313 } |
| (...skipping 2674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2988 if (leftType.canBeNull() && rightType.canBeNull()) { | 2988 if (leftType.canBeNull() && rightType.canBeNull()) { |
| 2989 if (left.isConstantNull() || right.isConstantNull() || | 2989 if (left.isConstantNull() || right.isConstantNull() || |
| 2990 (leftType.isPrimitive(compiler) && leftType == rightType)) { | 2990 (leftType.isPrimitive(compiler) && leftType == rightType)) { |
| 2991 return '=='; | 2991 return '=='; |
| 2992 } | 2992 } |
| 2993 return null; | 2993 return null; |
| 2994 } else { | 2994 } else { |
| 2995 return '==='; | 2995 return '==='; |
| 2996 } | 2996 } |
| 2997 } | 2997 } |
| OLD | NEW |