Removed IsTransitionType predicate.
With the upcoming changes to CALLBACKS properties, a predicate on the transition
type alone doesn't make sense anymore: For CALLBACKS one has to look into the
property's value to decide, and there is even the possibility of having a an
accessor function *and* a transition in the same property.
I am not completely happy with some parts of this CL, because they contain
redundant code, but given the various representations we currently have for
property type/value pairs, I can see no easy way around that. Perhaps one can
improve this a bit in a different CL, the current diversity really, really hurts
productivity...
As a bonus, this CL includes a few minor things:
* CaseClause::RecordTypeFeedback has been cleaned up and it handles the
NULL_DESCRIPTOR case correctly now. Under some (very unlikely) circumstances,
we previously missed some opportunities for monomorphic calls. In general, it
is rather unfortunate that NULL_DESCRIPTOR "shines through", it is just a
hack for the inability to remove a descriptor entry during GC, something
callers shouldn't have to be aware of.
* DescriptorArray::CopyInsert has been cleaned up a bit, preparing it for later
CALLBACKS-related changes.
* LookupResult::Print is now more informative for CONSTANT_TRANSITION.
Review URL: https://chromiumcodereview.appspot.com/9320066
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10600 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-02-03 13:37:13 +00:00
|
|
|
// Copyright 2012 the V8 project authors. All rights reserved.
|
2008-07-03 15:10:15 +00:00
|
|
|
// Redistribution and use in source and binary forms, with or without
|
|
|
|
// modification, are permitted provided that the following conditions are
|
|
|
|
// met:
|
|
|
|
//
|
|
|
|
// * Redistributions of source code must retain the above copyright
|
|
|
|
// notice, this list of conditions and the following disclaimer.
|
|
|
|
// * Redistributions in binary form must reproduce the above
|
|
|
|
// copyright notice, this list of conditions and the following
|
|
|
|
// disclaimer in the documentation and/or other materials provided
|
|
|
|
// with the distribution.
|
|
|
|
// * Neither the name of Google Inc. nor the names of its
|
|
|
|
// contributors may be used to endorse or promote products derived
|
|
|
|
// from this software without specific prior written permission.
|
|
|
|
//
|
|
|
|
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
|
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
|
|
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
|
|
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
|
|
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
|
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
|
|
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
|
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
|
|
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
|
|
|
|
#ifndef V8_PROPERTY_H_
|
|
|
|
#define V8_PROPERTY_H_
|
|
|
|
|
2011-05-06 06:50:20 +00:00
|
|
|
#include "allocation.h"
|
2012-07-05 13:54:20 +00:00
|
|
|
#include "transitions.h"
|
2011-05-06 06:50:20 +00:00
|
|
|
|
2009-05-25 10:05:56 +00:00
|
|
|
namespace v8 {
|
|
|
|
namespace internal {
|
2008-07-03 15:10:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
// Abstraction for elements in instance-descriptor arrays.
|
|
|
|
//
|
|
|
|
// Each descriptor has a key, property attributes, property type,
|
|
|
|
// property index (in the actual instance-descriptor array) and
|
|
|
|
// optionally a piece of data.
|
|
|
|
//
|
|
|
|
|
|
|
|
class Descriptor BASE_EMBEDDED {
|
|
|
|
public:
|
|
|
|
static int IndexFromValue(Object* value) {
|
|
|
|
return Smi::cast(value)->value();
|
|
|
|
}
|
|
|
|
|
2010-10-25 15:22:03 +00:00
|
|
|
MUST_USE_RESULT MaybeObject* KeyToSymbol() {
|
2008-11-03 10:16:05 +00:00
|
|
|
if (!StringShape(key_).IsSymbol()) {
|
2012-03-06 09:19:25 +00:00
|
|
|
MaybeObject* maybe_result = HEAP->LookupSymbol(key_);
|
|
|
|
if (!maybe_result->To(&key_)) return maybe_result;
|
2008-07-03 15:10:15 +00:00
|
|
|
}
|
|
|
|
return key_;
|
|
|
|
}
|
|
|
|
|
|
|
|
String* GetKey() { return key_; }
|
|
|
|
Object* GetValue() { return value_; }
|
|
|
|
PropertyDetails GetDetails() { return details_; }
|
|
|
|
|
2010-12-20 10:38:19 +00:00
|
|
|
#ifdef OBJECT_PRINT
|
|
|
|
void Print(FILE* out);
|
2008-07-03 15:10:15 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
void SetEnumerationIndex(int index) {
|
|
|
|
ASSERT(PropertyDetails::IsValidIndex(index));
|
|
|
|
details_ = PropertyDetails(details_.attributes(), details_.type(), index);
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
String* key_;
|
|
|
|
Object* value_;
|
|
|
|
PropertyDetails details_;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
Descriptor() : details_(Smi::FromInt(0)) {}
|
|
|
|
|
|
|
|
void Init(String* key, Object* value, PropertyDetails details) {
|
|
|
|
key_ = key;
|
|
|
|
value_ = value;
|
|
|
|
details_ = details;
|
|
|
|
}
|
|
|
|
|
|
|
|
Descriptor(String* key, Object* value, PropertyDetails details)
|
|
|
|
: key_(key),
|
|
|
|
value_(value),
|
|
|
|
details_(details) { }
|
|
|
|
|
|
|
|
Descriptor(String* key,
|
|
|
|
Object* value,
|
|
|
|
PropertyAttributes attributes,
|
|
|
|
PropertyType type,
|
2012-07-11 14:26:42 +00:00
|
|
|
int index)
|
2008-07-03 15:10:15 +00:00
|
|
|
: key_(key),
|
|
|
|
value_(value),
|
|
|
|
details_(attributes, type, index) { }
|
|
|
|
|
|
|
|
friend class DescriptorArray;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class FieldDescriptor: public Descriptor {
|
|
|
|
public:
|
|
|
|
FieldDescriptor(String* key,
|
|
|
|
int field_index,
|
|
|
|
PropertyAttributes attributes,
|
2012-07-12 15:14:54 +00:00
|
|
|
int index = 0)
|
2008-07-03 15:10:15 +00:00
|
|
|
: Descriptor(key, Smi::FromInt(field_index), attributes, FIELD, index) {}
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class ConstantFunctionDescriptor: public Descriptor {
|
|
|
|
public:
|
|
|
|
ConstantFunctionDescriptor(String* key,
|
|
|
|
JSFunction* function,
|
|
|
|
PropertyAttributes attributes,
|
2012-07-11 14:26:42 +00:00
|
|
|
int index)
|
2008-07-03 15:10:15 +00:00
|
|
|
: Descriptor(key, function, attributes, CONSTANT_FUNCTION, index) {}
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class CallbacksDescriptor: public Descriptor {
|
|
|
|
public:
|
|
|
|
CallbacksDescriptor(String* key,
|
2011-05-19 11:47:34 +00:00
|
|
|
Object* foreign,
|
2008-07-03 15:10:15 +00:00
|
|
|
PropertyAttributes attributes,
|
2012-07-12 15:14:54 +00:00
|
|
|
int index = 0)
|
2011-05-19 11:47:34 +00:00
|
|
|
: Descriptor(key, foreign, attributes, CALLBACKS, index) {}
|
2008-07-03 15:10:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
class LookupResult BASE_EMBEDDED {
|
|
|
|
public:
|
2011-10-18 11:18:55 +00:00
|
|
|
explicit LookupResult(Isolate* isolate)
|
|
|
|
: isolate_(isolate),
|
|
|
|
next_(isolate->top_lookup_result()),
|
|
|
|
lookup_type_(NOT_FOUND),
|
|
|
|
holder_(NULL),
|
2008-07-03 15:10:15 +00:00
|
|
|
cacheable_(true),
|
2012-06-25 13:10:54 +00:00
|
|
|
details_(NONE, NONEXISTENT) {
|
2011-10-18 11:18:55 +00:00
|
|
|
isolate->SetTopLookupResult(this);
|
|
|
|
}
|
|
|
|
|
|
|
|
~LookupResult() {
|
|
|
|
ASSERT(isolate_->top_lookup_result() == this);
|
|
|
|
isolate_->SetTopLookupResult(next_);
|
|
|
|
}
|
2008-07-03 15:10:15 +00:00
|
|
|
|
|
|
|
void DescriptorResult(JSObject* holder, PropertyDetails details, int number) {
|
|
|
|
lookup_type_ = DESCRIPTOR_TYPE;
|
|
|
|
holder_ = holder;
|
|
|
|
details_ = details;
|
|
|
|
number_ = number;
|
|
|
|
}
|
|
|
|
|
2012-07-05 13:54:20 +00:00
|
|
|
void TransitionResult(JSObject* holder, int number) {
|
|
|
|
lookup_type_ = TRANSITION_TYPE;
|
|
|
|
details_ = PropertyDetails(NONE, TRANSITION);
|
|
|
|
holder_ = holder;
|
|
|
|
number_ = number;
|
|
|
|
}
|
|
|
|
|
2008-07-03 15:10:15 +00:00
|
|
|
void ConstantResult(JSObject* holder) {
|
|
|
|
lookup_type_ = CONSTANT_TYPE;
|
|
|
|
holder_ = holder;
|
|
|
|
details_ =
|
|
|
|
PropertyDetails(static_cast<PropertyAttributes>(DONT_ENUM |
|
|
|
|
DONT_DELETE),
|
|
|
|
CALLBACKS);
|
|
|
|
number_ = -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
void DictionaryResult(JSObject* holder, int entry) {
|
|
|
|
lookup_type_ = DICTIONARY_TYPE;
|
|
|
|
holder_ = holder;
|
|
|
|
details_ = holder->property_dictionary()->DetailsAt(entry);
|
|
|
|
number_ = entry;
|
|
|
|
}
|
|
|
|
|
2011-09-16 13:38:30 +00:00
|
|
|
void HandlerResult(JSProxy* proxy) {
|
2011-05-16 16:33:58 +00:00
|
|
|
lookup_type_ = HANDLER_TYPE;
|
2011-09-16 13:38:30 +00:00
|
|
|
holder_ = proxy;
|
2011-05-16 16:33:58 +00:00
|
|
|
details_ = PropertyDetails(NONE, HANDLER);
|
2011-07-13 11:57:15 +00:00
|
|
|
cacheable_ = false;
|
2011-05-16 16:33:58 +00:00
|
|
|
}
|
|
|
|
|
2008-07-03 15:10:15 +00:00
|
|
|
void InterceptorResult(JSObject* holder) {
|
|
|
|
lookup_type_ = INTERCEPTOR_TYPE;
|
|
|
|
holder_ = holder;
|
|
|
|
details_ = PropertyDetails(NONE, INTERCEPTOR);
|
|
|
|
}
|
|
|
|
|
|
|
|
void NotFound() {
|
|
|
|
lookup_type_ = NOT_FOUND;
|
2012-06-25 13:10:54 +00:00
|
|
|
details_ = PropertyDetails(NONE, NONEXISTENT);
|
2011-10-18 11:18:55 +00:00
|
|
|
holder_ = NULL;
|
2008-07-03 15:10:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
JSObject* holder() {
|
2010-02-18 15:10:35 +00:00
|
|
|
ASSERT(IsFound());
|
2011-09-16 13:38:30 +00:00
|
|
|
return JSObject::cast(holder_);
|
|
|
|
}
|
|
|
|
|
|
|
|
JSProxy* proxy() {
|
|
|
|
ASSERT(IsFound());
|
|
|
|
return JSProxy::cast(holder_);
|
2008-07-03 15:10:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
PropertyType type() {
|
2010-02-18 15:10:35 +00:00
|
|
|
ASSERT(IsFound());
|
2008-07-03 15:10:15 +00:00
|
|
|
return details_.type();
|
|
|
|
}
|
|
|
|
|
|
|
|
PropertyAttributes GetAttributes() {
|
2012-07-05 13:54:20 +00:00
|
|
|
ASSERT(!IsTransition());
|
2010-02-18 15:10:35 +00:00
|
|
|
ASSERT(IsFound());
|
2012-07-05 13:54:20 +00:00
|
|
|
ASSERT(details_.type() != NONEXISTENT);
|
2008-07-03 15:10:15 +00:00
|
|
|
return details_.attributes();
|
|
|
|
}
|
|
|
|
|
|
|
|
PropertyDetails GetPropertyDetails() {
|
2012-07-05 13:54:20 +00:00
|
|
|
ASSERT(!IsTransition());
|
2008-07-03 15:10:15 +00:00
|
|
|
return details_;
|
|
|
|
}
|
|
|
|
|
2012-06-21 15:32:52 +00:00
|
|
|
bool IsFastPropertyType() {
|
|
|
|
ASSERT(IsFound());
|
2012-07-05 13:54:20 +00:00
|
|
|
return IsTransition() || type() != NORMAL;
|
2012-06-21 15:32:52 +00:00
|
|
|
}
|
|
|
|
|
2012-07-05 13:54:20 +00:00
|
|
|
// Property callbacks does not include transitions to callbacks.
|
|
|
|
bool IsPropertyCallbacks() {
|
|
|
|
ASSERT(!(details_.type() == CALLBACKS && !IsFound()));
|
|
|
|
return details_.type() == CALLBACKS;
|
2012-06-21 15:32:52 +00:00
|
|
|
}
|
|
|
|
|
2012-07-05 13:54:20 +00:00
|
|
|
bool IsReadOnly() {
|
|
|
|
ASSERT(IsFound());
|
|
|
|
ASSERT(!IsTransition());
|
|
|
|
ASSERT(details_.type() != NONEXISTENT);
|
|
|
|
return details_.IsReadOnly();
|
2012-06-21 15:32:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool IsField() {
|
|
|
|
ASSERT(!(details_.type() == FIELD && !IsFound()));
|
|
|
|
return details_.type() == FIELD;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool IsNormal() {
|
|
|
|
ASSERT(!(details_.type() == NORMAL && !IsFound()));
|
|
|
|
return details_.type() == NORMAL;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool IsConstantFunction() {
|
|
|
|
ASSERT(!(details_.type() == CONSTANT_FUNCTION && !IsFound()));
|
|
|
|
return details_.type() == CONSTANT_FUNCTION;
|
|
|
|
}
|
|
|
|
|
2008-07-03 15:10:15 +00:00
|
|
|
bool IsDontDelete() { return details_.IsDontDelete(); }
|
|
|
|
bool IsDontEnum() { return details_.IsDontEnum(); }
|
2009-06-30 10:05:36 +00:00
|
|
|
bool IsDeleted() { return details_.IsDeleted(); }
|
2010-02-18 15:10:35 +00:00
|
|
|
bool IsFound() { return lookup_type_ != NOT_FOUND; }
|
2012-07-05 13:54:20 +00:00
|
|
|
bool IsTransition() { return lookup_type_ == TRANSITION_TYPE; }
|
2011-05-16 16:33:58 +00:00
|
|
|
bool IsHandler() { return lookup_type_ == HANDLER_TYPE; }
|
2012-06-21 15:32:52 +00:00
|
|
|
bool IsInterceptor() { return lookup_type_ == INTERCEPTOR_TYPE; }
|
2008-07-03 15:10:15 +00:00
|
|
|
|
2012-03-02 14:03:59 +00:00
|
|
|
// Is the result is a property excluding transitions and the null descriptor?
|
2008-07-03 15:10:15 +00:00
|
|
|
bool IsProperty() {
|
2012-07-05 13:54:20 +00:00
|
|
|
return IsFound() && !IsTransition();
|
2010-02-18 15:10:35 +00:00
|
|
|
}
|
|
|
|
|
2008-07-03 15:10:15 +00:00
|
|
|
bool IsCacheable() { return cacheable_; }
|
|
|
|
void DisallowCaching() { cacheable_ = false; }
|
|
|
|
|
2009-04-24 08:13:09 +00:00
|
|
|
Object* GetLazyValue() {
|
|
|
|
switch (type()) {
|
|
|
|
case FIELD:
|
|
|
|
return holder()->FastPropertyAt(GetFieldIndex());
|
2009-06-30 10:05:36 +00:00
|
|
|
case NORMAL: {
|
|
|
|
Object* value;
|
|
|
|
value = holder()->property_dictionary()->ValueAt(GetDictionaryEntry());
|
2009-07-01 11:44:37 +00:00
|
|
|
if (holder()->IsGlobalObject()) {
|
2009-06-30 10:05:36 +00:00
|
|
|
value = JSGlobalPropertyCell::cast(value)->value();
|
|
|
|
}
|
|
|
|
return value;
|
|
|
|
}
|
2009-04-24 08:13:09 +00:00
|
|
|
case CONSTANT_FUNCTION:
|
|
|
|
return GetConstantFunction();
|
|
|
|
default:
|
|
|
|
return Smi::FromInt(0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-07-16 14:02:50 +00:00
|
|
|
Map* GetTransitionTarget() {
|
2012-07-05 13:54:20 +00:00
|
|
|
ASSERT(IsTransition());
|
|
|
|
TransitionArray* transitions = holder()->map()->transitions();
|
2012-07-16 14:02:50 +00:00
|
|
|
return transitions->GetTarget(number_);
|
2012-07-05 13:54:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
PropertyDetails GetTransitionDetails(Map* map) {
|
|
|
|
ASSERT(IsTransition());
|
|
|
|
TransitionArray* transitions = map->transitions();
|
|
|
|
return transitions->GetTargetDetails(number_);
|
|
|
|
}
|
|
|
|
|
|
|
|
PropertyDetails GetTransitionDetails() {
|
|
|
|
return GetTransitionDetails(holder()->map());
|
|
|
|
}
|
|
|
|
|
|
|
|
bool IsTransitionToField(Map* map) {
|
|
|
|
return IsTransition() && GetTransitionDetails(map).type() == FIELD;
|
|
|
|
}
|
|
|
|
|
2008-07-03 15:10:15 +00:00
|
|
|
Map* GetTransitionMap() {
|
2012-07-05 13:54:20 +00:00
|
|
|
ASSERT(IsTransition());
|
2008-07-03 15:10:15 +00:00
|
|
|
return Map::cast(GetValue());
|
|
|
|
}
|
|
|
|
|
2010-12-07 11:31:57 +00:00
|
|
|
Map* GetTransitionMapFromMap(Map* map) {
|
2012-07-05 13:54:20 +00:00
|
|
|
ASSERT(IsTransition());
|
2012-07-16 14:02:50 +00:00
|
|
|
return map->transitions()->GetTarget(number_);
|
2010-12-07 11:31:57 +00:00
|
|
|
}
|
|
|
|
|
2012-07-12 16:36:10 +00:00
|
|
|
int GetTransitionIndex() {
|
|
|
|
ASSERT(IsTransition());
|
|
|
|
return number_;
|
|
|
|
}
|
|
|
|
|
2008-07-03 15:10:15 +00:00
|
|
|
int GetFieldIndex() {
|
|
|
|
ASSERT(lookup_type_ == DESCRIPTOR_TYPE);
|
2012-06-21 15:32:52 +00:00
|
|
|
ASSERT(IsField());
|
2008-07-03 15:10:15 +00:00
|
|
|
return Descriptor::IndexFromValue(GetValue());
|
|
|
|
}
|
|
|
|
|
2010-12-07 11:31:57 +00:00
|
|
|
int GetLocalFieldIndexFromMap(Map* map) {
|
2012-06-21 15:32:52 +00:00
|
|
|
ASSERT(IsField());
|
2012-07-06 08:11:10 +00:00
|
|
|
return Descriptor::IndexFromValue(GetValueFromMap(map)) -
|
2010-12-07 11:31:57 +00:00
|
|
|
map->inobject_properties();
|
|
|
|
}
|
|
|
|
|
2008-07-03 15:10:15 +00:00
|
|
|
int GetDictionaryEntry() {
|
|
|
|
ASSERT(lookup_type_ == DICTIONARY_TYPE);
|
|
|
|
return number_;
|
|
|
|
}
|
|
|
|
|
|
|
|
JSFunction* GetConstantFunction() {
|
|
|
|
ASSERT(type() == CONSTANT_FUNCTION);
|
|
|
|
return JSFunction::cast(GetValue());
|
|
|
|
}
|
|
|
|
|
2010-12-07 11:31:57 +00:00
|
|
|
JSFunction* GetConstantFunctionFromMap(Map* map) {
|
|
|
|
ASSERT(type() == CONSTANT_FUNCTION);
|
2012-07-06 08:11:10 +00:00
|
|
|
return JSFunction::cast(GetValueFromMap(map));
|
2010-12-07 11:31:57 +00:00
|
|
|
}
|
|
|
|
|
2008-07-03 15:10:15 +00:00
|
|
|
Object* GetCallbackObject() {
|
2012-07-16 14:02:50 +00:00
|
|
|
if (lookup_type_ == CONSTANT_TYPE) {
|
|
|
|
return HEAP->prototype_accessors();
|
2008-07-03 15:10:15 +00:00
|
|
|
}
|
2012-07-16 14:02:50 +00:00
|
|
|
ASSERT(!IsTransition());
|
|
|
|
return GetValue();
|
2008-07-03 15:10:15 +00:00
|
|
|
}
|
|
|
|
|
2010-12-20 10:38:19 +00:00
|
|
|
#ifdef OBJECT_PRINT
|
|
|
|
void Print(FILE* out);
|
2008-07-03 15:10:15 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
Object* GetValue() {
|
|
|
|
if (lookup_type_ == DESCRIPTOR_TYPE) {
|
2012-07-06 08:11:10 +00:00
|
|
|
return GetValueFromMap(holder()->map());
|
2008-07-03 15:10:15 +00:00
|
|
|
}
|
|
|
|
// In the dictionary case, the data is held in the value field.
|
|
|
|
ASSERT(lookup_type_ == DICTIONARY_TYPE);
|
2009-06-30 10:05:36 +00:00
|
|
|
return holder()->GetNormalizedProperty(this);
|
2008-07-03 15:10:15 +00:00
|
|
|
}
|
|
|
|
|
2012-07-06 08:11:10 +00:00
|
|
|
Object* GetValueFromMap(Map* map) const {
|
|
|
|
ASSERT(lookup_type_ == DESCRIPTOR_TYPE);
|
|
|
|
return map->instance_descriptors()->GetValue(number_);
|
|
|
|
}
|
|
|
|
|
2011-10-18 11:18:55 +00:00
|
|
|
void Iterate(ObjectVisitor* visitor);
|
|
|
|
|
2008-07-03 15:10:15 +00:00
|
|
|
private:
|
2011-10-18 11:18:55 +00:00
|
|
|
Isolate* isolate_;
|
|
|
|
LookupResult* next_;
|
|
|
|
|
2011-05-16 16:33:58 +00:00
|
|
|
// Where did we find the result;
|
|
|
|
enum {
|
|
|
|
NOT_FOUND,
|
|
|
|
DESCRIPTOR_TYPE,
|
2012-07-05 13:54:20 +00:00
|
|
|
TRANSITION_TYPE,
|
2011-05-16 16:33:58 +00:00
|
|
|
DICTIONARY_TYPE,
|
|
|
|
HANDLER_TYPE,
|
|
|
|
INTERCEPTOR_TYPE,
|
|
|
|
CONSTANT_TYPE
|
|
|
|
} lookup_type_;
|
|
|
|
|
2011-09-16 13:38:30 +00:00
|
|
|
JSReceiver* holder_;
|
2008-07-03 15:10:15 +00:00
|
|
|
int number_;
|
|
|
|
bool cacheable_;
|
|
|
|
PropertyDetails details_;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
} } // namespace v8::internal
|
|
|
|
|
|
|
|
#endif // V8_PROPERTY_H_
|