summaryrefslogtreecommitdiffstats
path: root/V8Binding/v8/src/property.h
diff options
context:
space:
mode:
authorFeng Qian <fqian@google.com>2009-07-13 16:30:18 -0700
committerFeng Qian <fqian@google.com>2009-07-13 16:30:18 -0700
commit5a9288abcf660ba3499c9e650b415d81872837fc (patch)
treee39df4bee097d4d92fb27e1b4b1aa6c06380e3c1 /V8Binding/v8/src/property.h
parent2350931596370d4cc9fc26d72039369d9fe72c9c (diff)
downloadexternal_webkit-5a9288abcf660ba3499c9e650b415d81872837fc.zip
external_webkit-5a9288abcf660ba3499c9e650b415d81872837fc.tar.gz
external_webkit-5a9288abcf660ba3499c9e650b415d81872837fc.tar.bz2
Update V8 to bleeding_edge@2450 to pick up a few important fixes.
API stays the same, and the same revision is pushed to Chromium.
Diffstat (limited to 'V8Binding/v8/src/property.h')
-rw-r--r--V8Binding/v8/src/property.h88
1 files changed, 0 insertions, 88 deletions
diff --git a/V8Binding/v8/src/property.h b/V8Binding/v8/src/property.h
index 69e5640..1869719 100644
--- a/V8Binding/v8/src/property.h
+++ b/V8Binding/v8/src/property.h
@@ -95,8 +95,6 @@ class Descriptor BASE_EMBEDDED {
value_(value),
details_(attributes, type, index) { }
- friend class DescriptorWriter;
- friend class DescriptorReader;
friend class DescriptorArray;
};
@@ -324,92 +322,6 @@ class LookupResult BASE_EMBEDDED {
};
-// The DescriptorStream is an abstraction for iterating over a map's
-// instance descriptors.
-class DescriptorStream BASE_EMBEDDED {
- public:
- explicit DescriptorStream(DescriptorArray* descriptors, int pos) {
- descriptors_ = descriptors;
- pos_ = pos;
- limit_ = descriptors_->number_of_descriptors();
- }
-
- // Tells whether we have reached the end of the steam.
- bool eos() { return pos_ >= limit_; }
-
- int next_position() { return pos_ + 1; }
- void advance() { pos_ = next_position(); }
-
- protected:
- DescriptorArray* descriptors_;
- int pos_; // Current position.
- int limit_; // Limit for position.
-};
-
-
-class DescriptorReader: public DescriptorStream {
- public:
- explicit DescriptorReader(DescriptorArray* descriptors, int pos = 0)
- : DescriptorStream(descriptors, pos) {}
-
- String* GetKey() { return descriptors_->GetKey(pos_); }
- Object* GetValue() { return descriptors_->GetValue(pos_); }
- PropertyDetails GetDetails() {
- return PropertyDetails(descriptors_->GetDetails(pos_));
- }
-
- int GetFieldIndex() { return Descriptor::IndexFromValue(GetValue()); }
-
- bool IsDontEnum() { return GetDetails().IsDontEnum(); }
-
- PropertyType type() { return GetDetails().type(); }
-
- // Tells whether the type is a transition.
- bool IsTransition() {
- PropertyType t = type();
- ASSERT(t != INTERCEPTOR);
- return t == MAP_TRANSITION || t == CONSTANT_TRANSITION;
- }
-
- bool IsNullDescriptor() {
- return type() == NULL_DESCRIPTOR;
- }
-
- bool IsProperty() {
- return type() < FIRST_PHANTOM_PROPERTY_TYPE;
- }
-
- JSFunction* GetConstantFunction() { return JSFunction::cast(GetValue()); }
-
- AccessorDescriptor* GetCallbacks() {
- ASSERT(type() == CALLBACKS);
- Proxy* p = Proxy::cast(GetCallbacksObject());
- return reinterpret_cast<AccessorDescriptor*>(p->proxy());
- }
-
- Object* GetCallbacksObject() {
- ASSERT(type() == CALLBACKS);
- return GetValue();
- }
-
- bool Equals(String* name) { return name->Equals(GetKey()); }
-
- void Get(Descriptor* desc) {
- descriptors_->Get(pos_, desc);
- }
-};
-
-class DescriptorWriter: public DescriptorStream {
- public:
- explicit DescriptorWriter(DescriptorArray* descriptors)
- : DescriptorStream(descriptors, 0) {}
-
- // Append a descriptor to this stream.
- void Write(Descriptor* desc);
- // Read a descriptor from the reader and append it to this stream.
- void WriteFrom(DescriptorReader* reader);
-};
-
} } // namespace v8::internal
#endif // V8_PROPERTY_H_