| Index: src/heap/mark-compact.h
|
| diff --git a/src/heap/mark-compact.h b/src/heap/mark-compact.h
|
| index 8db7f45c2629bd4322dd737ec98b8bbc19cf1b1f..6168436ee06d684986d9ad208aece45e8ebf4547 100644
|
| --- a/src/heap/mark-compact.h
|
| +++ b/src/heap/mark-compact.h
|
| @@ -459,27 +459,9 @@ class CodeFlusher {
|
| shared_function_info_candidates_head_(NULL),
|
| optimized_code_map_holder_head_(NULL) {}
|
|
|
| - void AddCandidate(SharedFunctionInfo* shared_info) {
|
| - if (GetNextCandidate(shared_info) == NULL) {
|
| - SetNextCandidate(shared_info, shared_function_info_candidates_head_);
|
| - shared_function_info_candidates_head_ = shared_info;
|
| - }
|
| - }
|
| -
|
| - void AddCandidate(JSFunction* function) {
|
| - DCHECK(function->code() == function->shared()->code());
|
| - if (GetNextCandidate(function)->IsUndefined()) {
|
| - SetNextCandidate(function, jsfunction_candidates_head_);
|
| - jsfunction_candidates_head_ = function;
|
| - }
|
| - }
|
| -
|
| - void AddOptimizedCodeMap(SharedFunctionInfo* code_map_holder) {
|
| - if (GetNextCodeMap(code_map_holder)->IsUndefined()) {
|
| - SetNextCodeMap(code_map_holder, optimized_code_map_holder_head_);
|
| - optimized_code_map_holder_head_ = code_map_holder;
|
| - }
|
| - }
|
| + inline void AddCandidate(SharedFunctionInfo* shared_info);
|
| + inline void AddCandidate(JSFunction* function);
|
| + inline void AddOptimizedCodeMap(SharedFunctionInfo* code_map_holder);
|
|
|
| void EvictOptimizedCodeMap(SharedFunctionInfo* code_map_holder);
|
| void EvictCandidate(SharedFunctionInfo* shared_info);
|
| @@ -507,57 +489,23 @@ class CodeFlusher {
|
| void EvictJSFunctionCandidates();
|
| void EvictSharedFunctionInfoCandidates();
|
|
|
| - static JSFunction** GetNextCandidateSlot(JSFunction* candidate) {
|
| - return reinterpret_cast<JSFunction**>(
|
| - HeapObject::RawField(candidate, JSFunction::kNextFunctionLinkOffset));
|
| - }
|
| -
|
| - static JSFunction* GetNextCandidate(JSFunction* candidate) {
|
| - Object* next_candidate = candidate->next_function_link();
|
| - return reinterpret_cast<JSFunction*>(next_candidate);
|
| - }
|
| -
|
| - static void SetNextCandidate(JSFunction* candidate,
|
| - JSFunction* next_candidate) {
|
| - candidate->set_next_function_link(next_candidate,
|
| - UPDATE_WEAK_WRITE_BARRIER);
|
| - }
|
| -
|
| - static void ClearNextCandidate(JSFunction* candidate, Object* undefined) {
|
| - DCHECK(undefined->IsUndefined());
|
| - candidate->set_next_function_link(undefined, SKIP_WRITE_BARRIER);
|
| - }
|
| -
|
| - static SharedFunctionInfo* GetNextCandidate(SharedFunctionInfo* candidate) {
|
| - Object* next_candidate = candidate->code()->gc_metadata();
|
| - return reinterpret_cast<SharedFunctionInfo*>(next_candidate);
|
| - }
|
| -
|
| - static void SetNextCandidate(SharedFunctionInfo* candidate,
|
| - SharedFunctionInfo* next_candidate) {
|
| - candidate->code()->set_gc_metadata(next_candidate);
|
| - }
|
| -
|
| - static void ClearNextCandidate(SharedFunctionInfo* candidate) {
|
| - candidate->code()->set_gc_metadata(NULL, SKIP_WRITE_BARRIER);
|
| - }
|
| -
|
| - static SharedFunctionInfo* GetNextCodeMap(SharedFunctionInfo* holder) {
|
| - FixedArray* code_map = FixedArray::cast(holder->optimized_code_map());
|
| - Object* next_map = code_map->get(SharedFunctionInfo::kNextMapIndex);
|
| - return reinterpret_cast<SharedFunctionInfo*>(next_map);
|
| - }
|
| -
|
| - static void SetNextCodeMap(SharedFunctionInfo* holder,
|
| - SharedFunctionInfo* next_holder) {
|
| - FixedArray* code_map = FixedArray::cast(holder->optimized_code_map());
|
| - code_map->set(SharedFunctionInfo::kNextMapIndex, next_holder);
|
| - }
|
| -
|
| - static void ClearNextCodeMap(SharedFunctionInfo* holder) {
|
| - FixedArray* code_map = FixedArray::cast(holder->optimized_code_map());
|
| - code_map->set_undefined(SharedFunctionInfo::kNextMapIndex);
|
| - }
|
| + static inline JSFunction** GetNextCandidateSlot(JSFunction* candidate);
|
| + static inline JSFunction* GetNextCandidate(JSFunction* candidate);
|
| + static inline void SetNextCandidate(JSFunction* candidate,
|
| + JSFunction* next_candidate);
|
| + static inline void ClearNextCandidate(JSFunction* candidate,
|
| + Object* undefined);
|
| +
|
| + static inline SharedFunctionInfo* GetNextCandidate(
|
| + SharedFunctionInfo* candidate);
|
| + static inline void SetNextCandidate(SharedFunctionInfo* candidate,
|
| + SharedFunctionInfo* next_candidate);
|
| + static inline void ClearNextCandidate(SharedFunctionInfo* candidate);
|
| +
|
| + static inline SharedFunctionInfo* GetNextCodeMap(SharedFunctionInfo* holder);
|
| + static inline void SetNextCodeMap(SharedFunctionInfo* holder,
|
| + SharedFunctionInfo* next_holder);
|
| + static inline void ClearNextCodeMap(SharedFunctionInfo* holder);
|
|
|
| Isolate* isolate_;
|
| JSFunction* jsfunction_candidates_head_;
|
|
|