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 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
424 shared_function_info_candidates_head_ = shared_info; | 424 shared_function_info_candidates_head_ = shared_info; |
425 } | 425 } |
426 | 426 |
427 void AddCandidate(JSFunction* function) { | 427 void AddCandidate(JSFunction* function) { |
428 ASSERT(function->code() == function->shared()->code()); | 428 ASSERT(function->code() == function->shared()->code()); |
429 ASSERT(function->next_function_link()->IsUndefined()); | 429 ASSERT(function->next_function_link()->IsUndefined()); |
430 SetNextCandidate(function, jsfunction_candidates_head_); | 430 SetNextCandidate(function, jsfunction_candidates_head_); |
431 jsfunction_candidates_head_ = function; | 431 jsfunction_candidates_head_ = function; |
432 } | 432 } |
433 | 433 |
| 434 void EvictCandidate(JSFunction* function); |
| 435 |
434 void ProcessCandidates() { | 436 void ProcessCandidates() { |
435 ProcessSharedFunctionInfoCandidates(); | 437 ProcessSharedFunctionInfoCandidates(); |
436 ProcessJSFunctionCandidates(); | 438 ProcessJSFunctionCandidates(); |
437 } | 439 } |
438 | 440 |
439 private: | 441 private: |
440 void ProcessJSFunctionCandidates(); | 442 void ProcessJSFunctionCandidates(); |
441 void ProcessSharedFunctionInfoCandidates(); | 443 void ProcessSharedFunctionInfoCandidates(); |
442 | 444 |
443 static JSFunction* GetNextCandidate(JSFunction* candidate) { | 445 static JSFunction* GetNextCandidate(JSFunction* candidate) { |
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
832 | 834 |
833 friend class Heap; | 835 friend class Heap; |
834 }; | 836 }; |
835 | 837 |
836 | 838 |
837 const char* AllocationSpaceName(AllocationSpace space); | 839 const char* AllocationSpaceName(AllocationSpace space); |
838 | 840 |
839 } } // namespace v8::internal | 841 } } // namespace v8::internal |
840 | 842 |
841 #endif // V8_MARK_COMPACT_H_ | 843 #endif // V8_MARK_COMPACT_H_ |
OLD | NEW |