| 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 2668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2679 static const uint32_t kMaxGap = 1024; | 2679 static const uint32_t kMaxGap = 1024; |
| 2680 | 2680 |
| 2681 // Maximal length of fast elements array that won't be checked for | 2681 // Maximal length of fast elements array that won't be checked for |
| 2682 // being dense enough on expansion. | 2682 // being dense enough on expansion. |
| 2683 static const int kMaxUncheckedFastElementsLength = 5000; | 2683 static const int kMaxUncheckedFastElementsLength = 5000; |
| 2684 | 2684 |
| 2685 // Same as above but for old arrays. This limit is more strict. We | 2685 // Same as above but for old arrays. This limit is more strict. We |
| 2686 // don't want to be wasteful with long lived objects. | 2686 // don't want to be wasteful with long lived objects. |
| 2687 static const int kMaxUncheckedOldFastElementsLength = 500; | 2687 static const int kMaxUncheckedOldFastElementsLength = 500; |
| 2688 | 2688 |
| 2689 // TODO(2790): HAllocate currently always allocates fast backing stores | 2689 // Note that Heap::MaxRegularSpaceAllocationSize() puts a limit on |
| 2690 // in new space, where on x64 we can only fit ~98K elements. Keep this | 2690 // permissible values (see the ASSERT in heap.cc). |
| 2691 // limit lower than that until HAllocate is made smarter. | 2691 static const int kInitialMaxFastElementArray = 100000; |
| 2692 static const int kInitialMaxFastElementArray = 95000; | |
| 2693 | 2692 |
| 2694 static const int kFastPropertiesSoftLimit = 12; | 2693 static const int kFastPropertiesSoftLimit = 12; |
| 2695 static const int kMaxFastProperties = 64; | 2694 static const int kMaxFastProperties = 64; |
| 2696 static const int kMaxInstanceSize = 255 * kPointerSize; | 2695 static const int kMaxInstanceSize = 255 * kPointerSize; |
| 2697 // When extending the backing storage for property values, we increase | 2696 // When extending the backing storage for property values, we increase |
| 2698 // its size by more than the 1 entry necessary, so sequentially adding fields | 2697 // its size by more than the 1 entry necessary, so sequentially adding fields |
| 2699 // to the same object requires fewer allocations and copies. | 2698 // to the same object requires fewer allocations and copies. |
| 2700 static const int kFieldsAdded = 3; | 2699 static const int kFieldsAdded = 3; |
| 2701 | 2700 |
| 2702 // Layout description. | 2701 // Layout description. |
| (...skipping 7531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10234 } else { | 10233 } else { |
| 10235 value &= ~(1 << bit_position); | 10234 value &= ~(1 << bit_position); |
| 10236 } | 10235 } |
| 10237 return value; | 10236 return value; |
| 10238 } | 10237 } |
| 10239 }; | 10238 }; |
| 10240 | 10239 |
| 10241 } } // namespace v8::internal | 10240 } } // namespace v8::internal |
| 10242 | 10241 |
| 10243 #endif // V8_OBJECTS_H_ | 10242 #endif // V8_OBJECTS_H_ |
| OLD | NEW |