Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: src/incremental-marking.cc

Issue 8330021: Add write barrier helper for code patching and refactor stack check patching. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/incremental-marking.h ('k') | src/x64/deoptimizer-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/incremental-marking.h ('k') | src/x64/deoptimizer-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698