Commit 16c2c72a authored by verwaest@chromium.org's avatar verwaest@chromium.org

Delete dead GetType from elements accessors

BUG=

Review URL: https://codereview.chromium.org/489033002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23240 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent cfdfbb88
......@@ -653,28 +653,6 @@ class ElementsAccessorBase : public ElementsAccessor {
? ABSENT : NONE;
}
MUST_USE_RESULT virtual PropertyType GetType(
Handle<Object> receiver,
Handle<JSObject> holder,
uint32_t key,
Handle<FixedArrayBase> backing_store) V8_FINAL V8_OVERRIDE {
return ElementsAccessorSubclass::GetTypeImpl(
receiver, holder, key, backing_store);
}
MUST_USE_RESULT static PropertyType GetTypeImpl(
Handle<Object> receiver,
Handle<JSObject> obj,
uint32_t key,
Handle<FixedArrayBase> backing_store) {
if (key >= ElementsAccessorSubclass::GetCapacityImpl(backing_store)) {
return NONEXISTENT;
}
return
Handle<BackingStore>::cast(backing_store)->is_the_hole(key)
? NONEXISTENT : FIELD;
}
MUST_USE_RESULT virtual MaybeHandle<AccessorPair> GetAccessorPair(
Handle<Object> receiver,
Handle<JSObject> holder,
......@@ -1310,16 +1288,6 @@ class TypedElementsAccessor
? NONE : ABSENT;
}
MUST_USE_RESULT static PropertyType GetTypeImpl(
Handle<Object> receiver,
Handle<JSObject> obj,
uint32_t key,
Handle<FixedArrayBase> backing_store) {
return
key < AccessorClass::GetCapacityImpl(backing_store)
? FIELD : NONEXISTENT;
}
MUST_USE_RESULT static MaybeHandle<Object> SetLengthImpl(
Handle<JSObject> obj,
Handle<Object> length,
......@@ -1530,20 +1498,6 @@ class DictionaryElementsAccessor
return ABSENT;
}
MUST_USE_RESULT static PropertyType GetTypeImpl(
Handle<Object> receiver,
Handle<JSObject> obj,
uint32_t key,
Handle<FixedArrayBase> store) {
Handle<SeededNumberDictionary> backing_store =
Handle<SeededNumberDictionary>::cast(store);
int entry = backing_store->FindEntry(key);
if (entry != SeededNumberDictionary::kNotFound) {
return backing_store->DetailsAt(entry).type();
}
return NONEXISTENT;
}
MUST_USE_RESULT static MaybeHandle<AccessorPair> GetAccessorPairImpl(
Handle<Object> receiver,
Handle<JSObject> obj,
......@@ -1648,23 +1602,6 @@ class SloppyArgumentsElementsAccessor : public ElementsAccessorBase<
}
}
MUST_USE_RESULT static PropertyType GetTypeImpl(
Handle<Object> receiver,
Handle<JSObject> obj,
uint32_t key,
Handle<FixedArrayBase> parameters) {
Handle<FixedArray> parameter_map = Handle<FixedArray>::cast(parameters);
Handle<Object> probe = GetParameterMapArg(obj, parameter_map, key);
if (!probe->IsTheHole()) {
return FIELD;
} else {
// If not aliased, check the arguments.
Handle<FixedArray> arguments(FixedArray::cast(parameter_map->get(1)));
return ElementsAccessor::ForArray(arguments)->GetType(
receiver, obj, key, arguments);
}
}
MUST_USE_RESULT static MaybeHandle<AccessorPair> GetAccessorPairImpl(
Handle<Object> receiver,
Handle<JSObject> obj,
......
......@@ -81,24 +81,6 @@ class ElementsAccessor {
return GetAttributes(receiver, holder, key, handle(holder->elements()));
}
// Returns an element's type, or NONEXISTENT if there is no such
// element. This method doesn't iterate up the prototype chain. The caller
// can optionally pass in the backing store to use for the check, which must
// be compatible with the ElementsKind of the ElementsAccessor. If
// backing_store is NULL, the holder->elements() is used as the backing store.
MUST_USE_RESULT virtual PropertyType GetType(
Handle<Object> receiver,
Handle<JSObject> holder,
uint32_t key,
Handle<FixedArrayBase> backing_store) = 0;
MUST_USE_RESULT inline PropertyType GetType(
Handle<Object> receiver,
Handle<JSObject> holder,
uint32_t key) {
return GetType(receiver, holder, key, handle(holder->elements()));
}
// Returns an element's accessors, or NULL if the element does not exist or
// is plain. This method doesn't iterate up the prototype chain. The caller
// can optionally pass in the backing store to use for the check, which must
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment