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

Side by Side Diff: src/base/logging.h

Issue 866843003: Contribution of PowerPC port (continuation of 422063005) - AIX Common1 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address second set of comments Created 5 years, 10 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_BASE_LOGGING_H_ 5 #ifndef V8_BASE_LOGGING_H_
6 #define V8_BASE_LOGGING_H_ 6 #define V8_BASE_LOGGING_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <string.h> 9 #include <string.h>
10 10
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 " Expected: 0x%08x%08x\n# Found: 0x%08x%08x", 69 " Expected: 0x%08x%08x\n# Found: 0x%08x%08x",
70 expected_source, value_source, 70 expected_source, value_source,
71 static_cast<uint32_t>(expected >> 32), 71 static_cast<uint32_t>(expected >> 32),
72 static_cast<uint32_t>(expected), 72 static_cast<uint32_t>(expected),
73 static_cast<uint32_t>(value >> 32), 73 static_cast<uint32_t>(value >> 32),
74 static_cast<uint32_t>(value)); 74 static_cast<uint32_t>(value));
75 } 75 }
76 } 76 }
77 77
78 78
79 // 32-bit AIX defines intptr_t as long int.
80 #if V8_OS_AIX && V8_HOST_ARCH_32_BIT
81 // Helper function used by the CHECK_EQ function when given intptr_t
82 // arguments. Should not be called directly.
83 inline void CheckEqualsHelper(const char* file, int line,
84 const char* expected_source, intptr_t expected,
85 const char* value_source, intptr_t value) {
86 if (expected != value) {
87 V8_Fatal(file, line,
88 "CHECK_EQ(%s, %s) failed\n#"
89 " Expected: 0x%lx\n# Found: 0x%lx",
90 expected_source, value_source, expected, value);
91 }
92 }
93 #endif
94
95
79 // Helper function used by the CHECK_NE function when given int 96 // Helper function used by the CHECK_NE function when given int
80 // arguments. Should not be called directly. 97 // arguments. Should not be called directly.
81 inline void CheckNonEqualsHelper(const char* file, 98 inline void CheckNonEqualsHelper(const char* file,
82 int line, 99 int line,
83 const char* unexpected_source, 100 const char* unexpected_source,
84 int unexpected, 101 int unexpected,
85 const char* value_source, 102 const char* value_source,
86 int value) { 103 int value) {
87 if (V8_UNLIKELY(unexpected == value)) { 104 if (V8_UNLIKELY(unexpected == value)) {
88 V8_Fatal(file, line, "CHECK_NE(%s, %s) failed\n# Value: %i", 105 V8_Fatal(file, line, "CHECK_NE(%s, %s) failed\n# Value: %i",
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 #define DCHECK_EQ(v1, v2) ((void) 0) 225 #define DCHECK_EQ(v1, v2) ((void) 0)
209 #define DCHECK_NE(v1, v2) ((void) 0) 226 #define DCHECK_NE(v1, v2) ((void) 0)
210 #define DCHECK_GE(v1, v2) ((void) 0) 227 #define DCHECK_GE(v1, v2) ((void) 0)
211 #define DCHECK_LT(v1, v2) ((void) 0) 228 #define DCHECK_LT(v1, v2) ((void) 0)
212 #define DCHECK_LE(v1, v2) ((void) 0) 229 #define DCHECK_LE(v1, v2) ((void) 0)
213 #endif 230 #endif
214 231
215 #define DCHECK_NOT_NULL(p) DCHECK_NE(NULL, p) 232 #define DCHECK_NOT_NULL(p) DCHECK_NE(NULL, p)
216 233
217 #endif // V8_BASE_LOGGING_H_ 234 #endif // V8_BASE_LOGGING_H_
OLDNEW
« no previous file with comments | « src/base/cpu.cc ('k') | src/base/macros.h » ('j') | src/serialize.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698