Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(183)

Unified Diff: src/elements.cc

Issue 1180753005: Cleanup typed array setters, the property is guaranteed to be there. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/elements.h ('k') | src/lookup.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/elements.cc
diff --git a/src/elements.cc b/src/elements.cc
index 128ba95580b30aa5e15638c5aba40e2298bd8416..20d4264deff660e667670759ccc64a1879476918 100644
--- a/src/elements.cc
+++ b/src/elements.cc
@@ -613,18 +613,14 @@ class ElementsAccessorBase : public ElementsAccessor {
}
}
- virtual void Set(Handle<JSObject> holder, uint32_t key,
- Handle<FixedArrayBase> backing_store,
+ virtual void Set(Handle<FixedArrayBase> backing_store, uint32_t key,
Handle<Object> value) final {
- ElementsAccessorSubclass::SetImpl(holder, key, backing_store, value);
+ ElementsAccessorSubclass::SetImpl(backing_store, key, value);
}
- static void SetImpl(Handle<JSObject> obj, uint32_t key,
- Handle<FixedArrayBase> backing_store,
+ static void SetImpl(Handle<FixedArrayBase> backing_store, uint32_t key,
Handle<Object> value) {
- CHECK(key <
- ElementsAccessorSubclass::GetCapacityImpl(*obj, *backing_store));
- BackingStore::SetValue(obj, Handle<BackingStore>::cast(backing_store), key,
+ BackingStore::SetValue(Handle<BackingStore>::cast(backing_store), key,
value);
}
@@ -1447,8 +1443,8 @@ class DictionaryElementsAccessor
return isolate->factory()->the_hole_value();
}
- static void SetImpl(Handle<JSObject> obj, uint32_t key,
- Handle<FixedArrayBase> store, Handle<Object> value) {
+ static void SetImpl(Handle<FixedArrayBase> store, uint32_t key,
+ Handle<Object> value) {
Handle<SeededNumberDictionary> backing_store =
Handle<SeededNumberDictionary>::cast(store);
int entry = backing_store->FindEntry(key);
@@ -1544,8 +1540,8 @@ class SloppyArgumentsElementsAccessor : public ElementsAccessorBase<
}
}
- static void SetImpl(Handle<JSObject> obj, uint32_t key,
- Handle<FixedArrayBase> store, Handle<Object> value) {
+ static void SetImpl(Handle<FixedArrayBase> store, uint32_t key,
+ Handle<Object> value) {
Handle<FixedArray> parameter_map = Handle<FixedArray>::cast(store);
Object* probe = GetParameterMapArg(*parameter_map, key);
if (!probe->IsTheHole()) {
@@ -1555,7 +1551,7 @@ class SloppyArgumentsElementsAccessor : public ElementsAccessorBase<
context->set(context_index, *value);
} else {
Handle<FixedArray> arguments(FixedArray::cast(parameter_map->get(1)));
- ElementsAccessor::ForArray(arguments)->Set(obj, key, arguments, value);
+ ElementsAccessor::ForArray(arguments)->Set(arguments, key, value);
}
}
« no previous file with comments | « src/elements.h ('k') | src/lookup.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698