| 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 2401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2412 inline bool FromSpaceContains(Object* o) { return from_space_.Contains(o); } | 2412 inline bool FromSpaceContains(Object* o) { return from_space_.Contains(o); } |
| 2413 | 2413 |
| 2414 // Try to switch the active semispace to a new, empty, page. | 2414 // Try to switch the active semispace to a new, empty, page. |
| 2415 // Returns false if this isn't possible or reasonable (i.e., there | 2415 // Returns false if this isn't possible or reasonable (i.e., there |
| 2416 // are no pages, or the current page is already empty), or true | 2416 // are no pages, or the current page is already empty), or true |
| 2417 // if successful. | 2417 // if successful. |
| 2418 bool AddFreshPage(); | 2418 bool AddFreshPage(); |
| 2419 | 2419 |
| 2420 virtual bool ReserveSpace(int bytes); | 2420 virtual bool ReserveSpace(int bytes); |
| 2421 | 2421 |
| 2422 // Resizes a sequential string which must be the most recent thing that was | |
| 2423 // allocated in new space. | |
| 2424 template <typename StringType> | |
| 2425 inline void ShrinkStringAtAllocationBoundary(String* string, int len); | |
| 2426 | |
| 2427 #ifdef VERIFY_HEAP | 2422 #ifdef VERIFY_HEAP |
| 2428 // Verify the active semispace. | 2423 // Verify the active semispace. |
| 2429 virtual void Verify(); | 2424 virtual void Verify(); |
| 2430 #endif | 2425 #endif |
| 2431 | 2426 |
| 2432 #ifdef DEBUG | 2427 #ifdef DEBUG |
| 2433 // Print the active semispace. | 2428 // Print the active semispace. |
| 2434 virtual void Print() { to_space_.Print(); } | 2429 virtual void Print() { to_space_.Print(); } |
| 2435 #endif | 2430 #endif |
| 2436 | 2431 |
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2831 } | 2826 } |
| 2832 // Must be small, since an iteration is used for lookup. | 2827 // Must be small, since an iteration is used for lookup. |
| 2833 static const int kMaxComments = 64; | 2828 static const int kMaxComments = 64; |
| 2834 }; | 2829 }; |
| 2835 #endif | 2830 #endif |
| 2836 | 2831 |
| 2837 | 2832 |
| 2838 } } // namespace v8::internal | 2833 } } // namespace v8::internal |
| 2839 | 2834 |
| 2840 #endif // V8_SPACES_H_ | 2835 #endif // V8_SPACES_H_ |
| OLD | NEW |