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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « src/objects.cc ('k') | src/runtime/runtime-array.cc » ('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 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 if (first->IsNumber()) { 279 if (first->IsNumber()) {
280 DCHECK_LE(0, first->Number()); 280 DCHECK_LE(0, first->Number());
281 uint32_t expected = static_cast<uint32_t>(first->Number()); 281 uint32_t expected = static_cast<uint32_t>(first->Number());
282 uint32_t index; 282 uint32_t index;
283 return Name::cast(second)->AsArrayIndex(&index) && index == expected; 283 return Name::cast(second)->AsArrayIndex(&index) && index == expected;
284 } 284 }
285 return Name::cast(first)->Equals(Name::cast(second)); 285 return Name::cast(first)->Equals(Name::cast(second));
286 } 286 }
287 287
288 288
289 bool Object::FilterKey(PropertyAttributes filter) {
290 if ((filter & SYMBOLIC) && IsSymbol()) {
291 return true;
292 }
293
294 if ((filter & PRIVATE_SYMBOL) && IsSymbol() &&
295 Symbol::cast(this)->is_private()) {
296 return true;
297 }
298
299 if ((filter & STRING) && !IsSymbol()) {
300 return true;
301 }
302
303 return false;
304 }
305
306
289 Handle<Object> Object::NewStorageFor(Isolate* isolate, 307 Handle<Object> Object::NewStorageFor(Isolate* isolate,
290 Handle<Object> object, 308 Handle<Object> object,
291 Representation representation) { 309 Representation representation) {
292 if (representation.IsSmi() && object->IsUninitialized()) { 310 if (representation.IsSmi() && object->IsUninitialized()) {
293 return handle(Smi::FromInt(0), isolate); 311 return handle(Smi::FromInt(0), isolate);
294 } 312 }
295 if (!representation.IsDouble()) return object; 313 if (!representation.IsDouble()) return object;
296 double value; 314 double value;
297 if (object->IsUninitialized()) { 315 if (object->IsUninitialized()) {
298 value = 0; 316 value = 0;
(...skipping 7812 matching lines...) Expand 10 before | Expand all | Expand 10 after
8111 #undef WRITE_INT64_FIELD 8129 #undef WRITE_INT64_FIELD
8112 #undef READ_BYTE_FIELD 8130 #undef READ_BYTE_FIELD
8113 #undef WRITE_BYTE_FIELD 8131 #undef WRITE_BYTE_FIELD
8114 #undef NOBARRIER_READ_BYTE_FIELD 8132 #undef NOBARRIER_READ_BYTE_FIELD
8115 #undef NOBARRIER_WRITE_BYTE_FIELD 8133 #undef NOBARRIER_WRITE_BYTE_FIELD
8116 8134
8117 } // namespace internal 8135 } // namespace internal
8118 } // namespace v8 8136 } // namespace v8
8119 8137
8120 #endif // V8_OBJECTS_INL_H_ 8138 #endif // V8_OBJECTS_INL_H_
OLDNEW
« 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