| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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.util; | 5 library dart2js.util; |
| 6 | 6 |
| 7 import 'characters.dart'; |
| 7 import 'util_implementation.dart'; | 8 import 'util_implementation.dart'; |
| 8 import 'characters.dart'; | |
| 9 | 9 |
| 10 export 'emptyset.dart'; |
| 11 export 'maplet.dart'; |
| 10 export 'setlet.dart'; | 12 export 'setlet.dart'; |
| 11 export 'maplet.dart'; | |
| 12 export 'emptyset.dart'; | |
| 13 | 13 |
| 14 part 'indentation.dart'; | 14 part 'indentation.dart'; |
| 15 part 'link.dart'; | 15 part 'link.dart'; |
| 16 | 16 |
| 17 /// Helper functions for creating hash codes. | 17 /// Helper functions for creating hash codes. |
| 18 class Hashing { | 18 class Hashing { |
| 19 /// If an integer is masked by this constant, the result is guaranteed to be | 19 /// If an integer is masked by this constant, the result is guaranteed to be |
| 20 /// in Smi range. | 20 /// in Smi range. |
| 21 static const int SMI_MASK = 0x3fffffff; | 21 static const int SMI_MASK = 0x3fffffff; |
| 22 | 22 |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 if (usedNames.contains(suggestedName)) { | 233 if (usedNames.contains(suggestedName)) { |
| 234 int counter = 0; | 234 int counter = 0; |
| 235 while (usedNames.contains(result)) { | 235 while (usedNames.contains(result)) { |
| 236 counter++; | 236 counter++; |
| 237 result = "$suggestedName$counter"; | 237 result = "$suggestedName$counter"; |
| 238 } | 238 } |
| 239 } | 239 } |
| 240 usedNames.add(result); | 240 usedNames.add(result); |
| 241 return result; | 241 return result; |
| 242 } | 242 } |
| OLD | NEW |