| 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 "types.h" | 8 #include "types.h" |
| 9 | 9 |
| 10 #include "factory.h" | 10 #include "factory.h" |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 | 123 |
| 124 // static | 124 // static |
| 125 void ZoneTypeConfig::struct_shrink(Struct* structured, int length) { | 125 void ZoneTypeConfig::struct_shrink(Struct* structured, int length) { |
| 126 ASSERT(0 <= length && length <= struct_length(structured)); | 126 ASSERT(0 <= length && length <= struct_length(structured)); |
| 127 structured[1] = reinterpret_cast<void*>(length); | 127 structured[1] = reinterpret_cast<void*>(length); |
| 128 } | 128 } |
| 129 | 129 |
| 130 | 130 |
| 131 // static | 131 // static |
| 132 int ZoneTypeConfig::struct_tag(Struct* structured) { | 132 int ZoneTypeConfig::struct_tag(Struct* structured) { |
| 133 int tag = reinterpret_cast<intptr_t>(structured[0]); | 133 return static_cast<int>(reinterpret_cast<intptr_t>(structured[0])); |
| 134 return tag; | |
| 135 } | 134 } |
| 136 | 135 |
| 137 | 136 |
| 138 // static | 137 // static |
| 139 int ZoneTypeConfig::struct_length(Struct* structured) { | 138 int ZoneTypeConfig::struct_length(Struct* structured) { |
| 140 int length = reinterpret_cast<intptr_t>(structured[1]); | 139 return static_cast<int>(reinterpret_cast<intptr_t>(structured[1])); |
| 141 return length; | |
| 142 } | 140 } |
| 143 | 141 |
| 144 | 142 |
| 145 // static | 143 // static |
| 146 Type* ZoneTypeConfig::struct_get(Struct* structured, int i) { | 144 Type* ZoneTypeConfig::struct_get(Struct* structured, int i) { |
| 147 ASSERT(0 <= i && i <= struct_length(structured)); | 145 ASSERT(0 <= i && i <= struct_length(structured)); |
| 148 return static_cast<Type*>(structured[2 + i]); | 146 return static_cast<Type*>(structured[2 + i]); |
| 149 } | 147 } |
| 150 | 148 |
| 151 | 149 |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 | 295 |
| 298 | 296 |
| 299 // static | 297 // static |
| 300 int HeapTypeConfig::lub_bitset(Type* type) { | 298 int HeapTypeConfig::lub_bitset(Type* type) { |
| 301 return 0; // kNone, which causes recomputation. | 299 return 0; // kNone, which causes recomputation. |
| 302 } | 300 } |
| 303 | 301 |
| 304 } } // namespace v8::internal | 302 } } // namespace v8::internal |
| 305 | 303 |
| 306 #endif // V8_TYPES_INL_H_ | 304 #endif // V8_TYPES_INL_H_ |
| OLD | NEW |