aboutsummaryrefslogtreecommitdiff
path: root/deps/v8/src/objects/allocation-site.h
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2019-03-12 09:01:49 +0100
committerMichaël Zasso <targos@protonmail.com>2019-03-14 18:49:21 +0100
commit7b48713334469818661fe276cf571de9c7899f2d (patch)
tree4dbda49ac88db76ce09dc330a0cb587e68e139ba /deps/v8/src/objects/allocation-site.h
parent8549ac09b256666cf5275224ec58fab9939ff32e (diff)
downloadandroid-node-v8-7b48713334469818661fe276cf571de9c7899f2d.tar.gz
android-node-v8-7b48713334469818661fe276cf571de9c7899f2d.tar.bz2
android-node-v8-7b48713334469818661fe276cf571de9c7899f2d.zip
deps: update V8 to 7.3.492.25
PR-URL: https://github.com/nodejs/node/pull/25852 Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com>
Diffstat (limited to 'deps/v8/src/objects/allocation-site.h')
-rw-r--r--deps/v8/src/objects/allocation-site.h35
1 files changed, 22 insertions, 13 deletions
diff --git a/deps/v8/src/objects/allocation-site.h b/deps/v8/src/objects/allocation-site.h
index d923fd8f23..7b22d34f33 100644
--- a/deps/v8/src/objects/allocation-site.h
+++ b/deps/v8/src/objects/allocation-site.h
@@ -6,6 +6,7 @@
#define V8_OBJECTS_ALLOCATION_SITE_H_
#include "src/objects.h"
+#include "src/objects/struct.h"
// Has to be the last include (doesn't have include guards):
#include "src/objects/object-macros.h"
@@ -13,8 +14,11 @@
namespace v8 {
namespace internal {
-class AllocationSite : public Struct, public NeverReadOnlySpaceObject {
+enum InstanceType : uint16_t;
+
+class AllocationSite : public Struct {
public:
+ NEVER_READ_ONLY_SPACE
static const uint32_t kMaximumArrayBytesToPretransition = 8 * 1024;
static const double kPretenureRatio;
static const int kPretenureMinimumCreated = 100;
@@ -134,39 +138,45 @@ class AllocationSite : public Struct, public NeverReadOnlySpaceObject {
// AllocationSite has to start with TransitionInfoOrboilerPlateOffset
// and end with WeakNext field.
#define ALLOCATION_SITE_FIELDS(V) \
- V(kTransitionInfoOrBoilerplateOffset, kPointerSize) \
- V(kNestedSiteOffset, kPointerSize) \
- V(kDependentCodeOffset, kPointerSize) \
+ V(kStartOffset, 0) \
+ V(kTransitionInfoOrBoilerplateOffset, kTaggedSize) \
+ V(kNestedSiteOffset, kTaggedSize) \
+ V(kDependentCodeOffset, kTaggedSize) \
V(kCommonPointerFieldEndOffset, 0) \
V(kPretenureDataOffset, kInt32Size) \
V(kPretenureCreateCountOffset, kInt32Size) \
/* Size of AllocationSite without WeakNext field */ \
V(kSizeWithoutWeakNext, 0) \
- V(kWeakNextOffset, kPointerSize) \
+ V(kWeakNextOffset, kTaggedSize) \
/* Size of AllocationSite with WeakNext field */ \
V(kSizeWithWeakNext, 0)
DEFINE_FIELD_OFFSET_CONSTANTS(HeapObject::kHeaderSize, ALLOCATION_SITE_FIELDS)
-
- static const int kStartOffset = HeapObject::kHeaderSize;
+#undef ALLOCATION_SITE_FIELDS
class BodyDescriptor;
private:
inline bool PretenuringDecisionMade() const;
- DISALLOW_IMPLICIT_CONSTRUCTORS(AllocationSite);
+ OBJECT_CONSTRUCTORS(AllocationSite, Struct);
};
class AllocationMemento : public Struct {
public:
- static const int kAllocationSiteOffset = HeapObject::kHeaderSize;
- static const int kSize = kAllocationSiteOffset + kPointerSize;
+// Layout description.
+#define ALLOCATION_MEMENTO_FIELDS(V) \
+ V(kAllocationSiteOffset, kTaggedSize) \
+ V(kSize, 0)
+
+ DEFINE_FIELD_OFFSET_CONSTANTS(HeapObject::kHeaderSize,
+ ALLOCATION_MEMENTO_FIELDS)
+#undef ALLOCATION_MEMENTO_FIELDS
DECL_ACCESSORS(allocation_site, Object)
inline bool IsValid() const;
- inline AllocationSite* GetAllocationSite() const;
+ inline AllocationSite GetAllocationSite() const;
inline Address GetAllocationSiteUnchecked() const;
DECL_PRINTER(AllocationMemento)
@@ -174,8 +184,7 @@ class AllocationMemento : public Struct {
DECL_CAST(AllocationMemento)
- private:
- DISALLOW_IMPLICIT_CONSTRUCTORS(AllocationMemento);
+ OBJECT_CONSTRUCTORS(AllocationMemento, Struct);
};
} // namespace internal