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: include/v8.h

Issue 2732803002: Drop UniqueId from include/v8.h (Closed)
Patch Set: Drop UniqueId from include/v8.h Created 3 years, 9 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 | « no previous file | test/cctest/test-api.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 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 /** \mainpage V8 API Reference Guide 5 /** \mainpage V8 API Reference Guide
6 * 6 *
7 * V8 is Google's open source JavaScript engine. 7 * V8 is Google's open source JavaScript engine.
8 * 8 *
9 * This set of documents provides reference material generated from the 9 * This set of documents provides reference material generated from the
10 * V8 header file, include/v8.h. 10 * V8 header file, include/v8.h.
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 class Isolate; 148 class Isolate;
149 class Object; 149 class Object;
150 struct StreamedSource; 150 struct StreamedSource;
151 template<typename T> class CustomArguments; 151 template<typename T> class CustomArguments;
152 class PropertyCallbackArguments; 152 class PropertyCallbackArguments;
153 class FunctionCallbackArguments; 153 class FunctionCallbackArguments;
154 class GlobalHandles; 154 class GlobalHandles;
155 } // namespace internal 155 } // namespace internal
156 156
157 157
158 /**
159 * General purpose unique identifier.
160 */
161 class UniqueId {
162 public:
163 explicit UniqueId(intptr_t data)
164 : data_(data) {}
165
166 bool operator==(const UniqueId& other) const {
167 return data_ == other.data_;
168 }
169
170 bool operator!=(const UniqueId& other) const {
171 return data_ != other.data_;
172 }
173
174 bool operator<(const UniqueId& other) const {
175 return data_ < other.data_;
176 }
177
178 private:
179 intptr_t data_;
180 };
181
182 // --- Handles --- 158 // --- Handles ---
183 159
184 #define TYPE_CHECK(T, S) \ 160 #define TYPE_CHECK(T, S) \
185 while (false) { \ 161 while (false) { \
186 *(static_cast<T* volatile*>(0)) = static_cast<S*>(0); \ 162 *(static_cast<T* volatile*>(0)) = static_cast<S*>(0); \
187 } 163 }
188 164
189 165
190 /** 166 /**
191 * An object reference managed by the v8 garbage collector. 167 * An object reference managed by the v8 garbage collector.
(...skipping 9642 matching lines...) Expand 10 before | Expand all | Expand 10 after
9834 */ 9810 */
9835 9811
9836 9812
9837 } // namespace v8 9813 } // namespace v8
9838 9814
9839 9815
9840 #undef TYPE_CHECK 9816 #undef TYPE_CHECK
9841 9817
9842 9818
9843 #endif // INCLUDE_V8_H_ 9819 #endif // INCLUDE_V8_H_
OLDNEW
« no previous file with comments | « no previous file | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698