OLD | NEW |
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 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 } | 434 } |
435 } | 435 } |
436 | 436 |
437 void EvictCandidate(JSFunction* function); | 437 void EvictCandidate(JSFunction* function); |
438 | 438 |
439 void ProcessCandidates() { | 439 void ProcessCandidates() { |
440 ProcessSharedFunctionInfoCandidates(); | 440 ProcessSharedFunctionInfoCandidates(); |
441 ProcessJSFunctionCandidates(); | 441 ProcessJSFunctionCandidates(); |
442 } | 442 } |
443 | 443 |
| 444 void IteratePointersToFromSpace(ObjectVisitor* v); |
| 445 |
444 private: | 446 private: |
445 void ProcessJSFunctionCandidates(); | 447 void ProcessJSFunctionCandidates(); |
446 void ProcessSharedFunctionInfoCandidates(); | 448 void ProcessSharedFunctionInfoCandidates(); |
447 | 449 |
| 450 static JSFunction** GetNextCandidateSlot(JSFunction* candidate) { |
| 451 return reinterpret_cast<JSFunction**>( |
| 452 HeapObject::RawField(candidate, JSFunction::kNextFunctionLinkOffset)); |
| 453 } |
| 454 |
448 static JSFunction* GetNextCandidate(JSFunction* candidate) { | 455 static JSFunction* GetNextCandidate(JSFunction* candidate) { |
449 Object* next_candidate = candidate->next_function_link(); | 456 Object* next_candidate = candidate->next_function_link(); |
450 return reinterpret_cast<JSFunction*>(next_candidate); | 457 return reinterpret_cast<JSFunction*>(next_candidate); |
451 } | 458 } |
452 | 459 |
453 static void SetNextCandidate(JSFunction* candidate, | 460 static void SetNextCandidate(JSFunction* candidate, |
454 JSFunction* next_candidate) { | 461 JSFunction* next_candidate) { |
455 candidate->set_next_function_link(next_candidate); | 462 candidate->set_next_function_link(next_candidate); |
456 } | 463 } |
457 | 464 |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
837 | 844 |
838 friend class Heap; | 845 friend class Heap; |
839 }; | 846 }; |
840 | 847 |
841 | 848 |
842 const char* AllocationSpaceName(AllocationSpace space); | 849 const char* AllocationSpaceName(AllocationSpace space); |
843 | 850 |
844 } } // namespace v8::internal | 851 } } // namespace v8::internal |
845 | 852 |
846 #endif // V8_MARK_COMPACT_H_ | 853 #endif // V8_MARK_COMPACT_H_ |
OLD | NEW |