| OLD | NEW |
| 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 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
| 6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
| 7 | 7 |
| 8 library engine.utilities.collection; | 8 library engine.utilities.collection; |
| 9 | 9 |
| 10 import 'dart:collection'; | 10 import 'dart:collection'; |
| 11 import "dart:math" as math; |
| 12 |
| 11 import 'java_core.dart'; | 13 import 'java_core.dart'; |
| 12 import 'scanner.dart' show Token; | 14 import 'scanner.dart' show Token; |
| 13 | 15 |
| 14 /** | 16 /** |
| 15 * The class `BooleanArray` defines methods for operating on integers as if they
were arrays | 17 * The class `BooleanArray` defines methods for operating on integers as if they
were arrays |
| 16 * of booleans. These arrays can be indexed by either integers or by enumeration
constants. | 18 * of booleans. These arrays can be indexed by either integers or by enumeration
constants. |
| 17 */ | 19 */ |
| 18 class BooleanArray { | 20 class BooleanArray { |
| 19 /** | 21 /** |
| 20 * Return the value of the element at the given index. | 22 * Return the value of the element at the given index. |
| (...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 // | 435 // |
| 434 // Consider successors of v | 436 // Consider successors of v |
| 435 // | 437 // |
| 436 HashSet<N> tails = _graph._edges[v]; | 438 HashSet<N> tails = _graph._edges[v]; |
| 437 if (tails != null) { | 439 if (tails != null) { |
| 438 for (N w in tails) { | 440 for (N w in tails) { |
| 439 DirectedGraph_NodeInfo<N> wInfo = _nodeMap[w]; | 441 DirectedGraph_NodeInfo<N> wInfo = _nodeMap[w]; |
| 440 if (wInfo == null) { | 442 if (wInfo == null) { |
| 441 // Successor w has not yet been visited; recurse on it | 443 // Successor w has not yet been visited; recurse on it |
| 442 wInfo = _strongConnect(w); | 444 wInfo = _strongConnect(w); |
| 443 vInfo.lowlink = Math.min(vInfo.lowlink, wInfo.lowlink); | 445 vInfo.lowlink = math.min(vInfo.lowlink, wInfo.lowlink); |
| 444 } else if (wInfo.onStack) { | 446 } else if (wInfo.onStack) { |
| 445 // Successor w is in stack S and hence in the current SCC | 447 // Successor w is in stack S and hence in the current SCC |
| 446 vInfo.lowlink = Math.min(vInfo.lowlink, wInfo.index); | 448 vInfo.lowlink = math.min(vInfo.lowlink, wInfo.index); |
| 447 } | 449 } |
| 448 } | 450 } |
| 449 } | 451 } |
| 450 // | 452 // |
| 451 // If v is a root node, pop the stack and generate an SCC | 453 // If v is a root node, pop the stack and generate an SCC |
| 452 // | 454 // |
| 453 if (vInfo.lowlink == vInfo.index) { | 455 if (vInfo.lowlink == vInfo.index) { |
| 454 List<N> component = new List<N>(); | 456 List<N> component = new List<N>(); |
| 455 N w; | 457 N w; |
| 456 do { | 458 do { |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 730 | 732 |
| 731 @override | 733 @override |
| 732 void set value(V newValue) { | 734 void set value(V newValue) { |
| 733 if (_currentKey == null) { | 735 if (_currentKey == null) { |
| 734 throw new NoSuchElementException(); | 736 throw new NoSuchElementException(); |
| 735 } | 737 } |
| 736 _currentValue = newValue; | 738 _currentValue = newValue; |
| 737 _map[_currentKey] = newValue; | 739 _map[_currentKey] = newValue; |
| 738 } | 740 } |
| 739 } | 741 } |
| OLD | NEW |