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

Side by Side Diff: pkg/compiler/lib/src/tree_ir/optimization/logical_rewriter.dart

Issue 1088493002: Assignment expressions in tree IR. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Comments Created 5 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 tree_ir.optimization; 5 part of tree_ir.optimization;
6 6
7 /// Rewrites logical expressions to be more compact in the Tree IR. 7 /// Rewrites logical expressions to be more compact in the Tree IR.
8 /// 8 ///
9 /// In this class an expression is said to occur in "boolean context" if 9 /// In this class an expression is said to occur in "boolean context" if
10 /// its result is immediately applied to boolean conversion. 10 /// its result is immediately applied to boolean conversion.
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 } 336 }
337 } 337 }
338 338
339 Expression makeOr(Expression e1, Expression e2, {bool liftNots: true}) { 339 Expression makeOr(Expression e1, Expression e2, {bool liftNots: true}) {
340 if (e1 is Not && e2 is Not && liftNots) { 340 if (e1 is Not && e2 is Not && liftNots) {
341 return new Not(new LogicalOperator.and(e1.operand, e2.operand)); 341 return new Not(new LogicalOperator.and(e1.operand, e2.operand));
342 } else { 342 } else {
343 return new LogicalOperator.or(e1, e2); 343 return new LogicalOperator.or(e1, e2);
344 } 344 }
345 } 345 }
346
347 } 346 }
348 347
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/codegen/task.dart ('k') | pkg/compiler/lib/src/tree_ir/optimization/optimization.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698