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

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

Issue 2941033002: Finish strong mode cleaning of dart2js. (Closed)
Patch Set: Add bug numbers and address comments. Created 3 years, 6 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
OLDNEW
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 import '../common.dart'; 5 import '../common.dart';
6 import '../js_backend/js_backend.dart'; 6 import '../js_backend/js_backend.dart';
7 import 'nodes.dart'; 7 import 'nodes.dart';
8 8
9 /** 9 /**
10 * The [LiveRange] class covers a range where an instruction is live. 10 * The [LiveRange] class covers a range where an instruction is live.
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 // t3 = check(t2) 236 // t3 = check(t2)
237 // t4 = use(t3) 237 // t4 = use(t3)
238 // t5 = use(t3) 238 // t5 = use(t3)
239 // t6 = use(t2) 239 // t6 = use(t2)
240 // 240 //
241 // The t1 is generate-at-use site, and the live-range must thus be on t2 and 241 // The t1 is generate-at-use site, and the live-range must thus be on t2 and
242 // not on the checked instruction t1. 242 // not on the checked instruction t1.
243 // When looking for the checkedInstructionOrNonGenerateAtUseSite of t3 we must 243 // When looking for the checkedInstructionOrNonGenerateAtUseSite of t3 we must
244 // return t2. 244 // return t2.
245 HInstruction checkedInstructionOrNonGenerateAtUseSite(HCheck check) { 245 HInstruction checkedInstructionOrNonGenerateAtUseSite(HCheck check) {
246 var checked = check.checkedInput; 246 dynamic checked = check.checkedInput;
247 while (checked is HCheck) { 247 while (checked is HCheck) {
248 HInstruction next = checked.checkedInput; 248 HInstruction next = checked.checkedInput;
249 if (generateAtUseSite.contains(next)) break; 249 if (generateAtUseSite.contains(next)) break;
250 checked = next; 250 checked = next;
251 } 251 }
252 return checked; 252 return checked;
253 } 253 }
254 254
255 void markAsLiveInEnvironment( 255 void markAsLiveInEnvironment(
256 HInstruction instruction, LiveEnvironment environment) { 256 HInstruction instruction, LiveEnvironment environment) {
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 if (!needsName(input)) { 705 if (!needsName(input)) {
706 names.addAssignment(predecessor, input, phi); 706 names.addAssignment(predecessor, input, phi);
707 } else { 707 } else {
708 names.addCopy(predecessor, input, phi); 708 names.addCopy(predecessor, input, phi);
709 } 709 }
710 } 710 }
711 711
712 namer.allocateName(phi); 712 namer.allocateName(phi);
713 } 713 }
714 } 714 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/value_range_analyzer.dart ('k') | pkg/compiler/lib/src/types/container_type_mask.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698