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

Unified Diff: src/elements.cc

Issue 1865343002: [elements] revert overzealous optimzation for fast sloppy arguments delete (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: addressing comment Created 4 years, 8 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 | « no previous file | test/mjsunit/arguments.js » ('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 9ab70bbfaf692e6aa572320cd37515ba91c886e6..33c4d129610582c85311e4b081dc634dac807507 100644
--- a/src/elements.cc
+++ b/src/elements.cc
@@ -1436,7 +1436,9 @@ class FastElementsAccessor : public ElementsAccessorBase<Subclass, KindTraits> {
}
if (entry == 0) {
FixedArray* empty = heap->empty_fixed_array();
- if (Subclass::kind() == FAST_SLOPPY_ARGUMENTS_ELEMENTS) {
+ // Dynamically ask for the elements kind here since we manually redirect
+ // the operations for argument backing stores.
+ if (obj->GetElementsKind() == FAST_SLOPPY_ARGUMENTS_ELEMENTS) {
FixedArray::cast(obj->elements())->set(1, empty);
} else {
obj->set_elements(empty);
@@ -2343,7 +2345,7 @@ class SloppyArgumentsElementsAccessor
FixedArray* arguments = FixedArray::cast(parameter_map->get(1));
uint32_t entry = ArgumentsAccessor::GetEntryForIndexImpl(holder, arguments,
index, filter);
- if (entry == kMaxUInt32) return entry;
+ if (entry == kMaxUInt32) return kMaxUInt32;
return (parameter_map->length() - 2) + entry;
}
« no previous file with comments | « no previous file | test/mjsunit/arguments.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698