| 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 EvictAllCandidates() { | 
|  | 445     EvictJSFunctionCandidates(); | 
|  | 446     EvictSharedFunctionInfoCandidates(); | 
|  | 447   } | 
|  | 448 | 
| 444   void IteratePointersToFromSpace(ObjectVisitor* v); | 449   void IteratePointersToFromSpace(ObjectVisitor* v); | 
| 445 | 450 | 
| 446  private: | 451  private: | 
| 447   void ProcessJSFunctionCandidates(); | 452   void ProcessJSFunctionCandidates(); | 
| 448   void ProcessSharedFunctionInfoCandidates(); | 453   void ProcessSharedFunctionInfoCandidates(); | 
|  | 454   void EvictJSFunctionCandidates(); | 
|  | 455   void EvictSharedFunctionInfoCandidates(); | 
| 449 | 456 | 
| 450   static JSFunction** GetNextCandidateSlot(JSFunction* candidate) { | 457   static JSFunction** GetNextCandidateSlot(JSFunction* candidate) { | 
| 451     return reinterpret_cast<JSFunction**>( | 458     return reinterpret_cast<JSFunction**>( | 
| 452         HeapObject::RawField(candidate, JSFunction::kNextFunctionLinkOffset)); | 459         HeapObject::RawField(candidate, JSFunction::kNextFunctionLinkOffset)); | 
| 453   } | 460   } | 
| 454 | 461 | 
| 455   static JSFunction* GetNextCandidate(JSFunction* candidate) { | 462   static JSFunction* GetNextCandidate(JSFunction* candidate) { | 
| 456     Object* next_candidate = candidate->next_function_link(); | 463     Object* next_candidate = candidate->next_function_link(); | 
| 457     return reinterpret_cast<JSFunction*>(next_candidate); | 464     return reinterpret_cast<JSFunction*>(next_candidate); | 
| 458   } | 465   } | 
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 844 | 851 | 
| 845   friend class Heap; | 852   friend class Heap; | 
| 846 }; | 853 }; | 
| 847 | 854 | 
| 848 | 855 | 
| 849 const char* AllocationSpaceName(AllocationSpace space); | 856 const char* AllocationSpaceName(AllocationSpace space); | 
| 850 | 857 | 
| 851 } }  // namespace v8::internal | 858 } }  // namespace v8::internal | 
| 852 | 859 | 
| 853 #endif  // V8_MARK_COMPACT_H_ | 860 #endif  // V8_MARK_COMPACT_H_ | 
| OLD | NEW | 
|---|