Chromium Code Reviews
Help | Chromium Project | Sign in
(385)

Side by Side Diff: src/mark-compact.cc

Issue 11271006: Fix code flusher to process weak function links. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Do true scavenge instead of weak object retention. Created 1 year, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/mark-compact.h ('k') | src/objects-debug.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 // 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 934 matching lines...) Expand 10 before | Expand all | Expand 10 after
945 SetNextCandidate(candidate, next_candidate); 945 SetNextCandidate(candidate, next_candidate);
946 ClearNextCandidate(function, undefined); 946 ClearNextCandidate(function, undefined);
947 } 947 }
948 948
949 candidate = next_candidate; 949 candidate = next_candidate;
950 } 950 }
951 } 951 }
952 } 952 }
953 953
954 954
955 void CodeFlusher::IteratePointersToFromSpace(ObjectVisitor* v) {
956 Heap* heap = isolate_->heap();
957
958 JSFunction** slot = &jsfunction_candidates_head_;
959 JSFunction* candidate = jsfunction_candidates_head_;
960 while (candidate != NULL) {
961 if (heap->InFromSpace(candidate)) {
962 v->VisitPointer(reinterpret_cast<Object**>(slot));
963 }
964 candidate = GetNextCandidate(*slot);
ulan1 2012/10/26 09:15:28 candidate = GetNextCandidate(candidate); Would be
Michael Starzinger 2012/10/26 09:39:39 We cannot use the candidate variable here, because
965 slot = GetNextCandidateSlot(*slot);
966 }
967 }
968
969
955 MarkCompactCollector::~MarkCompactCollector() { 970 MarkCompactCollector::~MarkCompactCollector() {
956 if (code_flusher_ != NULL) { 971 if (code_flusher_ != NULL) {
957 delete code_flusher_; 972 delete code_flusher_;
958 code_flusher_ = NULL; 973 code_flusher_ = NULL;
959 } 974 }
960 } 975 }
961 976
962 977
963 static inline HeapObject* ShortCircuitConsString(Object** p) { 978 static inline HeapObject* ShortCircuitConsString(Object** p) {
964 // Optimization: If the heap object pointed to by p is a non-symbol 979 // Optimization: If the heap object pointed to by p is a non-symbol
(...skipping 2808 matching lines...) Expand 10 before | Expand all | Expand 10 after
3773 while (buffer != NULL) { 3788 while (buffer != NULL) {
3774 SlotsBuffer* next_buffer = buffer->next(); 3789 SlotsBuffer* next_buffer = buffer->next();
3775 DeallocateBuffer(buffer); 3790 DeallocateBuffer(buffer);
3776 buffer = next_buffer; 3791 buffer = next_buffer;
3777 } 3792 }
3778 *buffer_address = NULL; 3793 *buffer_address = NULL;
3779 } 3794 }
3780 3795
3781 3796
3782 } } // namespace v8::internal 3797 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mark-compact.h ('k') | src/objects-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 1280:2d3e6564b7b6