OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 // Review notes: | 5 // Review notes: |
6 // | 6 // |
7 // - The use of macros in these inline functions may seem superfluous | 7 // - The use of macros in these inline functions may seem superfluous |
8 // but it is absolutely needed to make sure gcc generates optimal | 8 // but it is absolutely needed to make sure gcc generates optimal |
9 // code. gcc is not happy when attempting to inline too deep. | 9 // code. gcc is not happy when attempting to inline too deep. |
10 // | 10 // |
(...skipping 2607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2618 get(kFirstIndex + frame_ix * kElementsPerFrame + k##name##Offset); \ | 2618 get(kFirstIndex + frame_ix * kElementsPerFrame + k##name##Offset); \ |
2619 return type::cast(obj); \ | 2619 return type::cast(obj); \ |
2620 } \ | 2620 } \ |
2621 \ | 2621 \ |
2622 void FrameArray::Set##name(int frame_ix, type* value) { \ | 2622 void FrameArray::Set##name(int frame_ix, type* value) { \ |
2623 set(kFirstIndex + frame_ix * kElementsPerFrame + k##name##Offset, value); \ | 2623 set(kFirstIndex + frame_ix * kElementsPerFrame + k##name##Offset, value); \ |
2624 } | 2624 } |
2625 FRAME_ARRAY_FIELD_LIST(DEFINE_FRAME_ARRAY_ACCESSORS) | 2625 FRAME_ARRAY_FIELD_LIST(DEFINE_FRAME_ARRAY_ACCESSORS) |
2626 #undef DEFINE_FRAME_ARRAY_ACCESSORS | 2626 #undef DEFINE_FRAME_ARRAY_ACCESSORS |
2627 | 2627 |
2628 int FrameArray::SloppyFrameCount() const { | |
2629 return Smi::cast(get(kSloppyFramesIndex))->value(); | |
2630 } | |
2631 | |
2632 void FrameArray::SetSloppyFrameCount(int count) { | |
2633 return set(kSloppyFramesIndex, Smi::FromInt(count)); | |
2634 } | |
2635 | |
2636 bool FrameArray::IsWasmFrame(int frame_ix) const { | 2628 bool FrameArray::IsWasmFrame(int frame_ix) const { |
2637 Object* obj = get(kFirstIndex + frame_ix * kElementsPerFrame + | 2629 const int flags = Flags(frame_ix)->value(); |
2638 kWasmFunctionIndexOffset); | 2630 return (flags & kIsWasmFrame) != 0; |
2639 return obj->IsSmi(); | |
2640 } | 2631 } |
2641 | 2632 |
2642 int FrameArray::FrameCount() const { | 2633 int FrameArray::FrameCount() const { |
2643 const int frame_count = Smi::cast(get(kFrameCountIndex))->value(); | 2634 const int frame_count = Smi::cast(get(kFrameCountIndex))->value(); |
2644 DCHECK_LE(0, frame_count); | 2635 DCHECK_LE(0, frame_count); |
2645 return frame_count; | 2636 return frame_count; |
2646 } | 2637 } |
2647 | 2638 |
2648 bool DescriptorArray::IsEmpty() { | 2639 bool DescriptorArray::IsEmpty() { |
2649 DCHECK(length() >= kFirstIndex || | 2640 DCHECK(length() >= kFirstIndex || |
(...skipping 5604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8254 #undef WRITE_INT64_FIELD | 8245 #undef WRITE_INT64_FIELD |
8255 #undef READ_BYTE_FIELD | 8246 #undef READ_BYTE_FIELD |
8256 #undef WRITE_BYTE_FIELD | 8247 #undef WRITE_BYTE_FIELD |
8257 #undef NOBARRIER_READ_BYTE_FIELD | 8248 #undef NOBARRIER_READ_BYTE_FIELD |
8258 #undef NOBARRIER_WRITE_BYTE_FIELD | 8249 #undef NOBARRIER_WRITE_BYTE_FIELD |
8259 | 8250 |
8260 } // namespace internal | 8251 } // namespace internal |
8261 } // namespace v8 | 8252 } // namespace v8 |
8262 | 8253 |
8263 #endif // V8_OBJECTS_INL_H_ | 8254 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |