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

Side by Side Diff: src/heap/mark-compact.h

Issue 1158423002: Treat links that organize weak objects weakly. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « src/factory.cc ('k') | src/heap/objects-visiting.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_HEAP_MARK_COMPACT_H_ 5 #ifndef V8_HEAP_MARK_COMPACT_H_
6 #define V8_HEAP_MARK_COMPACT_H_ 6 #define V8_HEAP_MARK_COMPACT_H_
7 7
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/heap/spaces.h" 9 #include "src/heap/spaces.h"
10 10
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 HeapObject::RawField(candidate, JSFunction::kNextFunctionLinkOffset)); 509 HeapObject::RawField(candidate, JSFunction::kNextFunctionLinkOffset));
510 } 510 }
511 511
512 static JSFunction* GetNextCandidate(JSFunction* candidate) { 512 static JSFunction* GetNextCandidate(JSFunction* candidate) {
513 Object* next_candidate = candidate->next_function_link(); 513 Object* next_candidate = candidate->next_function_link();
514 return reinterpret_cast<JSFunction*>(next_candidate); 514 return reinterpret_cast<JSFunction*>(next_candidate);
515 } 515 }
516 516
517 static void SetNextCandidate(JSFunction* candidate, 517 static void SetNextCandidate(JSFunction* candidate,
518 JSFunction* next_candidate) { 518 JSFunction* next_candidate) {
519 candidate->set_next_function_link(next_candidate); 519 candidate->set_next_function_link(next_candidate,
520 UPDATE_WEAK_WRITE_BARRIER);
520 } 521 }
521 522
522 static void ClearNextCandidate(JSFunction* candidate, Object* undefined) { 523 static void ClearNextCandidate(JSFunction* candidate, Object* undefined) {
523 DCHECK(undefined->IsUndefined()); 524 DCHECK(undefined->IsUndefined());
524 candidate->set_next_function_link(undefined, SKIP_WRITE_BARRIER); 525 candidate->set_next_function_link(undefined, SKIP_WRITE_BARRIER);
525 } 526 }
526 527
527 static SharedFunctionInfo* GetNextCandidate(SharedFunctionInfo* candidate) { 528 static SharedFunctionInfo* GetNextCandidate(SharedFunctionInfo* candidate) {
528 Object* next_candidate = candidate->code()->gc_metadata(); 529 Object* next_candidate = candidate->code()->gc_metadata();
529 return reinterpret_cast<SharedFunctionInfo*>(next_candidate); 530 return reinterpret_cast<SharedFunctionInfo*>(next_candidate);
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
1017 private: 1018 private:
1018 MarkCompactCollector* collector_; 1019 MarkCompactCollector* collector_;
1019 }; 1020 };
1020 1021
1021 1022
1022 const char* AllocationSpaceName(AllocationSpace space); 1023 const char* AllocationSpaceName(AllocationSpace space);
1023 } 1024 }
1024 } // namespace v8::internal 1025 } // namespace v8::internal
1025 1026
1026 #endif // V8_HEAP_MARK_COMPACT_H_ 1027 #endif // V8_HEAP_MARK_COMPACT_H_
OLDNEW
« no previous file with comments | « src/factory.cc ('k') | src/heap/objects-visiting.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698