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

Side by Side Diff: src/handles.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/global-handles.cc ('k') | src/handles.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_HANDLES_H_ 5 #ifndef V8_HANDLES_H_
6 #define V8_HANDLES_H_ 6 #define V8_HANDLES_H_
7 7
8 #include "src/objects.h" 8 #include "src/objects.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 26 matching lines...) Expand all
37 template <class S> MaybeHandle(MaybeHandle<S> maybe_handle) { 37 template <class S> MaybeHandle(MaybeHandle<S> maybe_handle) {
38 #ifdef DEBUG 38 #ifdef DEBUG
39 T* a = NULL; 39 T* a = NULL;
40 S* b = NULL; 40 S* b = NULL;
41 a = b; // Fake assignment to enforce type checks. 41 a = b; // Fake assignment to enforce type checks.
42 USE(a); 42 USE(a);
43 #endif 43 #endif
44 location_ = reinterpret_cast<T**>(maybe_handle.location_); 44 location_ = reinterpret_cast<T**>(maybe_handle.location_);
45 } 45 }
46 46
47 INLINE(void Assert() const) { ASSERT(location_ != NULL); } 47 INLINE(void Assert() const) { DCHECK(location_ != NULL); }
48 INLINE(void Check() const) { CHECK(location_ != NULL); } 48 INLINE(void Check() const) { CHECK(location_ != NULL); }
49 49
50 INLINE(Handle<T> ToHandleChecked()) const { 50 INLINE(Handle<T> ToHandleChecked()) const {
51 Check(); 51 Check();
52 return Handle<T>(location_); 52 return Handle<T>(location_);
53 } 53 }
54 54
55 // Convert to a Handle with a type that can be upcasted to. 55 // Convert to a Handle with a type that can be upcasted to.
56 template <class S> INLINE(bool ToHandle(Handle<S>* out)) { 56 template <class S> INLINE(bool ToHandle(Handle<S>* out)) {
57 if (location_ == NULL) { 57 if (location_ == NULL) {
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 288
289 void Initialize() { 289 void Initialize() {
290 next = limit = NULL; 290 next = limit = NULL;
291 level = 0; 291 level = 0;
292 } 292 }
293 }; 293 };
294 294
295 } } // namespace v8::internal 295 } } // namespace v8::internal
296 296
297 #endif // V8_HANDLES_H_ 297 #endif // V8_HANDLES_H_
OLDNEW
« no previous file with comments | « src/global-handles.cc ('k') | src/handles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698