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

Side by Side Diff: src/list.h

Issue 39183004: Define DEBUG for v8_optimized_debug=2 (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback Created 7 years, 1 month 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/incremental-marking.cc ('k') | src/objects.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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // Please the MSVC compiler. We should never have to execute this. 77 // Please the MSVC compiler. We should never have to execute this.
78 INLINE(void operator delete(void* p, AllocationPolicy allocator)) { 78 INLINE(void operator delete(void* p, AllocationPolicy allocator)) {
79 UNREACHABLE(); 79 UNREACHABLE();
80 } 80 }
81 81
82 // Returns a reference to the element at index i. This reference is 82 // Returns a reference to the element at index i. This reference is
83 // not safe to use after operations that can change the list's 83 // not safe to use after operations that can change the list's
84 // backing store (e.g. Add). 84 // backing store (e.g. Add).
85 inline T& operator[](int i) const { 85 inline T& operator[](int i) const {
86 ASSERT(0 <= i); 86 ASSERT(0 <= i);
87 ASSERT(i < length_); 87 SLOW_ASSERT(i < length_);
88 return data_[i]; 88 return data_[i];
89 } 89 }
90 inline T& at(int i) const { return operator[](i); } 90 inline T& at(int i) const { return operator[](i); }
91 inline T& last() const { return at(length_ - 1); } 91 inline T& last() const { return at(length_ - 1); }
92 inline T& first() const { return at(0); } 92 inline T& first() const { return at(0); }
93 93
94 INLINE(bool is_empty() const) { return length_ == 0; } 94 INLINE(bool is_empty() const) { return length_ == 0; }
95 INLINE(int length() const) { return length_; } 95 INLINE(int length() const) { return length_; }
96 INLINE(int capacity() const) { return capacity_; } 96 INLINE(int capacity() const) { return capacity_; }
97 97
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 template <typename T, class P> 212 template <typename T, class P>
213 int SortedListBSearch(const List<T>& list, P cmp); 213 int SortedListBSearch(const List<T>& list, P cmp);
214 template <typename T> 214 template <typename T>
215 int SortedListBSearch(const List<T>& list, T elem); 215 int SortedListBSearch(const List<T>& list, T elem);
216 216
217 217
218 } } // namespace v8::internal 218 } } // namespace v8::internal
219 219
220 220
221 #endif // V8_LIST_H_ 221 #endif // V8_LIST_H_
OLDNEW
« no previous file with comments | « src/incremental-marking.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698