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 2729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2740 | 2740 |
2741 // Same as above but for old arrays. This limit is more strict. We | 2741 // Same as above but for old arrays. This limit is more strict. We |
2742 // don't want to be wasteful with long lived objects. | 2742 // don't want to be wasteful with long lived objects. |
2743 static const int kMaxUncheckedOldFastElementsLength = 500; | 2743 static const int kMaxUncheckedOldFastElementsLength = 500; |
2744 | 2744 |
2745 // Note that Page::kMaxRegularHeapObjectSize puts a limit on | 2745 // Note that Page::kMaxRegularHeapObjectSize puts a limit on |
2746 // permissible values (see the ASSERT in heap.cc). | 2746 // permissible values (see the ASSERT in heap.cc). |
2747 static const int kInitialMaxFastElementArray = 100000; | 2747 static const int kInitialMaxFastElementArray = 100000; |
2748 | 2748 |
2749 static const int kFastPropertiesSoftLimit = 12; | 2749 static const int kFastPropertiesSoftLimit = 12; |
2750 static const int kMaxFastProperties = 64; | 2750 static const int kMaxFastProperties = 128; |
2751 static const int kMaxInstanceSize = 255 * kPointerSize; | 2751 static const int kMaxInstanceSize = 255 * kPointerSize; |
2752 // When extending the backing storage for property values, we increase | 2752 // When extending the backing storage for property values, we increase |
2753 // its size by more than the 1 entry necessary, so sequentially adding fields | 2753 // its size by more than the 1 entry necessary, so sequentially adding fields |
2754 // to the same object requires fewer allocations and copies. | 2754 // to the same object requires fewer allocations and copies. |
2755 static const int kFieldsAdded = 3; | 2755 static const int kFieldsAdded = 3; |
2756 | 2756 |
2757 // Layout description. | 2757 // Layout description. |
2758 static const int kPropertiesOffset = HeapObject::kHeaderSize; | 2758 static const int kPropertiesOffset = HeapObject::kHeaderSize; |
2759 static const int kElementsOffset = kPropertiesOffset + kPointerSize; | 2759 static const int kElementsOffset = kPropertiesOffset + kPointerSize; |
2760 static const int kHeaderSize = kElementsOffset + kPointerSize; | 2760 static const int kHeaderSize = kElementsOffset + kPointerSize; |
(...skipping 8296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11057 } else { | 11057 } else { |
11058 value &= ~(1 << bit_position); | 11058 value &= ~(1 << bit_position); |
11059 } | 11059 } |
11060 return value; | 11060 return value; |
11061 } | 11061 } |
11062 }; | 11062 }; |
11063 | 11063 |
11064 } } // namespace v8::internal | 11064 } } // namespace v8::internal |
11065 | 11065 |
11066 #endif // V8_OBJECTS_H_ | 11066 #endif // V8_OBJECTS_H_ |
OLD | NEW |