Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Side by Side Diff: pkg/compiler/lib/src/ssa/builder_kernel.dart

Issue 2643993002: Propagate variable rename. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 import 'package:kernel/ast.dart' as ir; 5 import 'package:kernel/ast.dart' as ir;
6 6
7 import '../closure.dart'; 7 import '../closure.dart';
8 import '../common.dart'; 8 import '../common.dart';
9 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem; 9 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem;
10 import '../common/names.dart'; 10 import '../common/names.dart';
(...skipping 2682 matching lines...) Expand 10 before | Expand all | Expand 10 after
2693 // will be used, but for loops we will add (unnecessary) phis that will 2693 // will be used, but for loops we will add (unnecessary) phis that will
2694 // reference the body variables. This makes it look as if the variables were 2694 // reference the body variables. This makes it look as if the variables were
2695 // used in a non-dominated block. 2695 // used in a non-dominated block.
2696 LocalsHandler originalSavedLocals; 2696 LocalsHandler originalSavedLocals;
2697 2697
2698 TryCatchFinallyBuilder(this.kernelBuilder) { 2698 TryCatchFinallyBuilder(this.kernelBuilder) {
2699 tryInstruction = new HTry(); 2699 tryInstruction = new HTry();
2700 originalSavedLocals = new LocalsHandler.from(kernelBuilder.localsHandler); 2700 originalSavedLocals = new LocalsHandler.from(kernelBuilder.localsHandler);
2701 enterBlock = kernelBuilder.openNewBlock(); 2701 enterBlock = kernelBuilder.openNewBlock();
2702 kernelBuilder.close(tryInstruction); 2702 kernelBuilder.close(tryInstruction);
2703 previouslyInTrySequence = kernelBuilder.inTryStatement; 2703 previouslyInTryStatement = kernelBuilder.inTryStatement;
2704 kernelBuilder.inTryStatement = true; 2704 kernelBuilder.inTryStatement = true;
2705 2705
2706 startTryBlock = kernelBuilder.graph.addNewBlock(); 2706 startTryBlock = kernelBuilder.graph.addNewBlock();
2707 kernelBuilder.open(startTryBlock); 2707 kernelBuilder.open(startTryBlock);
2708 } 2708 }
2709 2709
2710 void _addExitTrySuccessor(successor) { 2710 void _addExitTrySuccessor(successor) {
2711 if (successor == null) return; 2711 if (successor == null) return;
2712 // Iterate over all blocks created inside this try/catch, and 2712 // Iterate over all blocks created inside this try/catch, and
2713 // attach successor information to blocks that end with 2713 // attach successor information to blocks that end with
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
2876 // blocks. 2876 // blocks.
2877 kernelBuilder.localsHandler = originalSavedLocals; 2877 kernelBuilder.localsHandler = originalSavedLocals;
2878 kernelBuilder.open(exitBlock); 2878 kernelBuilder.open(exitBlock);
2879 enterBlock.setBlockFlow( 2879 enterBlock.setBlockFlow(
2880 new HTryBlockInformation( 2880 new HTryBlockInformation(
2881 kernelBuilder.wrapStatementGraph(bodyGraph), 2881 kernelBuilder.wrapStatementGraph(bodyGraph),
2882 exception, 2882 exception,
2883 kernelBuilder.wrapStatementGraph(catchGraph), 2883 kernelBuilder.wrapStatementGraph(catchGraph),
2884 kernelBuilder.wrapStatementGraph(finallyGraph)), 2884 kernelBuilder.wrapStatementGraph(finallyGraph)),
2885 exitBlock); 2885 exitBlock);
2886 kernelBuilder.inTryStatement = previouslyInTrySequence; 2886 kernelBuilder.inTryStatement = previouslyInTryStatement;
2887 } 2887 }
2888 } 2888 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698