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

Side by Side Diff: src/counters.h

Issue 430503007: Rename ASSERT* to DCHECK*. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE and fixes Created 6 years, 4 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/conversions-inl.h ('k') | src/cpu-profiler.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_COUNTERS_H_ 5 #ifndef V8_COUNTERS_H_
6 #define V8_COUNTERS_H_ 6 #define V8_COUNTERS_H_
7 7
8 #include "include/v8.h" 8 #include "include/v8.h"
9 #include "src/allocation.h" 9 #include "src/allocation.h"
10 #include "src/base/platform/elapsed-timer.h" 10 #include "src/base/platform/elapsed-timer.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 // Returns false if table is full. 132 // Returns false if table is full.
133 bool Enabled() { 133 bool Enabled() {
134 return GetPtr() != NULL; 134 return GetPtr() != NULL;
135 } 135 }
136 136
137 // Get the internal pointer to the counter. This is used 137 // Get the internal pointer to the counter. This is used
138 // by the code generator to emit code that manipulates a 138 // by the code generator to emit code that manipulates a
139 // given counter without calling the runtime system. 139 // given counter without calling the runtime system.
140 int* GetInternalPointer() { 140 int* GetInternalPointer() {
141 int* loc = GetPtr(); 141 int* loc = GetPtr();
142 ASSERT(loc != NULL); 142 DCHECK(loc != NULL);
143 return loc; 143 return loc;
144 } 144 }
145 145
146 // Reset the cached internal pointer. 146 // Reset the cached internal pointer.
147 void Reset() { lookup_done_ = false; } 147 void Reset() { lookup_done_ = false; }
148 148
149 protected: 149 protected:
150 // Returns the cached address of this counter location. 150 // Returns the cached address of this counter location.
151 int* GetPtr() { 151 int* GetPtr() {
152 if (lookup_done_) return ptr_; 152 if (lookup_done_) return ptr_;
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 friend class Isolate; 699 friend class Isolate;
700 700
701 explicit Counters(Isolate* isolate); 701 explicit Counters(Isolate* isolate);
702 702
703 DISALLOW_IMPLICIT_CONSTRUCTORS(Counters); 703 DISALLOW_IMPLICIT_CONSTRUCTORS(Counters);
704 }; 704 };
705 705
706 } } // namespace v8::internal 706 } } // namespace v8::internal
707 707
708 #endif // V8_COUNTERS_H_ 708 #endif // V8_COUNTERS_H_
OLDNEW
« no previous file with comments | « src/conversions-inl.h ('k') | src/cpu-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698