| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 library dart2js.cps_ir.effects; | 4 library dart2js.cps_ir.effects; |
| 5 | 5 |
| 6 import 'dart:typed_data'; | 6 import 'dart:typed_data'; |
| 7 |
| 7 import '../universe/side_effects.dart' show SideEffects; | 8 import '../universe/side_effects.dart' show SideEffects; |
| 8 | 9 |
| 9 /// Bitmasks for tracking non-local side effects and dependencies. | 10 /// Bitmasks for tracking non-local side effects and dependencies. |
| 10 /// | 11 /// |
| 11 /// All effects must be attributed to an effect area. The `other` area is a | 12 /// All effects must be attributed to an effect area. The `other` area is a |
| 12 /// catch-all for any effect that does not belong to any of the specific areas; | 13 /// catch-all for any effect that does not belong to any of the specific areas; |
| 13 /// this includes external effects such as printing to the console. | 14 /// this includes external effects such as printing to the console. |
| 14 class Effects { | 15 class Effects { |
| 15 // Effect areas. | 16 // Effect areas. |
| 16 // These are bit positions, not bit masks. They are private because it is | 17 // These are bit positions, not bit masks. They are private because it is |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 List<int> getDependencies(int dependsFlags) { | 191 List<int> getDependencies(int dependsFlags) { |
| 191 Int32List copy = new Int32List.fromList(_effectNumbers); | 192 Int32List copy = new Int32List.fromList(_effectNumbers); |
| 192 for (int i = 0; i < Effects.numberOfEffectAreas; ++i) { | 193 for (int i = 0; i < Effects.numberOfEffectAreas; ++i) { |
| 193 if (dependsFlags & Effects._dependsOnArea(i) == 0) { | 194 if (dependsFlags & Effects._dependsOnArea(i) == 0) { |
| 194 copy[i] = EffectNumberer.none; | 195 copy[i] = EffectNumberer.none; |
| 195 } | 196 } |
| 196 } | 197 } |
| 197 return copy; | 198 return copy; |
| 198 } | 199 } |
| 199 } | 200 } |
| OLD | NEW |