| 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 | 80 | 
| 81 void IncrementalMarking::RecordWriteForEvacuationFromCode(HeapObject* obj, | 81 void IncrementalMarking::RecordWriteForEvacuationFromCode(HeapObject* obj, | 
| 82                                                           Object** slot, | 82                                                           Object** slot, | 
| 83                                                           Isolate* isolate) { | 83                                                           Isolate* isolate) { | 
| 84   IncrementalMarking* marking = isolate->heap()->incremental_marking(); | 84   IncrementalMarking* marking = isolate->heap()->incremental_marking(); | 
| 85   ASSERT(marking->is_compacting_); | 85   ASSERT(marking->is_compacting_); | 
| 86   marking->RecordWrite(obj, slot, *slot); | 86   marking->RecordWrite(obj, slot, *slot); | 
| 87 } | 87 } | 
| 88 | 88 | 
| 89 | 89 | 
|  | 90 void IncrementalMarking::RecordCodeTargetPatch(Code* host, | 
|  | 91                                                Address pc, | 
|  | 92                                                HeapObject* value) { | 
|  | 93   if (IsMarking()) { | 
|  | 94     RelocInfo rinfo(pc, RelocInfo::CODE_TARGET, 0, host); | 
|  | 95     RecordWriteIntoCode(host, &rinfo, value); | 
|  | 96   } | 
|  | 97 } | 
|  | 98 | 
|  | 99 | 
| 90 void IncrementalMarking::RecordCodeTargetPatch(Address pc, HeapObject* value) { | 100 void IncrementalMarking::RecordCodeTargetPatch(Address pc, HeapObject* value) { | 
| 91   if (IsMarking()) { | 101   if (IsMarking()) { | 
| 92     Code* host = heap_->isolate()->inner_pointer_to_code_cache()-> | 102     Code* host = heap_->isolate()->inner_pointer_to_code_cache()-> | 
| 93         GcSafeFindCodeForInnerPointer(pc); | 103         GcSafeFindCodeForInnerPointer(pc); | 
| 94     RelocInfo rinfo(pc, RelocInfo::CODE_TARGET, 0, host); | 104     RelocInfo rinfo(pc, RelocInfo::CODE_TARGET, 0, host); | 
| 95     RecordWriteIntoCode(host, &rinfo, value); | 105     RecordWriteIntoCode(host, &rinfo, value); | 
| 96   } | 106   } | 
| 97 } | 107 } | 
| 98 | 108 | 
| 99 | 109 | 
| (...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 809   bytes_rescanned_ = 0; | 819   bytes_rescanned_ = 0; | 
| 810   allocation_marking_factor_ = kInitialAllocationMarkingFactor; | 820   allocation_marking_factor_ = kInitialAllocationMarkingFactor; | 
| 811 } | 821 } | 
| 812 | 822 | 
| 813 | 823 | 
| 814 int64_t IncrementalMarking::SpaceLeftInOldSpace() { | 824 int64_t IncrementalMarking::SpaceLeftInOldSpace() { | 
| 815   return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSize(); | 825   return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSize(); | 
| 816 } | 826 } | 
| 817 | 827 | 
| 818 } }  // namespace v8::internal | 828 } }  // namespace v8::internal | 
| OLD | NEW | 
|---|