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

Unified Diff: src/objects-inl.h

Issue 1847183004: [elements] Avoid using IsKey in loops (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: addressing comments Created 4 years, 9 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') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 25400f63b0d4665adab313ed7a50b6b62de8e440..0167f63408caaba7311799cbbe11b0ad7947feae 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -2998,6 +2998,9 @@ int HashTableBase::ComputeCapacity(int at_least_space_for) {
return Max(capacity, kMinCapacity);
}
+bool HashTableBase::IsKey(Heap* heap, Object* k) {
+ return k != heap->the_hole_value() && k != heap->undefined_value();
+}
bool HashTableBase::IsKey(Object* k) {
return !k->IsTheHole() && !k->IsUndefined();
« no previous file with comments | « src/objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698