OLD | NEW |
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 Loading... |
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 Loading... |
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_ |
OLD | NEW |