| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 | 60 |
| 61 | 61 |
| 62 void IncrementalMarking::RecordWriteFromCode(HeapObject* obj, | 62 void IncrementalMarking::RecordWriteFromCode(HeapObject* obj, |
| 63 Object* value, | 63 Object* value, |
| 64 Isolate* isolate) { | 64 Isolate* isolate) { |
| 65 ASSERT(obj->IsHeapObject()); | 65 ASSERT(obj->IsHeapObject()); |
| 66 | 66 |
| 67 // Fast cases should already be covered by RecordWriteStub. | 67 // Fast cases should already be covered by RecordWriteStub. |
| 68 ASSERT(value->IsHeapObject()); | 68 ASSERT(value->IsHeapObject()); |
| 69 ASSERT(!value->IsHeapNumber()); | 69 ASSERT(!value->IsHeapNumber()); |
| 70 ASSERT(!value->IsString() || value->IsConsString()); | 70 ASSERT(!value->IsString() || |
| 71 value->IsConsString() || |
| 72 value->IsSlicedString()); |
| 71 ASSERT(Marking::IsWhite(Marking::MarkBitFrom(HeapObject::cast(value)))); | 73 ASSERT(Marking::IsWhite(Marking::MarkBitFrom(HeapObject::cast(value)))); |
| 72 | 74 |
| 73 IncrementalMarking* marking = isolate->heap()->incremental_marking(); | 75 IncrementalMarking* marking = isolate->heap()->incremental_marking(); |
| 74 ASSERT(!marking->is_compacting_); | 76 ASSERT(!marking->is_compacting_); |
| 75 marking->RecordWrite(obj, NULL, value); | 77 marking->RecordWrite(obj, NULL, value); |
| 76 } | 78 } |
| 77 | 79 |
| 78 | 80 |
| 79 void IncrementalMarking::RecordWriteForEvacuationFromCode(HeapObject* obj, | 81 void IncrementalMarking::RecordWriteForEvacuationFromCode(HeapObject* obj, |
| 80 Object** slot, | 82 Object** slot, |
| (...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 800 bytes_rescanned_ = 0; | 802 bytes_rescanned_ = 0; |
| 801 allocation_marking_factor_ = kInitialAllocationMarkingFactor; | 803 allocation_marking_factor_ = kInitialAllocationMarkingFactor; |
| 802 } | 804 } |
| 803 | 805 |
| 804 | 806 |
| 805 int64_t IncrementalMarking::SpaceLeftInOldSpace() { | 807 int64_t IncrementalMarking::SpaceLeftInOldSpace() { |
| 806 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSize(); | 808 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSize(); |
| 807 } | 809 } |
| 808 | 810 |
| 809 } } // namespace v8::internal | 811 } } // namespace v8::internal |
| OLD | NEW |