Line data Source code
1 : // Copyright 2018 the V8 project authors. All rights reserved.
2 : // Use of this source code is governed by a BSD-style license that can be
3 : // found in the LICENSE file.
4 :
5 : #ifndef V8_OBJECTS_FEEDBACK_CELL_INL_H_
6 : #define V8_OBJECTS_FEEDBACK_CELL_INL_H_
7 :
8 : #include "src/objects/feedback-cell.h"
9 :
10 : #include "src/heap/heap-write-barrier-inl.h"
11 : #include "src/objects-inl.h"
12 : #include "src/objects/struct-inl.h"
13 :
14 : // Has to be the last include (doesn't have include guards):
15 : #include "src/objects/object-macros.h"
16 :
17 : namespace v8 {
18 : namespace internal {
19 :
20 : OBJECT_CONSTRUCTORS_IMPL(FeedbackCell, Struct)
21 :
22 : CAST_ACCESSOR(FeedbackCell)
23 :
24 110332203 : ACCESSORS(FeedbackCell, value, HeapObject, kValueOffset)
25 5866336 : INT32_ACCESSORS(FeedbackCell, interrupt_budget, kInterruptBudgetOffset)
26 :
27 : void FeedbackCell::clear_padding() {
28 : if (FeedbackCell::kSize == FeedbackCell::kUnalignedSize) return;
29 : DCHECK_GE(FeedbackCell::kSize, FeedbackCell::kUnalignedSize);
30 5651380 : memset(reinterpret_cast<byte*>(address() + FeedbackCell::kUnalignedSize), 0,
31 : FeedbackCell::kSize - FeedbackCell::kUnalignedSize);
32 : }
33 :
34 : } // namespace internal
35 : } // namespace v8
36 :
37 : #include "src/objects/object-macros-undef.h"
38 :
39 : #endif // V8_OBJECTS_FEEDBACK_CELL_INL_H_
|