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

Side by Side Diff: src/checks.h

Issue 1371083003: [presubmit] Enable readability/namespace linter checking. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
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_CHECKS_H_ 5 #ifndef V8_CHECKS_H_
6 #define V8_CHECKS_H_ 6 #define V8_CHECKS_H_
7 7
8 #include "include/v8.h" 8 #include "include/v8.h"
9 #include "src/base/logging.h" 9 #include "src/base/logging.h"
10 10
11 namespace v8 { 11 namespace v8 {
12 12
13 class Value; 13 class Value;
14 14
15 namespace internal { 15 namespace internal {
16 16
17 #ifdef ENABLE_SLOW_DCHECKS 17 #ifdef ENABLE_SLOW_DCHECKS
18 #define SLOW_DCHECK(condition) \ 18 #define SLOW_DCHECK(condition) \
19 CHECK(!v8::internal::FLAG_enable_slow_asserts || (condition)) 19 CHECK(!v8::internal::FLAG_enable_slow_asserts || (condition))
20 extern bool FLAG_enable_slow_asserts; 20 extern bool FLAG_enable_slow_asserts;
21 #else 21 #else
22 #define SLOW_DCHECK(condition) ((void) 0) 22 #define SLOW_DCHECK(condition) ((void) 0)
23 const bool FLAG_enable_slow_asserts = false; 23 const bool FLAG_enable_slow_asserts = false;
24 #endif 24 #endif
25 25
26 } } // namespace v8::internal 26 } // namespace internal
27 } // namespace v8
27 28
28 #define DCHECK_TAG_ALIGNED(address) \ 29 #define DCHECK_TAG_ALIGNED(address) \
29 DCHECK((reinterpret_cast<intptr_t>(address) & \ 30 DCHECK((reinterpret_cast<intptr_t>(address) & \
30 ::v8::internal::kHeapObjectTagMask) == 0) 31 ::v8::internal::kHeapObjectTagMask) == 0)
31 32
32 #define DCHECK_SIZE_TAG_ALIGNED(size) \ 33 #define DCHECK_SIZE_TAG_ALIGNED(size) \
33 DCHECK((size & ::v8::internal::kHeapObjectTagMask) == 0) 34 DCHECK((size & ::v8::internal::kHeapObjectTagMask) == 0)
34 35
35 #endif // V8_CHECKS_H_ 36 #endif // V8_CHECKS_H_
OLDNEW
« no previous file with comments | « src/char-predicates-inl.h ('k') | src/code-stubs.h » ('j') | src/objects.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698