summaryrefslogtreecommitdiff
path: root/deps/v8/src/property.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/property.h')
-rw-r--r--deps/v8/src/property.h41
1 files changed, 12 insertions, 29 deletions
diff --git a/deps/v8/src/property.h b/deps/v8/src/property.h
index 4173491466..7a7d485bc3 100644
--- a/deps/v8/src/property.h
+++ b/deps/v8/src/property.h
@@ -9,6 +9,7 @@
#include "src/globals.h"
#include "src/handles.h"
+#include "src/maybe-handles.h"
#include "src/objects.h"
#include "src/objects/name.h"
#include "src/property-details.h"
@@ -23,7 +24,7 @@ namespace internal {
// optionally a piece of data.
class Descriptor final BASE_EMBEDDED {
public:
- Descriptor() : details_(Smi::kZero) {}
+ Descriptor();
Handle<Name> GetKey() const { return key_; }
MaybeObjectHandle GetValue() const { return value_; }
@@ -31,8 +32,8 @@ class Descriptor final BASE_EMBEDDED {
void SetSortedKeyIndex(int index) { details_ = details_.set_pointer(index); }
- static Descriptor DataField(Handle<Name> key, int field_index,
- PropertyAttributes attributes,
+ static Descriptor DataField(Isolate* isolate, Handle<Name> key,
+ int field_index, PropertyAttributes attributes,
Representation representation);
static Descriptor DataField(Handle<Name> key, int field_index,
@@ -42,22 +43,14 @@ class Descriptor final BASE_EMBEDDED {
MaybeObjectHandle wrapped_field_type);
static Descriptor DataConstant(Handle<Name> key, Handle<Object> value,
- PropertyAttributes attributes) {
- return Descriptor(key, MaybeObjectHandle(value), kData, attributes,
- kDescriptor, PropertyConstness::kConst,
- value->OptimalRepresentation(), 0);
- }
-
- static Descriptor DataConstant(Handle<Name> key, int field_index,
- Handle<Object> value,
+ PropertyAttributes attributes);
+
+ static Descriptor DataConstant(Isolate* isolate, Handle<Name> key,
+ int field_index, Handle<Object> value,
PropertyAttributes attributes);
static Descriptor AccessorConstant(Handle<Name> key, Handle<Object> foreign,
- PropertyAttributes attributes) {
- return Descriptor(key, MaybeObjectHandle(foreign), kAccessor, attributes,
- kDescriptor, PropertyConstness::kConst,
- Representation::Tagged(), 0);
- }
+ PropertyAttributes attributes);
private:
Handle<Name> key_;
@@ -65,23 +58,13 @@ class Descriptor final BASE_EMBEDDED {
PropertyDetails details_;
protected:
- Descriptor(Handle<Name> key, MaybeObjectHandle value, PropertyDetails details)
- : key_(key), value_(value), details_(details) {
- DCHECK(key->IsUniqueName());
- DCHECK_IMPLIES(key->IsPrivate(), !details_.IsEnumerable());
- }
+ Descriptor(Handle<Name> key, MaybeObjectHandle value,
+ PropertyDetails details);
Descriptor(Handle<Name> key, MaybeObjectHandle value, PropertyKind kind,
PropertyAttributes attributes, PropertyLocation location,
PropertyConstness constness, Representation representation,
- int field_index)
- : key_(key),
- value_(value),
- details_(kind, attributes, location, constness, representation,
- field_index) {
- DCHECK(key->IsUniqueName());
- DCHECK_IMPLIES(key->IsPrivate(), !details_.IsEnumerable());
- }
+ int field_index);
friend class MapUpdater;
};