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 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
496 progress_bar_ = progress_bar; | 496 progress_bar_ = progress_bar; |
497 } | 497 } |
498 | 498 |
499 void ResetProgressBar() { | 499 void ResetProgressBar() { |
500 if (IsFlagSet(MemoryChunk::HAS_PROGRESS_BAR)) { | 500 if (IsFlagSet(MemoryChunk::HAS_PROGRESS_BAR)) { |
501 set_progress_bar(0); | 501 set_progress_bar(0); |
502 ClearFlag(MemoryChunk::HAS_PROGRESS_BAR); | 502 ClearFlag(MemoryChunk::HAS_PROGRESS_BAR); |
503 } | 503 } |
504 } | 504 } |
505 | 505 |
506 bool IsLeftOfProgressBar(Object** slot) { | |
507 ASSERT(reinterpret_cast<Address>(slot) > reinterpret_cast<Address>(this)); | |
508 return reinterpret_cast<Address>(slot) - (reinterpret_cast<Address>(this) + | |
Michael Starzinger
2012/11/26 15:10:26
Used the address() helper instead of "reinterpret_
Hannes Payer (out of office)
2012/11/26 16:14:35
Done.
| |
509 kObjectStartOffset) < progress_bar(); | |
510 } | |
506 | 511 |
507 static void IncrementLiveBytesFromGC(Address address, int by) { | 512 static void IncrementLiveBytesFromGC(Address address, int by) { |
508 MemoryChunk::FromAddress(address)->IncrementLiveBytes(by); | 513 MemoryChunk::FromAddress(address)->IncrementLiveBytes(by); |
509 } | 514 } |
510 | 515 |
511 static void IncrementLiveBytesFromMutator(Address address, int by); | 516 static void IncrementLiveBytesFromMutator(Address address, int by); |
512 | 517 |
513 static const intptr_t kAlignment = | 518 static const intptr_t kAlignment = |
514 (static_cast<uintptr_t>(1) << kPageSizeBits); | 519 (static_cast<uintptr_t>(1) << kPageSizeBits); |
515 | 520 |
(...skipping 2206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2722 } | 2727 } |
2723 // Must be small, since an iteration is used for lookup. | 2728 // Must be small, since an iteration is used for lookup. |
2724 static const int kMaxComments = 64; | 2729 static const int kMaxComments = 64; |
2725 }; | 2730 }; |
2726 #endif | 2731 #endif |
2727 | 2732 |
2728 | 2733 |
2729 } } // namespace v8::internal | 2734 } } // namespace v8::internal |
2730 | 2735 |
2731 #endif // V8_SPACES_H_ | 2736 #endif // V8_SPACES_H_ |
OLD | NEW |