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

Side by Side Diff: runtime/platform/utils_linux.h

Issue 10806078: Improve the performance of bit set searches with a compiler intrinsic. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address review comments Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « runtime/platform/utils.h ('k') | runtime/platform/utils_macos.h » ('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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 #ifndef VM_CPU_H_ 5 #ifndef PLATFORM_UTILS_LINUX_H_
6 #define VM_CPU_H_ 6 #define PLATFORM_UTILS_LINUX_H_
7
8 #include "vm/allocation.h"
9 7
10 namespace dart { 8 namespace dart {
11 9
12 // Forward Declarations. 10 inline int Utils::CountTrailingZeros(uint32_t x) {
13 class Error; 11 return __builtin_ctzl(x);
14 class Instance; 12 };
15 13
16 14 inline int Utils::CountTrailingZeros(uint64_t x) {
17 class CPU : public AllStatic { 15 return __builtin_ctzll(x);
18 public:
19 static void FlushICache(uword start, uword size);
20 static const char* Id();
21 }; 16 };
22 17
23 } // namespace dart 18 } // namespace dart
24 19
25 #endif // VM_CPU_H_ 20 #endif // PLATFORM_UTILS_LINUX_H_
OLDNEW
« no previous file with comments | « runtime/platform/utils.h ('k') | runtime/platform/utils_macos.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698