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

Side by Side Diff: src/checks.h

Issue 619004: Implement tagging of profiler log event blocks. (Closed)
Patch Set: Created 10 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
« no previous file with comments | « src/api.cc ('k') | src/debug-delay.js » ('j') | src/log.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 118
119 119
120 // Helper function used by the CHECK function when given string 120 // Helper function used by the CHECK function when given string
121 // arguments. Should not be called directly. 121 // arguments. Should not be called directly.
122 static inline void CheckEqualsHelper(const char* file, 122 static inline void CheckEqualsHelper(const char* file,
123 int line, 123 int line,
124 const char* expected_source, 124 const char* expected_source,
125 const char* expected, 125 const char* expected,
126 const char* value_source, 126 const char* value_source,
127 const char* value) { 127 const char* value) {
128 if (strcmp(expected, value) != 0) { 128 if ((expected == NULL && value != NULL) ||
129 (expected != NULL && value == NULL) ||
130 (expected != NULL && value != NULL && strcmp(expected, value) != 0)) {
129 V8_Fatal(file, line, 131 V8_Fatal(file, line,
130 "CHECK_EQ(%s, %s) failed\n# Expected: %s\n# Found: %s", 132 "CHECK_EQ(%s, %s) failed\n# Expected: %s\n# Found: %s",
131 expected_source, value_source, expected, value); 133 expected_source, value_source, expected, value);
132 } 134 }
133 } 135 }
134 136
135 137
136 static inline void CheckNonEqualsHelper(const char* file, 138 static inline void CheckNonEqualsHelper(const char* file,
137 int line, 139 int line,
138 const char* expected_source, 140 const char* expected_source,
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 277
276 278
277 #define ASSERT_TAG_ALIGNED(address) \ 279 #define ASSERT_TAG_ALIGNED(address) \
278 ASSERT((reinterpret_cast<intptr_t>(address) & kHeapObjectTagMask) == 0) 280 ASSERT((reinterpret_cast<intptr_t>(address) & kHeapObjectTagMask) == 0)
279 281
280 #define ASSERT_SIZE_TAG_ALIGNED(size) ASSERT((size & kHeapObjectTagMask) == 0) 282 #define ASSERT_SIZE_TAG_ALIGNED(size) ASSERT((size & kHeapObjectTagMask) == 0)
281 283
282 #define ASSERT_NOT_NULL(p) ASSERT_NE(NULL, p) 284 #define ASSERT_NOT_NULL(p) ASSERT_NE(NULL, p)
283 285
284 #endif // V8_CHECKS_H_ 286 #endif // V8_CHECKS_H_
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/debug-delay.js » ('j') | src/log.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698