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