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

Side by Side Diff: pkg/compiler/lib/src/cps_ir/bounds_checker.dart

Issue 2239193002: Rerun formatter (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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 | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart » ('j') | 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 library dart2js.cps_ir.bounds_checker; 5 library dart2js.cps_ir.bounds_checker;
6 6
7 import '../constants/values.dart'; 7 import '../constants/values.dart';
8 import '../types/types.dart'; 8 import '../types/types.dart';
9 import '../world.dart'; 9 import '../world.dart';
10 import 'cps_fragment.dart'; 10 import 'cps_fragment.dart';
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 destroyAndReplace( 286 destroyAndReplace(
287 node, new InvokeContinuation(trueCont, <Parameter>[])); 287 node, new InvokeContinuation(trueCont, <Parameter>[]));
288 } 288 }
289 }); 289 });
290 void pushTrue(makeConstraint()) { 290 void pushTrue(makeConstraint()) {
291 pushAction(() { 291 pushAction(() {
292 makeConstraint(); 292 makeConstraint();
293 push(trueCont); 293 push(trueCont);
294 }); 294 });
295 } 295 }
296
296 void pushFalse(makeConstraint()) { 297 void pushFalse(makeConstraint()) {
297 pushAction(() { 298 pushAction(() {
298 makeConstraint(); 299 makeConstraint();
299 push(falseCont); 300 push(falseCont);
300 }); 301 });
301 } 302 }
303
302 if (condition is ApplyBuiltinOperator && 304 if (condition is ApplyBuiltinOperator &&
303 condition.argumentRefs.length == 2 && 305 condition.argumentRefs.length == 2 &&
304 isInt(condition.argument(0)) && 306 isInt(condition.argument(0)) &&
305 isInt(condition.argument(1))) { 307 isInt(condition.argument(1))) {
306 SignedVariable v1 = getValue(condition.argument(0)); 308 SignedVariable v1 = getValue(condition.argument(0));
307 SignedVariable v2 = getValue(condition.argument(1)); 309 SignedVariable v2 = getValue(condition.argument(1));
308 switch (condition.operator) { 310 switch (condition.operator) {
309 case BuiltinOperator.NumLe: 311 case BuiltinOperator.NumLe:
310 pushTrue(() => makeLessThanOrEqual(v1, v2)); 312 pushTrue(() => makeLessThanOrEqual(v1, v2));
311 pushFalse(() => makeGreaterThan(v1, v2)); 313 pushFalse(() => makeGreaterThan(v1, v2));
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
701 } 703 }
702 return node.body; 704 return node.body;
703 } 705 }
704 } 706 }
705 707
706 /// Lattice representing the known (weak) monotonicity of a loop variable. 708 /// Lattice representing the known (weak) monotonicity of a loop variable.
707 /// 709 ///
708 /// The lattice bottom is represented by `null` and represents the case where 710 /// The lattice bottom is represented by `null` and represents the case where
709 /// the loop variable never changes value during the loop. 711 /// the loop variable never changes value during the loop.
710 enum Monotonicity { NotMonotone, Increasing, Decreasing, } 712 enum Monotonicity { NotMonotone, Increasing, Decreasing, }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698