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

Side by Side Diff: src/list.h

Issue 653033002: Break deserializer reservations into chunks that fit onto a page. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments and rebase Created 6 years, 2 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 | « src/heap/heap.cc ('k') | src/mksnapshot.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_LIST_H_ 5 #ifndef V8_LIST_H_
6 #define V8_LIST_H_ 6 #define V8_LIST_H_
7 7
8 #include "src/checks.h" 8 #include "src/checks.h"
9 #include "src/utils.h" 9 #include "src/utils.h"
10 10
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 typedef T* iterator; 73 typedef T* iterator;
74 inline iterator begin() const { return &data_[0]; } 74 inline iterator begin() const { return &data_[0]; }
75 inline iterator end() const { return &data_[length_]; } 75 inline iterator end() const { return &data_[length_]; }
76 76
77 INLINE(bool is_empty() const) { return length_ == 0; } 77 INLINE(bool is_empty() const) { return length_ == 0; }
78 INLINE(int length() const) { return length_; } 78 INLINE(int length() const) { return length_; }
79 INLINE(int capacity() const) { return capacity_; } 79 INLINE(int capacity() const) { return capacity_; }
80 80
81 Vector<T> ToVector() const { return Vector<T>(data_, length_); } 81 Vector<T> ToVector() const { return Vector<T>(data_, length_); }
82 82
83 Vector<const T> ToConstVector() { return Vector<const T>(data_, length_); } 83 Vector<const T> ToConstVector() const {
84 return Vector<const T>(data_, length_);
85 }
84 86
85 // Adds a copy of the given 'element' to the end of the list, 87 // Adds a copy of the given 'element' to the end of the list,
86 // expanding the list if necessary. 88 // expanding the list if necessary.
87 void Add(const T& element, AllocationPolicy allocator = AllocationPolicy()); 89 void Add(const T& element, AllocationPolicy allocator = AllocationPolicy());
88 90
89 // Add all the elements from the argument list to this list. 91 // Add all the elements from the argument list to this list.
90 void AddAll(const List<T, AllocationPolicy>& other, 92 void AddAll(const List<T, AllocationPolicy>& other,
91 AllocationPolicy allocator = AllocationPolicy()); 93 AllocationPolicy allocator = AllocationPolicy());
92 94
93 // Add all the elements from the vector to this list. 95 // Add all the elements from the vector to this list.
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 template <typename T, class P> 208 template <typename T, class P>
207 int SortedListBSearch(const List<T>& list, P cmp); 209 int SortedListBSearch(const List<T>& list, P cmp);
208 template <typename T> 210 template <typename T>
209 int SortedListBSearch(const List<T>& list, T elem); 211 int SortedListBSearch(const List<T>& list, T elem);
210 212
211 213
212 } } // namespace v8::internal 214 } } // namespace v8::internal
213 215
214 216
215 #endif // V8_LIST_H_ 217 #endif // V8_LIST_H_
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/mksnapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698