| 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 2701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2712 static const uint32_t kMaxGap = 1024; | 2712 static const uint32_t kMaxGap = 1024; |
| 2713 | 2713 |
| 2714 // Maximal length of fast elements array that won't be checked for | 2714 // Maximal length of fast elements array that won't be checked for |
| 2715 // being dense enough on expansion. | 2715 // being dense enough on expansion. |
| 2716 static const int kMaxUncheckedFastElementsLength = 5000; | 2716 static const int kMaxUncheckedFastElementsLength = 5000; |
| 2717 | 2717 |
| 2718 // Same as above but for old arrays. This limit is more strict. We | 2718 // Same as above but for old arrays. This limit is more strict. We |
| 2719 // don't want to be wasteful with long lived objects. | 2719 // don't want to be wasteful with long lived objects. |
| 2720 static const int kMaxUncheckedOldFastElementsLength = 500; | 2720 static const int kMaxUncheckedOldFastElementsLength = 500; |
| 2721 | 2721 |
| 2722 static const int kInitialMaxFastElementArray = 100000; | 2722 // TODO(2790): HAllocate currently always allocates fast backing stores |
| 2723 // in new space, where on x64 we can only fit ~98K elements. Keep this |
| 2724 // limit lower than that until HAllocate is made smarter. |
| 2725 static const int kInitialMaxFastElementArray = 95000; |
| 2726 |
| 2723 static const int kFastPropertiesSoftLimit = 12; | 2727 static const int kFastPropertiesSoftLimit = 12; |
| 2724 static const int kMaxFastProperties = 64; | 2728 static const int kMaxFastProperties = 64; |
| 2725 static const int kMaxInstanceSize = 255 * kPointerSize; | 2729 static const int kMaxInstanceSize = 255 * kPointerSize; |
| 2726 // When extending the backing storage for property values, we increase | 2730 // When extending the backing storage for property values, we increase |
| 2727 // its size by more than the 1 entry necessary, so sequentially adding fields | 2731 // its size by more than the 1 entry necessary, so sequentially adding fields |
| 2728 // to the same object requires fewer allocations and copies. | 2732 // to the same object requires fewer allocations and copies. |
| 2729 static const int kFieldsAdded = 3; | 2733 static const int kFieldsAdded = 3; |
| 2730 | 2734 |
| 2731 // Layout description. | 2735 // Layout description. |
| 2732 static const int kPropertiesOffset = HeapObject::kHeaderSize; | 2736 static const int kPropertiesOffset = HeapObject::kHeaderSize; |
| (...skipping 7438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10171 } else { | 10175 } else { |
| 10172 value &= ~(1 << bit_position); | 10176 value &= ~(1 << bit_position); |
| 10173 } | 10177 } |
| 10174 return value; | 10178 return value; |
| 10175 } | 10179 } |
| 10176 }; | 10180 }; |
| 10177 | 10181 |
| 10178 } } // namespace v8::internal | 10182 } } // namespace v8::internal |
| 10179 | 10183 |
| 10180 #endif // V8_OBJECTS_H_ | 10184 #endif // V8_OBJECTS_H_ |
| OLD | NEW |