| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 Object** slot, | 80 Object** slot, |
| 81 Isolate* isolate) { | 81 Isolate* isolate) { |
| 82 IncrementalMarking* marking = isolate->heap()->incremental_marking(); | 82 IncrementalMarking* marking = isolate->heap()->incremental_marking(); |
| 83 ASSERT(marking->is_compacting_); | 83 ASSERT(marking->is_compacting_); |
| 84 marking->RecordWrite(obj, slot, *slot); | 84 marking->RecordWrite(obj, slot, *slot); |
| 85 } | 85 } |
| 86 | 86 |
| 87 | 87 |
| 88 void IncrementalMarking::RecordCodeTargetPatch(Address pc, HeapObject* value) { | 88 void IncrementalMarking::RecordCodeTargetPatch(Address pc, HeapObject* value) { |
| 89 if (IsMarking()) { | 89 if (IsMarking()) { |
| 90 Code* host = | 90 Code* host = heap_->isolate()->inner_pointer_to_code_cache()-> |
| 91 heap_->isolate()->pc_to_code_cache()->GcSafeFindCodeForPc(pc); | 91 GcSafeFindCodeForInnerPointer(pc); |
| 92 RelocInfo rinfo(pc, RelocInfo::CODE_TARGET, NULL, host); | 92 RelocInfo rinfo(pc, RelocInfo::CODE_TARGET, NULL, host); |
| 93 RecordWriteIntoCode(host, &rinfo, value); | 93 RecordWriteIntoCode(host, &rinfo, value); |
| 94 } | 94 } |
| 95 } | 95 } |
| 96 | 96 |
| 97 | 97 |
| 98 void IncrementalMarking::RecordWriteOfCodeEntry(JSFunction* host, | 98 void IncrementalMarking::RecordWriteOfCodeEntry(JSFunction* host, |
| 99 Object** slot, | 99 Object** slot, |
| 100 Code* value) { | 100 Code* value) { |
| 101 if (BaseRecordWrite(host, slot, value) && is_compacting_) { | 101 if (BaseRecordWrite(host, slot, value) && is_compacting_) { |
| (...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 760 bytes_rescanned_ = 0; | 760 bytes_rescanned_ = 0; |
| 761 allocation_marking_factor_ = kInitialAllocationMarkingFactor; | 761 allocation_marking_factor_ = kInitialAllocationMarkingFactor; |
| 762 } | 762 } |
| 763 | 763 |
| 764 | 764 |
| 765 int64_t IncrementalMarking::SpaceLeftInOldSpace() { | 765 int64_t IncrementalMarking::SpaceLeftInOldSpace() { |
| 766 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSize(); | 766 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSize(); |
| 767 } | 767 } |
| 768 | 768 |
| 769 } } // namespace v8::internal | 769 } } // namespace v8::internal |
| OLD | NEW |