OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_TYPES_INL_H_ | 5 #ifndef V8_TYPES_INL_H_ |
6 #define V8_TYPES_INL_H_ | 6 #define V8_TYPES_INL_H_ |
7 | 7 |
8 #include "src/types.h" | 8 #include "src/types.h" |
9 | 9 |
10 #include "src/factory.h" | 10 #include "src/factory.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 } | 62 } |
63 return this->Contains(value); | 63 return this->Contains(value); |
64 } | 64 } |
65 | 65 |
66 | 66 |
67 // ----------------------------------------------------------------------------- | 67 // ----------------------------------------------------------------------------- |
68 // ZoneTypeConfig | 68 // ZoneTypeConfig |
69 | 69 |
70 // static | 70 // static |
71 template<class T> | 71 template<class T> |
72 T* ZoneTypeConfig::null_handle() { | |
73 return NULL; | |
74 } | |
75 | |
76 | |
77 // static | |
78 template<class T> | |
79 T* ZoneTypeConfig::handle(T* type) { | 72 T* ZoneTypeConfig::handle(T* type) { |
80 return type; | 73 return type; |
81 } | 74 } |
82 | 75 |
83 | 76 |
84 // static | 77 // static |
85 template<class T> | 78 template<class T> |
86 T* ZoneTypeConfig::cast(Type* type) { | 79 T* ZoneTypeConfig::cast(Type* type) { |
87 return static_cast<T*>(type); | 80 return static_cast<T*>(type); |
88 } | 81 } |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 DCHECK(index >= 0 && index < 2); | 269 DCHECK(index >= 0 && index < 2); |
277 range->limits[index] = value; | 270 range->limits[index] = value; |
278 } | 271 } |
279 | 272 |
280 | 273 |
281 // ----------------------------------------------------------------------------- | 274 // ----------------------------------------------------------------------------- |
282 // HeapTypeConfig | 275 // HeapTypeConfig |
283 | 276 |
284 // static | 277 // static |
285 template<class T> | 278 template<class T> |
286 i::Handle<T> HeapTypeConfig::null_handle() { | |
287 return i::Handle<T>(); | |
288 } | |
289 | |
290 | |
291 // static | |
292 template<class T> | |
293 i::Handle<T> HeapTypeConfig::handle(T* type) { | 279 i::Handle<T> HeapTypeConfig::handle(T* type) { |
294 return i::handle(type, i::HeapObject::cast(type)->GetIsolate()); | 280 return i::handle(type, i::HeapObject::cast(type)->GetIsolate()); |
295 } | 281 } |
296 | 282 |
297 | 283 |
298 // static | 284 // static |
299 template<class T> | 285 template<class T> |
300 i::Handle<T> HeapTypeConfig::cast(i::Handle<Type> type) { | 286 i::Handle<T> HeapTypeConfig::cast(i::Handle<Type> type) { |
301 return i::Handle<T>::cast(type); | 287 return i::Handle<T>::cast(type); |
302 } | 288 } |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 void HeapTypeConfig::range_set_double(i::Handle<HeapTypeConfig::Range> range, | 467 void HeapTypeConfig::range_set_double(i::Handle<HeapTypeConfig::Range> range, |
482 int index, double value, | 468 int index, double value, |
483 Isolate* isolate) { | 469 Isolate* isolate) { |
484 DCHECK(index >= 0 && index < 2); | 470 DCHECK(index >= 0 && index < 2); |
485 i::Handle<Object> number = isolate->factory()->NewNumber(value); | 471 i::Handle<Object> number = isolate->factory()->NewNumber(value); |
486 range->set(index + 2, *number); | 472 range->set(index + 2, *number); |
487 } | 473 } |
488 } } // namespace v8::internal | 474 } } // namespace v8::internal |
489 | 475 |
490 #endif // V8_TYPES_INL_H_ | 476 #endif // V8_TYPES_INL_H_ |
OLD | NEW |