| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 2384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2395 static const uint32_t kMaxGap = 1024; | 2395 static const uint32_t kMaxGap = 1024; |
| 2396 | 2396 |
| 2397 // Maximal length of fast elements array that won't be checked for | 2397 // Maximal length of fast elements array that won't be checked for |
| 2398 // being dense enough on expansion. | 2398 // being dense enough on expansion. |
| 2399 static const int kMaxUncheckedFastElementsLength = 5000; | 2399 static const int kMaxUncheckedFastElementsLength = 5000; |
| 2400 | 2400 |
| 2401 // Same as above but for old arrays. This limit is more strict. We | 2401 // Same as above but for old arrays. This limit is more strict. We |
| 2402 // don't want to be wasteful with long lived objects. | 2402 // don't want to be wasteful with long lived objects. |
| 2403 static const int kMaxUncheckedOldFastElementsLength = 500; | 2403 static const int kMaxUncheckedOldFastElementsLength = 500; |
| 2404 | 2404 |
| 2405 static const int kInitialMaxFastElementArray = 100000; | 2405 // TODO(2790): HAllocate currently always allocates fast backing stores |
| 2406 // in new space, where on x64 we can only fit ~98K elements. Keep this |
| 2407 // limit lower than that until HAllocate is made smarter. |
| 2408 static const int kInitialMaxFastElementArray = 95000; |
| 2409 |
| 2406 static const int kFastPropertiesSoftLimit = 12; | 2410 static const int kFastPropertiesSoftLimit = 12; |
| 2407 static const int kMaxFastProperties = 64; | 2411 static const int kMaxFastProperties = 64; |
| 2408 static const int kMaxInstanceSize = 255 * kPointerSize; | 2412 static const int kMaxInstanceSize = 255 * kPointerSize; |
| 2409 // When extending the backing storage for property values, we increase | 2413 // When extending the backing storage for property values, we increase |
| 2410 // its size by more than the 1 entry necessary, so sequentially adding fields | 2414 // its size by more than the 1 entry necessary, so sequentially adding fields |
| 2411 // to the same object requires fewer allocations and copies. | 2415 // to the same object requires fewer allocations and copies. |
| 2412 static const int kFieldsAdded = 3; | 2416 static const int kFieldsAdded = 3; |
| 2413 | 2417 |
| 2414 // Layout description. | 2418 // Layout description. |
| 2415 static const int kPropertiesOffset = HeapObject::kHeaderSize; | 2419 static const int kPropertiesOffset = HeapObject::kHeaderSize; |
| (...skipping 7284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9700 } else { | 9704 } else { |
| 9701 value &= ~(1 << bit_position); | 9705 value &= ~(1 << bit_position); |
| 9702 } | 9706 } |
| 9703 return value; | 9707 return value; |
| 9704 } | 9708 } |
| 9705 }; | 9709 }; |
| 9706 | 9710 |
| 9707 } } // namespace v8::internal | 9711 } } // namespace v8::internal |
| 9708 | 9712 |
| 9709 #endif // V8_OBJECTS_H_ | 9713 #endif // V8_OBJECTS_H_ |
| OLD | NEW |