OLD | NEW |
| (Empty) |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef V8_V8CHECKS_H_ | |
6 #define V8_V8CHECKS_H_ | |
7 | |
8 #include "src/checks.h" | |
9 | |
10 namespace v8 { | |
11 class Value; | |
12 template <class T> class Handle; | |
13 | |
14 namespace internal { | |
15 intptr_t HeapObjectTagMask(); | |
16 | |
17 } } // namespace v8::internal | |
18 | |
19 | |
20 void CheckNonEqualsHelper(const char* file, | |
21 int line, | |
22 const char* unexpected_source, | |
23 v8::Handle<v8::Value> unexpected, | |
24 const char* value_source, | |
25 v8::Handle<v8::Value> value); | |
26 | |
27 void CheckEqualsHelper(const char* file, | |
28 int line, | |
29 const char* expected_source, | |
30 v8::Handle<v8::Value> expected, | |
31 const char* value_source, | |
32 v8::Handle<v8::Value> value); | |
33 | |
34 #define ASSERT_TAG_ALIGNED(address) \ | |
35 ASSERT((reinterpret_cast<intptr_t>(address) & HeapObjectTagMask()) == 0) | |
36 | |
37 #define ASSERT_SIZE_TAG_ALIGNED(size) ASSERT((size & HeapObjectTagMask()) == 0) | |
38 | |
39 #endif // V8_V8CHECKS_H_ | |
OLD | NEW |