| Index: src/property.h
|
| diff --git a/src/property.h b/src/property.h
|
| index 79abca04c9d50f4e6c160b0893f9537bf758f418..5f8e6da40722f200d8f5081e6f48cd8b6f8f2622 100644
|
| --- a/src/property.h
|
| +++ b/src/property.h
|
| @@ -104,137 +104,6 @@ class AccessorConstantDescriptor FINAL : public Descriptor {
|
| };
|
|
|
|
|
| -class LookupResult FINAL BASE_EMBEDDED {
|
| - public:
|
| - explicit LookupResult(Isolate* isolate)
|
| - : isolate_(isolate),
|
| - next_(isolate->top_lookup_result()),
|
| - lookup_type_(NOT_FOUND),
|
| - transition_(NULL),
|
| - details_(NONE, DATA, Representation::None()) {
|
| - isolate->set_top_lookup_result(this);
|
| - }
|
| -
|
| - ~LookupResult() {
|
| - DCHECK(isolate()->top_lookup_result() == this);
|
| - isolate()->set_top_lookup_result(next_);
|
| - }
|
| -
|
| - Isolate* isolate() const { return isolate_; }
|
| -
|
| - void DescriptorResult(PropertyDetails details, int number) {
|
| - lookup_type_ = DESCRIPTOR_TYPE;
|
| - transition_ = NULL;
|
| - details_ = details;
|
| - number_ = number;
|
| - }
|
| -
|
| - void TransitionResult(Map* target) {
|
| - lookup_type_ = TRANSITION_TYPE;
|
| - number_ = target->LastAdded();
|
| - details_ = target->instance_descriptors()->GetDetails(number_);
|
| - transition_ = target;
|
| - }
|
| -
|
| - void NotFound() {
|
| - lookup_type_ = NOT_FOUND;
|
| - details_ = PropertyDetails(NONE, DATA, 0);
|
| - transition_ = NULL;
|
| - }
|
| -
|
| - Representation representation() const {
|
| - DCHECK(IsFound());
|
| - return details_.representation();
|
| - }
|
| -
|
| - // Property callbacks does not include transitions to callbacks.
|
| - bool IsAccessorConstant() const {
|
| - return !IsTransition() && details_.type() == ACCESSOR_CONSTANT;
|
| - }
|
| -
|
| - bool IsReadOnly() const {
|
| - DCHECK(IsFound());
|
| - return details_.IsReadOnly();
|
| - }
|
| -
|
| - bool IsData() const {
|
| - return lookup_type_ == DESCRIPTOR_TYPE && details_.type() == DATA;
|
| - }
|
| -
|
| - bool IsDataConstant() const {
|
| - return lookup_type_ == DESCRIPTOR_TYPE && details_.type() == DATA_CONSTANT;
|
| - }
|
| -
|
| - bool IsConfigurable() const { return details_.IsConfigurable(); }
|
| - bool IsFound() const { return lookup_type_ != NOT_FOUND; }
|
| - bool IsTransition() const { return lookup_type_ == TRANSITION_TYPE; }
|
| -
|
| - // Is the result is a property excluding transitions and the null descriptor?
|
| - bool IsProperty() const {
|
| - return IsFound() && !IsTransition();
|
| - }
|
| -
|
| - Map* GetTransitionTarget() const {
|
| - DCHECK(IsTransition());
|
| - return transition_;
|
| - }
|
| -
|
| - bool IsTransitionToData() const {
|
| - return IsTransition() && details_.type() == DATA;
|
| - }
|
| -
|
| - int GetLocalFieldIndexFromMap(Map* map) const {
|
| - return GetFieldIndexFromMap(map) - map->inobject_properties();
|
| - }
|
| -
|
| - Object* GetConstantFromMap(Map* map) const {
|
| - DCHECK(details_.type() == DATA_CONSTANT);
|
| - return GetValueFromMap(map);
|
| - }
|
| -
|
| - Object* GetValueFromMap(Map* map) const {
|
| - DCHECK(lookup_type_ == DESCRIPTOR_TYPE ||
|
| - lookup_type_ == TRANSITION_TYPE);
|
| - DCHECK(number_ < map->NumberOfOwnDescriptors());
|
| - return map->instance_descriptors()->GetValue(number_);
|
| - }
|
| -
|
| - int GetFieldIndexFromMap(Map* map) const {
|
| - DCHECK(lookup_type_ == DESCRIPTOR_TYPE ||
|
| - lookup_type_ == TRANSITION_TYPE);
|
| - DCHECK(number_ < map->NumberOfOwnDescriptors());
|
| - return map->instance_descriptors()->GetFieldIndex(number_);
|
| - }
|
| -
|
| - HeapType* GetFieldTypeFromMap(Map* map) const {
|
| - DCHECK_NE(NOT_FOUND, lookup_type_);
|
| - DCHECK(number_ < map->NumberOfOwnDescriptors());
|
| - return map->instance_descriptors()->GetFieldType(number_);
|
| - }
|
| -
|
| - Map* GetFieldOwnerFromMap(Map* map) const {
|
| - DCHECK(lookup_type_ == DESCRIPTOR_TYPE ||
|
| - lookup_type_ == TRANSITION_TYPE);
|
| - DCHECK(number_ < map->NumberOfOwnDescriptors());
|
| - return map->FindFieldOwner(number_);
|
| - }
|
| -
|
| - void Iterate(ObjectVisitor* visitor);
|
| -
|
| - private:
|
| - Isolate* isolate_;
|
| - LookupResult* next_;
|
| -
|
| - // Where did we find the result;
|
| - enum { NOT_FOUND, DESCRIPTOR_TYPE, TRANSITION_TYPE } lookup_type_;
|
| -
|
| - Map* transition_;
|
| - int number_;
|
| - PropertyDetails details_;
|
| -};
|
| -
|
| -
|
| -std::ostream& operator<<(std::ostream& os, const LookupResult& r);
|
| } } // namespace v8::internal
|
|
|
| #endif // V8_PROPERTY_H_
|
|
|