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_LAYOUT_DESCRIPTOR_INL_H_ | 5 #ifndef V8_LAYOUT_DESCRIPTOR_INL_H_ |
6 #define V8_LAYOUT_DESCRIPTOR_INL_H_ | 6 #define V8_LAYOUT_DESCRIPTOR_INL_H_ |
7 | 7 |
8 #include "src/layout-descriptor.h" | 8 #include "src/layout-descriptor.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 | 243 |
244 bool LayoutDescriptorHelper::IsTagged(int offset_in_bytes) { | 244 bool LayoutDescriptorHelper::IsTagged(int offset_in_bytes) { |
245 DCHECK(IsAligned(offset_in_bytes, kPointerSize)); | 245 DCHECK(IsAligned(offset_in_bytes, kPointerSize)); |
246 if (all_fields_tagged_) return true; | 246 if (all_fields_tagged_) return true; |
247 // Object headers do not contain non-tagged fields. | 247 // Object headers do not contain non-tagged fields. |
248 if (offset_in_bytes < header_size_) return true; | 248 if (offset_in_bytes < header_size_) return true; |
249 int field_index = (offset_in_bytes - header_size_) / kPointerSize; | 249 int field_index = (offset_in_bytes - header_size_) / kPointerSize; |
250 | 250 |
251 return layout_descriptor_->IsTagged(field_index); | 251 return layout_descriptor_->IsTagged(field_index); |
252 } | 252 } |
253 } | 253 } // namespace internal |
254 } // namespace v8::internal | 254 } // namespace v8 |
255 | 255 |
256 #endif // V8_LAYOUT_DESCRIPTOR_INL_H_ | 256 #endif // V8_LAYOUT_DESCRIPTOR_INL_H_ |
OLD | NEW |