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

Side by Side Diff: lib/compiler/implementation/ssa/codegen_helpers.dart

Issue 11262032: Add 'part of' in dart2js code. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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 | Annotate | Revision Log
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 part of ssa;
6
5 /** 7 /**
6 * Instead of emitting each SSA instruction with a temporary variable 8 * Instead of emitting each SSA instruction with a temporary variable
7 * mark instructions that can be emitted at their use-site. 9 * mark instructions that can be emitted at their use-site.
8 * For example, in: 10 * For example, in:
9 * t0 = 4; 11 * t0 = 4;
10 * t1 = 3; 12 * t1 = 3;
11 * t2 = add(t0, t1); 13 * t2 = add(t0, t1);
12 * t0 and t1 would be marked and the resulting code would then be: 14 * t0 and t1 would be marked and the resulting code would then be:
13 * t2 = add(4, 3); 15 * t2 = add(4, 3);
14 */ 16 */
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 } 342 }
341 343
342 // If [thenInput] is defined in the first predecessor, then it is only used 344 // If [thenInput] is defined in the first predecessor, then it is only used
343 // by [phi] and can be generated at use site. 345 // by [phi] and can be generated at use site.
344 if (identical(thenInput.block, end.predecessors[0])) { 346 if (identical(thenInput.block, end.predecessors[0])) {
345 assert(thenInput.usedBy.length == 1); 347 assert(thenInput.usedBy.length == 1);
346 markAsGenerateAtUseSite(thenInput); 348 markAsGenerateAtUseSite(thenInput);
347 } 349 }
348 } 350 }
349 } 351 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/ssa/codegen.dart ('k') | lib/compiler/implementation/ssa/js_names.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698