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 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 } | 271 } |
272 | 272 |
273 js.Node attachLocationRange(js.Node jsNode, | 273 js.Node attachLocationRange(js.Node jsNode, |
274 SourceFileLocation sourcePosition, | 274 SourceFileLocation sourcePosition, |
275 SourceFileLocation endSourcePosition) { | 275 SourceFileLocation endSourcePosition) { |
276 jsNode.sourcePosition = sourcePosition; | 276 jsNode.sourcePosition = sourcePosition; |
277 jsNode.endSourcePosition = endSourcePosition; | 277 jsNode.endSourcePosition = endSourcePosition; |
278 return jsNode; | 278 return jsNode; |
279 } | 279 } |
280 | 280 |
281 beginGraph(HGraph graph); | |
282 endGraph(HGraph graph); | |
283 | |
284 void preGenerateMethod(HGraph graph) { | 281 void preGenerateMethod(HGraph graph) { |
285 new SsaInstructionMerger(generateAtUseSite, compiler).visitGraph(graph); | 282 new SsaInstructionMerger(generateAtUseSite, compiler).visitGraph(graph); |
286 new SsaConditionMerger( | 283 new SsaConditionMerger( |
287 generateAtUseSite, controlFlowOperators).visitGraph(graph); | 284 generateAtUseSite, controlFlowOperators).visitGraph(graph); |
288 SsaLiveIntervalBuilder intervalBuilder = new SsaLiveIntervalBuilder( | 285 SsaLiveIntervalBuilder intervalBuilder = new SsaLiveIntervalBuilder( |
289 compiler, generateAtUseSite, controlFlowOperators); | 286 compiler, generateAtUseSite, controlFlowOperators); |
290 intervalBuilder.visitGraph(graph); | 287 intervalBuilder.visitGraph(graph); |
291 SsaVariableAllocator allocator = new SsaVariableAllocator( | 288 SsaVariableAllocator allocator = new SsaVariableAllocator( |
292 compiler, | 289 compiler, |
293 intervalBuilder.liveInstructions, | 290 intervalBuilder.liveInstructions, |
(...skipping 2299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2593 if (leftType.canBeNull() && rightType.canBeNull()) { | 2590 if (leftType.canBeNull() && rightType.canBeNull()) { |
2594 if (left.isConstantNull() || right.isConstantNull() || | 2591 if (left.isConstantNull() || right.isConstantNull() || |
2595 (leftType.isPrimitive(compiler) && leftType == rightType)) { | 2592 (leftType.isPrimitive(compiler) && leftType == rightType)) { |
2596 return '=='; | 2593 return '=='; |
2597 } | 2594 } |
2598 return null; | 2595 return null; |
2599 } else { | 2596 } else { |
2600 return '==='; | 2597 return '==='; |
2601 } | 2598 } |
2602 } | 2599 } |
OLD | NEW |