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 21 matching lines...) Expand all Loading... |
32 // descriptor reallocations. | 32 // descriptor reallocations. |
33 ++length; | 33 ++length; |
34 } | 34 } |
35 return Handle<LayoutDescriptor>::cast( | 35 return Handle<LayoutDescriptor>::cast( |
36 isolate->factory()->NewFixedTypedArray(length, kExternalUint32Array)); | 36 isolate->factory()->NewFixedTypedArray(length, kExternalUint32Array)); |
37 } | 37 } |
38 | 38 |
39 | 39 |
40 bool LayoutDescriptor::InobjectUnboxedField(int inobject_properties, | 40 bool LayoutDescriptor::InobjectUnboxedField(int inobject_properties, |
41 PropertyDetails details) { | 41 PropertyDetails details) { |
42 if (details.type() != FIELD || !details.representation().IsDouble()) { | 42 if (details.type() != DATA_FIELD || !details.representation().IsDouble()) { |
43 return false; | 43 return false; |
44 } | 44 } |
45 // We care only about in-object properties. | 45 // We care only about in-object properties. |
46 return details.field_index() < inobject_properties; | 46 return details.field_index() < inobject_properties; |
47 } | 47 } |
48 | 48 |
49 | 49 |
50 LayoutDescriptor* LayoutDescriptor::FastPointerLayout() { | 50 LayoutDescriptor* LayoutDescriptor::FastPointerLayout() { |
51 return LayoutDescriptor::FromSmi(Smi::FromInt(0)); | 51 return LayoutDescriptor::FromSmi(Smi::FromInt(0)); |
52 } | 52 } |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 // Object headers do not contain non-tagged fields. | 182 // Object headers do not contain non-tagged fields. |
183 if (offset_in_bytes < header_size_) return true; | 183 if (offset_in_bytes < header_size_) return true; |
184 int field_index = (offset_in_bytes - header_size_) / kPointerSize; | 184 int field_index = (offset_in_bytes - header_size_) / kPointerSize; |
185 | 185 |
186 return layout_descriptor_->IsTagged(field_index); | 186 return layout_descriptor_->IsTagged(field_index); |
187 } | 187 } |
188 } | 188 } |
189 } // namespace v8::internal | 189 } // namespace v8::internal |
190 | 190 |
191 #endif // V8_LAYOUT_DESCRIPTOR_INL_H_ | 191 #endif // V8_LAYOUT_DESCRIPTOR_INL_H_ |
OLD | NEW |