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

Unified Diff: src/objects.cc

Issue 1995453002: [stubs] Extend HasProperty stub with dictionary-mode and double-elements objects support. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Drive-by fix: replace Load()s with LoadObjectField()s Created 4 years, 7 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/objects.h ('k') | src/objects-printer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 2d47b8f3651925247285cfe2f455be09681c2d9e..79a400d79ec3e9d26f20a3b582467703e2f9e9b7 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -11296,8 +11296,8 @@ uint32_t StringHasher::MakeArrayIndexHash(uint32_t value, int length) {
value |= length << String::ArrayIndexLengthBits::kShift;
DCHECK((value & String::kIsNotArrayIndexMask) == 0);
- DCHECK((length > String::kMaxCachedArrayIndexLength) ||
- (value & String::kContainsCachedArrayIndexMask) == 0);
+ DCHECK_EQ(length <= String::kMaxCachedArrayIndexLength,
+ (value & String::kContainsCachedArrayIndexMask) == 0);
return value;
}
@@ -15327,6 +15327,11 @@ void Dictionary<Derived, Shape, Key>::Print(std::ostream& os) { // NOLINT
}
}
}
+template <typename Derived, typename Shape, typename Key>
+void Dictionary<Derived, Shape, Key>::Print() {
+ OFStream os(stdout);
+ Print(os);
+}
#endif
@@ -16058,15 +16063,7 @@ int NameDictionaryBase<Derived, Shape>::FindEntry(Handle<Name> key) {
Object* element = this->get(index);
if (element->IsUndefined()) break; // Empty entry.
if (*key == element) return entry;
- if (!element->IsUniqueName() &&
- !element->IsTheHole() &&
- Name::cast(element)->Equals(*key)) {
- // Replace a key that is a non-internalized string by the equivalent
- // internalized string for faster further lookups.
- this->set(index, *key);
- return entry;
- }
- DCHECK(element->IsTheHole() || !Name::cast(element)->Equals(*key));
+ DCHECK(element->IsTheHole() || element->IsUniqueName());
entry = Derived::NextProbe(entry, count++, capacity);
}
return Derived::kNotFound;
« no previous file with comments | « src/objects.h ('k') | src/objects-printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698