| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 } | 49 } |
| 50 return this->Contains(value); | 50 return this->Contains(value); |
| 51 } | 51 } |
| 52 | 52 |
| 53 | 53 |
| 54 // ----------------------------------------------------------------------------- | 54 // ----------------------------------------------------------------------------- |
| 55 // ZoneTypeConfig | 55 // ZoneTypeConfig |
| 56 | 56 |
| 57 // static | 57 // static |
| 58 template<class T> | 58 template<class T> |
| 59 T* ZoneTypeConfig::null_handle() { |
| 60 return NULL; |
| 61 } |
| 62 |
| 63 |
| 64 // static |
| 65 template<class T> |
| 59 T* ZoneTypeConfig::handle(T* type) { | 66 T* ZoneTypeConfig::handle(T* type) { |
| 60 return type; | 67 return type; |
| 61 } | 68 } |
| 62 | 69 |
| 63 | 70 |
| 64 // static | 71 // static |
| 65 template<class T> | 72 template<class T> |
| 66 T* ZoneTypeConfig::cast(Type* type) { | 73 T* ZoneTypeConfig::cast(Type* type) { |
| 67 return static_cast<T*>(type); | 74 return static_cast<T*>(type); |
| 68 } | 75 } |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 DCHECK(0 <= i && i <= struct_length(structure)); | 199 DCHECK(0 <= i && i <= struct_length(structure)); |
| 193 structure[2 + i] = x.location(); | 200 structure[2 + i] = x.location(); |
| 194 } | 201 } |
| 195 | 202 |
| 196 | 203 |
| 197 // ----------------------------------------------------------------------------- | 204 // ----------------------------------------------------------------------------- |
| 198 // HeapTypeConfig | 205 // HeapTypeConfig |
| 199 | 206 |
| 200 // static | 207 // static |
| 201 template<class T> | 208 template<class T> |
| 209 i::Handle<T> HeapTypeConfig::null_handle() { |
| 210 return i::Handle<T>(); |
| 211 } |
| 212 |
| 213 |
| 214 // static |
| 215 template<class T> |
| 202 i::Handle<T> HeapTypeConfig::handle(T* type) { | 216 i::Handle<T> HeapTypeConfig::handle(T* type) { |
| 203 return i::handle(type, i::HeapObject::cast(type)->GetIsolate()); | 217 return i::handle(type, i::HeapObject::cast(type)->GetIsolate()); |
| 204 } | 218 } |
| 205 | 219 |
| 206 | 220 |
| 207 // static | 221 // static |
| 208 template<class T> | 222 template<class T> |
| 209 i::Handle<T> HeapTypeConfig::cast(i::Handle<Type> type) { | 223 i::Handle<T> HeapTypeConfig::cast(i::Handle<Type> type) { |
| 210 return i::Handle<T>::cast(type); | 224 return i::Handle<T>::cast(type); |
| 211 } | 225 } |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 // static | 344 // static |
| 331 template<class V> | 345 template<class V> |
| 332 void HeapTypeConfig::struct_set_value( | 346 void HeapTypeConfig::struct_set_value( |
| 333 i::Handle<Struct> structure, int i, i::Handle<V> x) { | 347 i::Handle<Struct> structure, int i, i::Handle<V> x) { |
| 334 structure->set(i + 1, *x); | 348 structure->set(i + 1, *x); |
| 335 } | 349 } |
| 336 | 350 |
| 337 } } // namespace v8::internal | 351 } } // namespace v8::internal |
| 338 | 352 |
| 339 #endif // V8_TYPES_INL_H_ | 353 #endif // V8_TYPES_INL_H_ |
| OLD | NEW |