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 | |
6 // significant change. Please see the README file for more information. | |
7 | |
8 library engine.utilities.general; | 5 library engine.utilities.general; |
9 | 6 |
10 import 'dart:profiler'; | 7 import 'dart:profiler'; |
11 | 8 |
12 /** | 9 /** |
13 * Jenkins hash function, optimized for small integers. | 10 * Jenkins hash function, optimized for small integers. |
14 * Borrowed from sdk/lib/math/jenkins_smi_hash.dart. | 11 * Borrowed from sdk/lib/math/jenkins_smi_hash.dart. |
15 */ | 12 */ |
16 class JenkinsSmiHash { | 13 class JenkinsSmiHash { |
17 static int combine(int hash, int value) { | 14 static int combine(int hash, int value) { |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 | 145 |
149 makeCurrentWhile(f()) { | 146 makeCurrentWhile(f()) { |
150 PerformanceTag prevTag = makeCurrent(); | 147 PerformanceTag prevTag = makeCurrent(); |
151 try { | 148 try { |
152 return f(); | 149 return f(); |
153 } finally { | 150 } finally { |
154 prevTag.makeCurrent(); | 151 prevTag.makeCurrent(); |
155 } | 152 } |
156 } | 153 } |
157 } | 154 } |
OLD | NEW |