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

Side by Side Diff: src/objects-inl.h

Issue 1492653004: [cleanup] Introduce PropertyFilter (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: windows ♥ Created 5 years 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 unified diff | Download patch
« no previous file with comments | « src/objects.cc ('k') | src/property-details.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // Review notes: 5 // Review notes:
6 // 6 //
7 // - The use of macros in these inline functions may seem superfluous 7 // - The use of macros in these inline functions may seem superfluous
8 // but it is absolutely needed to make sure gcc generates optimal 8 // but it is absolutely needed to make sure gcc generates optimal
9 // code. gcc is not happy when attempting to inline too deep. 9 // code. gcc is not happy when attempting to inline too deep.
10 // 10 //
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 if (first->IsNumber()) { 273 if (first->IsNumber()) {
274 DCHECK_LE(0, first->Number()); 274 DCHECK_LE(0, first->Number());
275 uint32_t expected = static_cast<uint32_t>(first->Number()); 275 uint32_t expected = static_cast<uint32_t>(first->Number());
276 uint32_t index; 276 uint32_t index;
277 return Name::cast(second)->AsArrayIndex(&index) && index == expected; 277 return Name::cast(second)->AsArrayIndex(&index) && index == expected;
278 } 278 }
279 return Name::cast(first)->Equals(Name::cast(second)); 279 return Name::cast(first)->Equals(Name::cast(second));
280 } 280 }
281 281
282 282
283 bool Object::FilterKey(PropertyAttributes filter) { 283 bool Object::FilterKey(PropertyFilter filter) {
284 if ((filter & SYMBOLIC) && IsSymbol()) { 284 if (IsSymbol()) {
285 return true; 285 if (filter & SKIP_SYMBOLS) return true;
286 if (Symbol::cast(this)->is_private()) return true;
286 } 287 }
287 288 if ((filter & SKIP_STRINGS) && !IsSymbol()) return true;
288 if ((filter & PRIVATE_SYMBOL) && IsSymbol() &&
289 Symbol::cast(this)->is_private()) {
290 return true;
291 }
292
293 if ((filter & STRING) && !IsSymbol()) {
294 return true;
295 }
296 289
297 return false; 290 return false;
298 } 291 }
299 292
300 293
301 Handle<Object> Object::NewStorageFor(Isolate* isolate, 294 Handle<Object> Object::NewStorageFor(Isolate* isolate,
302 Handle<Object> object, 295 Handle<Object> object,
303 Representation representation) { 296 Representation representation) {
304 if (representation.IsSmi() && object->IsUninitialized()) { 297 if (representation.IsSmi() && object->IsUninitialized()) {
305 return handle(Smi::FromInt(0), isolate); 298 return handle(Smi::FromInt(0), isolate);
(...skipping 7550 matching lines...) Expand 10 before | Expand all | Expand 10 after
7856 #undef WRITE_INT64_FIELD 7849 #undef WRITE_INT64_FIELD
7857 #undef READ_BYTE_FIELD 7850 #undef READ_BYTE_FIELD
7858 #undef WRITE_BYTE_FIELD 7851 #undef WRITE_BYTE_FIELD
7859 #undef NOBARRIER_READ_BYTE_FIELD 7852 #undef NOBARRIER_READ_BYTE_FIELD
7860 #undef NOBARRIER_WRITE_BYTE_FIELD 7853 #undef NOBARRIER_WRITE_BYTE_FIELD
7861 7854
7862 } // namespace internal 7855 } // namespace internal
7863 } // namespace v8 7856 } // namespace v8
7864 7857
7865 #endif // V8_OBJECTS_INL_H_ 7858 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/property-details.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698