Commit e7d64b3f authored by verwaest's avatar verwaest Committed by Commit bot

Remove obsolete GetAccessorPair from ElementsAccessor

BUG=v8:4137
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#29467}
parent 4621210c
......@@ -650,19 +650,6 @@ class ElementsAccessorBase : public ElementsAccessor {
UNREACHABLE();
}
virtual MaybeHandle<AccessorPair> GetAccessorPair(
Handle<JSObject> holder, uint32_t key,
Handle<FixedArrayBase> backing_store) final {
return ElementsAccessorSubclass::GetAccessorPairImpl(holder, key,
backing_store);
}
static MaybeHandle<AccessorPair> GetAccessorPairImpl(
Handle<JSObject> obj, uint32_t key,
Handle<FixedArrayBase> backing_store) {
return MaybeHandle<AccessorPair>();
}
virtual void SetLength(Handle<JSArray> array, uint32_t length) final {
ElementsAccessorSubclass::SetLengthImpl(array, length,
handle(array->elements()));
......@@ -1070,19 +1057,6 @@ class DictionaryElementsAccessor
object->set_elements(*new_dictionary);
}
static MaybeHandle<AccessorPair> GetAccessorPairImpl(
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 &&
backing_store->DetailsAt(entry).type() == ACCESSOR_CONSTANT &&
backing_store->ValueAt(entry)->IsAccessorPair()) {
return handle(AccessorPair::cast(backing_store->ValueAt(entry)));
}
return MaybeHandle<AccessorPair>();
}
static bool HasIndexImpl(FixedArrayBase* store, uint32_t index) {
DisallowHeapAllocation no_gc;
SeededNumberDictionary* dict = SeededNumberDictionary::cast(store);
......@@ -1572,20 +1546,6 @@ class SloppyArgumentsElementsAccessor
}
}
static MaybeHandle<AccessorPair> GetAccessorPairImpl(
Handle<JSObject> obj, uint32_t key, Handle<FixedArrayBase> parameters) {
Handle<FixedArray> parameter_map = Handle<FixedArray>::cast(parameters);
Handle<Object> probe(GetParameterMapArg(*parameter_map, key),
obj->GetIsolate());
if (!probe->IsTheHole()) {
return MaybeHandle<AccessorPair>();
} else {
// If not aliased, check the arguments.
Handle<FixedArray> arguments(FixedArray::cast(parameter_map->get(1)));
return ArgumentsAccessor::GetAccessorPairImpl(obj, key, arguments);
}
}
static void SetLengthImpl(Handle<JSArray> array, uint32_t length,
Handle<FixedArrayBase> parameter_map) {
// Sloppy arguments objects are not arrays.
......
......@@ -54,20 +54,6 @@ class ElementsAccessor {
return Get(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
// be compatible with the ElementsKind of the ElementsAccessor. If
// backing_store is NULL, the holder->elements() is used as the backing store.
virtual MaybeHandle<AccessorPair> GetAccessorPair(
Handle<JSObject> holder, uint32_t key,
Handle<FixedArrayBase> backing_store) = 0;
inline MaybeHandle<AccessorPair> GetAccessorPair(Handle<JSObject> holder,
uint32_t key) {
return GetAccessorPair(holder, key, handle(holder->elements()));
}
// Modifies the length data property as specified for JSArrays and resizes the
// underlying backing store accordingly. The method honors the semantics of
// changing array sizes as defined in EcmaScript 5.1 15.4.5.2, i.e. array that
......
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