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

Unified Diff: src/objects-inl.h

Issue 1397063002: [runtime] Fancify KeyAccumulator (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: nits Created 5 years, 2 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.cc ('k') | src/runtime/runtime-array.cc » ('j') | 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 61247426495e9666410fb8fd2c4ba79131a8500b..5fe65802c63e6c278ff009108ec917c27ea11a47 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -286,6 +286,24 @@ bool Object::KeyEquals(Object* second) {
}
+bool Object::FilterKey(PropertyAttributes filter) {
+ if ((filter & SYMBOLIC) && IsSymbol()) {
+ return true;
+ }
+
+ if ((filter & PRIVATE_SYMBOL) && IsSymbol() &&
+ Symbol::cast(this)->is_private()) {
+ return true;
+ }
+
+ if ((filter & STRING) && !IsSymbol()) {
+ return true;
+ }
+
+ return false;
+}
+
+
Handle<Object> Object::NewStorageFor(Isolate* isolate,
Handle<Object> object,
Representation representation) {
« no previous file with comments | « src/objects.cc ('k') | src/runtime/runtime-array.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698