| 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 buildJavaScriptFunction(FunctionElement element, | 10 String buildJavaScriptFunction(FunctionElement element, |
| (...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 572 // Foo a = foo(); | 572 // Foo a = foo(); |
| 573 // print(a); | 573 // print(a); |
| 574 // | 574 // |
| 575 // In checked mode will turn into: | 575 // In checked mode will turn into: |
| 576 // print(FooTypeCheck(foo())); | 576 // print(FooTypeCheck(foo())); |
| 577 visit(argument, expectedPrecedenceForArgument); | 577 visit(argument, expectedPrecedenceForArgument); |
| 578 } else if (isGenerateAtUseSite(input)) { | 578 } else if (isGenerateAtUseSite(input)) { |
| 579 // If [argument] cannot be generated at use site, but [input] | 579 // If [argument] cannot be generated at use site, but [input] |
| 580 // can, use the temporary of [argument]. A code motion | 580 // can, use the temporary of [argument]. A code motion |
| 581 // invariant instruction does not have a temporary, so we just | 581 // invariant instruction does not have a temporary, so we just |
| 582 // | 582 // |
| 583 // For example: | 583 // For example: |
| 584 // Foo a = foo(); | 584 // Foo a = foo(); |
| 585 // print(a); | 585 // print(a); |
| 586 // print(a); | 586 // print(a); |
| 587 // | 587 // |
| 588 // In checked mode will turn into: | 588 // In checked mode will turn into: |
| 589 // var a = FooTypeCheck(foo()); | 589 // var a = FooTypeCheck(foo()); |
| 590 // print(a); | 590 // print(a); |
| 591 // print(a); | 591 // print(a); |
| 592 // | 592 // |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 679 } | 679 } |
| 680 return true; | 680 return true; |
| 681 } | 681 } |
| 682 | 682 |
| 683 bool visitSequenceInfo(HStatementSequenceInformation info) { | 683 bool visitSequenceInfo(HStatementSequenceInformation info) { |
| 684 return false; | 684 return false; |
| 685 } | 685 } |
| 686 | 686 |
| 687 bool visitSubGraphInfo(HSubGraphBlockInformation info) { | 687 bool visitSubGraphInfo(HSubGraphBlockInformation info) { |
| 688 visitSubGraph(info.subGraph); | 688 visitSubGraph(info.subGraph); |
| 689 // A [HSubGraphBlockInformation] is always part of another block | 689 return true; |
| 690 // information structure, so it doesn't have a joinBlock. | |
| 691 } | 690 } |
| 692 | 691 |
| 693 bool visitSubExpressionInfo(HSubExpressionBlockInformation info) { | 692 bool visitSubExpressionInfo(HSubExpressionBlockInformation info) { |
| 694 return false; | 693 return false; |
| 695 } | 694 } |
| 696 | 695 |
| 697 bool visitAndOrInfo(HAndOrBlockInformation info) { | 696 bool visitAndOrInfo(HAndOrBlockInformation info) { |
| 698 return false; | 697 return false; |
| 699 } | 698 } |
| 700 | 699 |
| (...skipping 1893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2594 startBailoutSwitch(); | 2593 startBailoutSwitch(); |
| 2595 } | 2594 } |
| 2596 } | 2595 } |
| 2597 | 2596 |
| 2598 void endLabeledBlock(HLabeledBlockInformation labeledBlockInfo) { | 2597 void endLabeledBlock(HLabeledBlockInformation labeledBlockInfo) { |
| 2599 if (labeledBlockInfo.body.start.hasGuards()) { | 2598 if (labeledBlockInfo.body.start.hasGuards()) { |
| 2600 endBailoutSwitch(); | 2599 endBailoutSwitch(); |
| 2601 } | 2600 } |
| 2602 } | 2601 } |
| 2603 } | 2602 } |
| OLD | NEW |