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

Side by Side Diff: src/unique.h

Issue 839053004: src: fix build on freebsd (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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/preparser.h ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_HYDROGEN_UNIQUE_H_ 5 #ifndef V8_HYDROGEN_UNIQUE_H_
6 #define V8_HYDROGEN_UNIQUE_H_ 6 #define V8_HYDROGEN_UNIQUE_H_
7 7
8 #include <ostream> // NOLINT(readability/streams) 8 #include <ostream> // NOLINT(readability/streams)
9 9
10 #include "src/base/functional.h" 10 #include "src/base/functional.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 template <class S> static Unique<T> cast(Unique<S> that) { 110 template <class S> static Unique<T> cast(Unique<S> that) {
111 return Unique<T>(that.raw_address_, Handle<T>::cast(that.handle_)); 111 return Unique<T>(that.raw_address_, Handle<T>::cast(that.handle_));
112 } 112 }
113 113
114 inline bool IsInitialized() const { 114 inline bool IsInitialized() const {
115 return raw_address_ != NULL || handle_.is_null(); 115 return raw_address_ != NULL || handle_.is_null();
116 } 116 }
117 117
118 // TODO(titzer): this is a hack to migrate to Unique<T> incrementally. 118 // TODO(titzer): this is a hack to migrate to Unique<T> incrementally.
119 static Unique<T> CreateUninitialized(Handle<T> handle) { 119 static Unique<T> CreateUninitialized(Handle<T> handle) {
120 return Unique<T>(reinterpret_cast<Address>(NULL), handle); 120 return Unique<T>(NULL, handle);
121 } 121 }
122 122
123 static Unique<T> CreateImmovable(Handle<T> handle) { 123 static Unique<T> CreateImmovable(Handle<T> handle) {
124 return Unique<T>(reinterpret_cast<Address>(*handle), handle); 124 return Unique<T>(reinterpret_cast<Address>(*handle), handle);
125 } 125 }
126 126
127 friend class UniqueSet<T>; // Uses internal details for speed. 127 friend class UniqueSet<T>; // Uses internal details for speed.
128 template <class U> 128 template <class U>
129 friend class Unique; // For comparing raw_address values. 129 friend class Unique; // For comparing raw_address values.
130 130
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 } 350 }
351 capacity_ = new_capacity; 351 capacity_ = new_capacity;
352 array_ = new_array; 352 array_ = new_array;
353 } 353 }
354 } 354 }
355 }; 355 };
356 356
357 } } // namespace v8::internal 357 } } // namespace v8::internal
358 358
359 #endif // V8_HYDROGEN_UNIQUE_H_ 359 #endif // V8_HYDROGEN_UNIQUE_H_
OLDNEW
« no previous file with comments | « src/preparser.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698