Index: src/objects.h |
diff --git a/src/objects.h b/src/objects.h |
index 1dc3865fd6009b6bf15e901c4b75cbabb1ca3f9a..a52c2be70757f76e8d599f645129ab1062470ea4 100644 |
--- a/src/objects.h |
+++ b/src/objects.h |
@@ -8379,19 +8379,63 @@ class AccessorInfo: public Struct { |
}; |
+class AccessorDescriptorSerializerBase { |
+ public: |
+ void VisitError() { CHECK(false); } |
Sven Panne
2013/02/19 08:41:16
Hmmm, unless I misunderstood things, this seems to
|
+ bool Complete() { return length_ == offset_; } |
+ |
+ protected: |
+ AccessorDescriptorSerializerBase(uint16_t length, uint8_t* storage) : |
+ offset_(0), length_(length), storage_(storage) { |
+ } |
+ |
+ uint16_t offset_; |
+ const uint16_t length_; |
+ uint8_t* const storage_; |
+ |
+ private: |
+ DISALLOW_IMPLICIT_CONSTRUCTORS(AccessorDescriptorSerializerBase); |
+}; |
+ |
+ |
+class AccessorDescriptorDeserializer |
+ : public AccessorDescriptorSerializerBase { |
+ public: |
+ inline AccessorDescriptorDeserializer(uint16_t length, uint8_t* storage); |
+ |
+ template<typename T> |
+ inline bool ShouldVisit(T* descriptor); |
+ inline bool ShouldVisit(v8::AccessorDescriptor* descriptor); |
+ |
+ template<typename T> |
+ inline void Visit(T* member); |
+ |
+ inline void Next(v8::AccessorDescriptor* descriptor); |
+ |
+ private: |
+ bool visited_; |
+ DISALLOW_IMPLICIT_CONSTRUCTORS(AccessorDescriptorDeserializer); |
+}; |
+ |
+ |
class DeclaredAccessorDescriptor: public Struct { |
public: |
- // TODO(dcarney): Fill out this class. |
- DECL_ACCESSORS(internal_field, Smi) |
+ DECL_ACCESSORS(serialized_descriptor, ByteArray) |
Sven Panne
2013/02/19 08:41:16
Why do we need it? It's unclear to me, which is an
|
static inline DeclaredAccessorDescriptor* cast(Object* obj); |
+ static int SerializedLength( |
+ const v8::AccessorDescriptor* descriptor); |
+ static Handle<DeclaredAccessorDescriptor> Create( |
+ const v8::AccessorDescriptor* descriptor, |
+ Isolate* isolate); |
+ |
// Dispatched behavior. |
DECLARE_PRINTER(DeclaredAccessorDescriptor) |
DECLARE_VERIFIER(DeclaredAccessorDescriptor) |
- static const int kInternalFieldOffset = HeapObject::kHeaderSize; |
- static const int kSize = kInternalFieldOffset + kPointerSize; |
+ static const int kSerializedDescriptorOffset = HeapObject::kHeaderSize; |
+ static const int kSize = kSerializedDescriptorOffset + kPointerSize; |
private: |
DISALLOW_IMPLICIT_CONSTRUCTORS(DeclaredAccessorDescriptor); |