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 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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) { | 506 bool IsLeftOfProgressBar(Object** slot) { |
507 Address slot_address = reinterpret_cast<Address>(slot); | 507 Address slot_address = reinterpret_cast<Address>(slot); |
508 ASSERT(slot_address > this->address()); | 508 ASSERT(slot_address > this->address()); |
509 return (slot_address - this->address() + kObjectStartOffset) < | 509 return (slot_address - (this->address() + kObjectStartOffset)) < |
510 progress_bar(); | 510 progress_bar(); |
511 } | 511 } |
512 | 512 |
513 static void IncrementLiveBytesFromGC(Address address, int by) { | 513 static void IncrementLiveBytesFromGC(Address address, int by) { |
514 MemoryChunk::FromAddress(address)->IncrementLiveBytes(by); | 514 MemoryChunk::FromAddress(address)->IncrementLiveBytes(by); |
515 } | 515 } |
516 | 516 |
517 static void IncrementLiveBytesFromMutator(Address address, int by); | 517 static void IncrementLiveBytesFromMutator(Address address, int by); |
518 | 518 |
519 static const intptr_t kAlignment = | 519 static const intptr_t kAlignment = |
(...skipping 2208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2728 } | 2728 } |
2729 // Must be small, since an iteration is used for lookup. | 2729 // Must be small, since an iteration is used for lookup. |
2730 static const int kMaxComments = 64; | 2730 static const int kMaxComments = 64; |
2731 }; | 2731 }; |
2732 #endif | 2732 #endif |
2733 | 2733 |
2734 | 2734 |
2735 } } // namespace v8::internal | 2735 } } // namespace v8::internal |
2736 | 2736 |
2737 #endif // V8_SPACES_H_ | 2737 #endif // V8_SPACES_H_ |
OLD | NEW |