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

Side by Side Diff: runtime/vm/freelist.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/vm/bit_set.h ('k') | runtime/vm/freelist.cc » ('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_FREELIST_H_ 5 #ifndef VM_FREELIST_H_
6 #define VM_FREELIST_H_ 6 #define VM_FREELIST_H_
7 7
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "vm/allocation.h" 9 #include "vm/allocation.h"
10 #include "vm/bit_set.h" 10 #include "vm/bit_set.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 private: 86 private:
87 static const int kNumLists = 128; 87 static const int kNumLists = 128;
88 88
89 static intptr_t IndexForSize(intptr_t size); 89 static intptr_t IndexForSize(intptr_t size);
90 90
91 void EnqueueElement(FreeListElement* element, intptr_t index); 91 void EnqueueElement(FreeListElement* element, intptr_t index);
92 FreeListElement* DequeueElement(intptr_t index); 92 FreeListElement* DequeueElement(intptr_t index);
93 93
94 void SplitElementAfterAndEnqueue(FreeListElement* element, intptr_t size); 94 void SplitElementAfterAndEnqueue(FreeListElement* element, intptr_t size);
95 95
96 BitSet<kNumLists + 1> free_map_; 96 BitSet<kNumLists> free_map_;
97 97
98 FreeListElement* free_lists_[kNumLists + 1]; 98 FreeListElement* free_lists_[kNumLists + 1];
99 99
100 DISALLOW_COPY_AND_ASSIGN(FreeList); 100 DISALLOW_COPY_AND_ASSIGN(FreeList);
101 }; 101 };
102 102
103 } // namespace dart 103 } // namespace dart
104 104
105 #endif // VM_FREELIST_H_ 105 #endif // VM_FREELIST_H_
OLDNEW
« no previous file with comments | « runtime/vm/bit_set.h ('k') | runtime/vm/freelist.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698