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 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 inline void Iterate(ObjectVisitor* v); | 455 inline void Iterate(ObjectVisitor* v); |
456 | 456 |
457 // Restores internal invariant and gets rid of collected strings. | 457 // Restores internal invariant and gets rid of collected strings. |
458 // Must be called after each Iterate() that modified the strings. | 458 // Must be called after each Iterate() that modified the strings. |
459 void CleanUp(); | 459 void CleanUp(); |
460 | 460 |
461 // Destroys all allocated memory. | 461 // Destroys all allocated memory. |
462 void TearDown(); | 462 void TearDown(); |
463 | 463 |
464 private: | 464 private: |
465 ExternalStringTable() { } | 465 explicit ExternalStringTable(Heap* heap) : heap_(heap) { } |
466 | 466 |
467 friend class Heap; | 467 friend class Heap; |
468 | 468 |
469 inline void Verify(); | 469 inline void Verify(); |
470 | 470 |
471 inline void AddOldString(String* string); | 471 inline void AddOldString(String* string); |
472 | 472 |
473 // Notifies the table that only a prefix of the new list is valid. | 473 // Notifies the table that only a prefix of the new list is valid. |
474 inline void ShrinkNewStrings(int position); | 474 inline void ShrinkNewStrings(int position); |
475 | 475 |
(...skipping 2564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3040 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 3040 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
3041 | 3041 |
3042 private: | 3042 private: |
3043 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 3043 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
3044 }; | 3044 }; |
3045 #endif // DEBUG | 3045 #endif // DEBUG |
3046 | 3046 |
3047 } } // namespace v8::internal | 3047 } } // namespace v8::internal |
3048 | 3048 |
3049 #endif // V8_HEAP_H_ | 3049 #endif // V8_HEAP_H_ |
OLD | NEW |