| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 2641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2652 | 2652 |
| 2653 | 2653 |
| 2654 // ----------------------------------------------------------------------------- | 2654 // ----------------------------------------------------------------------------- |
| 2655 // Old space for all global object property cell objects | 2655 // Old space for all global object property cell objects |
| 2656 | 2656 |
| 2657 class PropertyCellSpace : public FixedSpace { | 2657 class PropertyCellSpace : public FixedSpace { |
| 2658 public: | 2658 public: |
| 2659 // Creates a property cell space object with a maximum capacity. | 2659 // Creates a property cell space object with a maximum capacity. |
| 2660 PropertyCellSpace(Heap* heap, intptr_t max_capacity, | 2660 PropertyCellSpace(Heap* heap, intptr_t max_capacity, |
| 2661 AllocationSpace id) | 2661 AllocationSpace id) |
| 2662 : FixedSpace(heap, max_capacity, id, JSGlobalPropertyCell::kSize) | 2662 : FixedSpace(heap, max_capacity, id, PropertyCell::kSize) |
| 2663 {} | 2663 {} |
| 2664 | 2664 |
| 2665 virtual int RoundSizeDownToObjectAlignment(int size) { | 2665 virtual int RoundSizeDownToObjectAlignment(int size) { |
| 2666 if (IsPowerOf2(JSGlobalPropertyCell::kSize)) { | 2666 if (IsPowerOf2(PropertyCell::kSize)) { |
| 2667 return RoundDown(size, JSGlobalPropertyCell::kSize); | 2667 return RoundDown(size, PropertyCell::kSize); |
| 2668 } else { | 2668 } else { |
| 2669 return (size / JSGlobalPropertyCell::kSize) * JSGlobalPropertyCell::kSize; | 2669 return (size / PropertyCell::kSize) * PropertyCell::kSize; |
| 2670 } | 2670 } |
| 2671 } | 2671 } |
| 2672 | 2672 |
| 2673 protected: | 2673 protected: |
| 2674 virtual void VerifyObject(HeapObject* obj); | 2674 virtual void VerifyObject(HeapObject* obj); |
| 2675 | 2675 |
| 2676 public: | 2676 public: |
| 2677 TRACK_MEMORY("PropertyCellSpace") | 2677 TRACK_MEMORY("PropertyCellSpace") |
| 2678 }; | 2678 }; |
| 2679 | 2679 |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2872 } | 2872 } |
| 2873 // Must be small, since an iteration is used for lookup. | 2873 // Must be small, since an iteration is used for lookup. |
| 2874 static const int kMaxComments = 64; | 2874 static const int kMaxComments = 64; |
| 2875 }; | 2875 }; |
| 2876 #endif | 2876 #endif |
| 2877 | 2877 |
| 2878 | 2878 |
| 2879 } } // namespace v8::internal | 2879 } } // namespace v8::internal |
| 2880 | 2880 |
| 2881 #endif // V8_SPACES_H_ | 2881 #endif // V8_SPACES_H_ |
| OLD | NEW |