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

Side by Side Diff: src/handles.h

Issue 1451143005: [turbofan] Decouple inlining and native context specialization. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove misleading comment about MaybeHandle. Created 5 years, 1 month 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/compiler/pipeline.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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_HANDLES_H_ 5 #ifndef V8_HANDLES_H_
6 #define V8_HANDLES_H_ 6 #define V8_HANDLES_H_
7 7
8 #include "include/v8.h" 8 #include "include/v8.h"
9 #include "src/base/functional.h" 9 #include "src/base/functional.h"
10 #include "src/base/macros.h" 10 #include "src/base/macros.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 V8_INLINE Handle<T> handle(T* object) { 164 V8_INLINE Handle<T> handle(T* object) {
165 return Handle<T>(object); 165 return Handle<T>(object);
166 } 166 }
167 167
168 168
169 // ---------------------------------------------------------------------------- 169 // ----------------------------------------------------------------------------
170 // A Handle can be converted into a MaybeHandle. Converting a MaybeHandle 170 // A Handle can be converted into a MaybeHandle. Converting a MaybeHandle
171 // into a Handle requires checking that it does not point to NULL. This 171 // into a Handle requires checking that it does not point to NULL. This
172 // ensures NULL checks before use. 172 // ensures NULL checks before use.
173 // 173 //
174 // Do not use MaybeHandle as argument type.
175 //
176 // Also note that Handles do not provide default equality comparison or hashing 174 // Also note that Handles do not provide default equality comparison or hashing
177 // operators on purpose. Such operators would be misleading, because intended 175 // operators on purpose. Such operators would be misleading, because intended
178 // semantics is ambiguous between Handle location and object identity. 176 // semantics is ambiguous between Handle location and object identity.
179 template <typename T> 177 template <typename T>
180 class MaybeHandle final { 178 class MaybeHandle final {
181 public: 179 public:
182 V8_INLINE MaybeHandle() {} 180 V8_INLINE MaybeHandle() {}
183 V8_INLINE ~MaybeHandle() {} 181 V8_INLINE ~MaybeHandle() {}
184 182
185 // Constructor for handling automatic up casting from Handle. 183 // Constructor for handling automatic up casting from Handle.
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 next = limit = NULL; 399 next = limit = NULL;
402 sealed_level = level = 0; 400 sealed_level = level = 0;
403 canonical_scope = NULL; 401 canonical_scope = NULL;
404 } 402 }
405 }; 403 };
406 404
407 } // namespace internal 405 } // namespace internal
408 } // namespace v8 406 } // namespace v8
409 407
410 #endif // V8_HANDLES_H_ 408 #endif // V8_HANDLES_H_
OLDNEW
« no previous file with comments | « src/compiler/pipeline.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698