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 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1097 break; | 1097 break; |
1098 } | 1098 } |
1099 | 1099 |
1100 candidate = next_candidate; | 1100 candidate = next_candidate; |
1101 } | 1101 } |
1102 } | 1102 } |
1103 } | 1103 } |
1104 | 1104 |
1105 | 1105 |
1106 void CodeFlusher::EvictJSFunctionCandidates() { | 1106 void CodeFlusher::EvictJSFunctionCandidates() { |
1107 Object* undefined = isolate_->heap()->undefined_value(); | |
1108 | |
1109 JSFunction* candidate = jsfunction_candidates_head_; | 1107 JSFunction* candidate = jsfunction_candidates_head_; |
1110 JSFunction* next_candidate; | 1108 JSFunction* next_candidate; |
1111 while (candidate != NULL) { | 1109 while (candidate != NULL) { |
1112 next_candidate = GetNextCandidate(candidate); | 1110 next_candidate = GetNextCandidate(candidate); |
1113 ClearNextCandidate(candidate, undefined); | 1111 EvictCandidate(candidate); |
1114 candidate = next_candidate; | 1112 candidate = next_candidate; |
1115 } | 1113 } |
1116 | 1114 ASSERT(jsfunction_candidates_head_ == NULL); |
1117 jsfunction_candidates_head_ = NULL; | |
1118 } | 1115 } |
1119 | 1116 |
1120 | 1117 |
1121 void CodeFlusher::EvictSharedFunctionInfoCandidates() { | 1118 void CodeFlusher::EvictSharedFunctionInfoCandidates() { |
1122 SharedFunctionInfo* candidate = shared_function_info_candidates_head_; | 1119 SharedFunctionInfo* candidate = shared_function_info_candidates_head_; |
1123 SharedFunctionInfo* next_candidate; | 1120 SharedFunctionInfo* next_candidate; |
1124 while (candidate != NULL) { | 1121 while (candidate != NULL) { |
1125 next_candidate = GetNextCandidate(candidate); | 1122 next_candidate = GetNextCandidate(candidate); |
1126 ClearNextCandidate(candidate); | 1123 EvictCandidate(candidate); |
1127 candidate = next_candidate; | 1124 candidate = next_candidate; |
1128 } | 1125 } |
1129 | 1126 ASSERT(shared_function_info_candidates_head_ == NULL); |
1130 shared_function_info_candidates_head_ = NULL; | |
1131 } | 1127 } |
1132 | 1128 |
1133 | 1129 |
1134 void CodeFlusher::IteratePointersToFromSpace(ObjectVisitor* v) { | 1130 void CodeFlusher::IteratePointersToFromSpace(ObjectVisitor* v) { |
1135 Heap* heap = isolate_->heap(); | 1131 Heap* heap = isolate_->heap(); |
1136 | 1132 |
1137 JSFunction** slot = &jsfunction_candidates_head_; | 1133 JSFunction** slot = &jsfunction_candidates_head_; |
1138 JSFunction* candidate = jsfunction_candidates_head_; | 1134 JSFunction* candidate = jsfunction_candidates_head_; |
1139 while (candidate != NULL) { | 1135 while (candidate != NULL) { |
1140 if (heap->InFromSpace(candidate)) { | 1136 if (heap->InFromSpace(candidate)) { |
(...skipping 2931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4072 while (buffer != NULL) { | 4068 while (buffer != NULL) { |
4073 SlotsBuffer* next_buffer = buffer->next(); | 4069 SlotsBuffer* next_buffer = buffer->next(); |
4074 DeallocateBuffer(buffer); | 4070 DeallocateBuffer(buffer); |
4075 buffer = next_buffer; | 4071 buffer = next_buffer; |
4076 } | 4072 } |
4077 *buffer_address = NULL; | 4073 *buffer_address = NULL; |
4078 } | 4074 } |
4079 | 4075 |
4080 | 4076 |
4081 } } // namespace v8::internal | 4077 } } // namespace v8::internal |
OLD | NEW |