Commit 663a2ac4 authored by Max Moroz's avatar Max Moroz Committed by Commit Bot

[heap][objects] Add V8_EXPORT_PRIVATE to TypedSlots and Smi::kZero.

Bug: chromium:701825, chromium:911856
Change-Id: Ic8d1ea35e0b21b481aab4c87037de6646ddfe450
Reviewed-on: https://chromium-review.googlesource.com/c/1372072
Commit-Queue: Max Moroz <mmoroz@chromium.org>
Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58188}
parent b33fcd7e
......@@ -399,13 +399,13 @@ enum SlotType {
// encoded (slot type, slot offset) pairs.
// There is no duplicate detection and we do not expect many duplicates because
// typed slots contain V8 internal pointers that are not directly exposed to JS.
class TypedSlots {
class V8_EXPORT_PRIVATE TypedSlots {
public:
static const int kMaxOffset = 1 << 29;
TypedSlots() = default;
virtual ~TypedSlots();
V8_EXPORT_PRIVATE void Insert(SlotType type, uint32_t offset);
V8_EXPORT_PRIVATE void Merge(TypedSlots* other);
void Insert(SlotType type, uint32_t offset);
void Merge(TypedSlots* other);
protected:
class OffsetField : public BitField<int, 0, 29> {};
......
......@@ -98,7 +98,7 @@ class Smi : public ObjectPtr {
// C++ does not allow us to have an object of type Smi within class Smi,
// so the kZero value has type ObjectPtr. Consider it deprecated; new code
// should use zero() instead.
static constexpr ObjectPtr kZero = ObjectPtr(0);
V8_EXPORT_PRIVATE static constexpr ObjectPtr kZero = ObjectPtr(0);
// If you need something with type Smi, call zero() instead. Since it is
// a constexpr, "calling" it is just as efficient as reading kZero.
static inline constexpr Smi zero() { return Smi::FromInt(0); }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment