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

Unified Diff: runtime/platform/utils_macos.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/platform/utils_linux.h ('k') | runtime/platform/utils_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/platform/utils_macos.h
diff --git a/runtime/vm/cpu.h b/runtime/platform/utils_macos.h
similarity index 50%
copy from runtime/vm/cpu.h
copy to runtime/platform/utils_macos.h
index c8f5e9c034817c45c03482b163e1b9b93732b2e6..d0e068644eb226ab5be4ff150f11709682fa6c13 100644
--- a/runtime/vm/cpu.h
+++ b/runtime/platform/utils_macos.h
@@ -2,24 +2,19 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-#ifndef VM_CPU_H_
-#define VM_CPU_H_
-
-#include "vm/allocation.h"
+#ifndef PLATFORM_UTILS_MACOS_H_
+#define PLATFORM_UTILS_MACOS_H_
namespace dart {
-// Forward Declarations.
-class Error;
-class Instance;
-
+inline int Utils::CountTrailingZeros(uint32_t x) {
+ return __builtin_ctzl(x);
+};
-class CPU : public AllStatic {
- public:
- static void FlushICache(uword start, uword size);
- static const char* Id();
+inline int Utils::CountTrailingZeros(uint64_t x) {
+ return __builtin_ctzll(x);
};
} // namespace dart
-#endif // VM_CPU_H_
+#endif // PLATFORM_UTILS_MACOS_H_
« no previous file with comments | « runtime/platform/utils_linux.h ('k') | runtime/platform/utils_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698