| 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 968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 979 // reachable from the objects on the marking stack, but no longer push them on | 979 // reachable from the objects on the marking stack, but no longer push them on |
| 980 // the marking stack. Instead, we mark them as both marked and overflowed. | 980 // the marking stack. Instead, we mark them as both marked and overflowed. |
| 981 // When the stack is in the overflowed state, objects marked as overflowed | 981 // When the stack is in the overflowed state, objects marked as overflowed |
| 982 // have been reached and marked but their children have not been visited yet. | 982 // have been reached and marked but their children have not been visited yet. |
| 983 // After emptying the marking stack, we clear the overflow flag and traverse | 983 // After emptying the marking stack, we clear the overflow flag and traverse |
| 984 // the heap looking for objects marked as overflowed, push them on the stack, | 984 // the heap looking for objects marked as overflowed, push them on the stack, |
| 985 // and continue with marking. This process repeats until all reachable | 985 // and continue with marking. This process repeats until all reachable |
| 986 // objects have been marked. | 986 // objects have been marked. |
| 987 | 987 |
| 988 void CodeFlusher::ProcessJSFunctionCandidates() { | 988 void CodeFlusher::ProcessJSFunctionCandidates() { |
| 989 Code* lazy_compile = isolate_->builtins()->builtin(Builtins::kLazyCompile); | 989 Code* lazy_compile = |
| 990 isolate_->builtins()->builtin(Builtins::kCompileUnoptimized); |
| 990 Object* undefined = isolate_->heap()->undefined_value(); | 991 Object* undefined = isolate_->heap()->undefined_value(); |
| 991 | 992 |
| 992 JSFunction* candidate = jsfunction_candidates_head_; | 993 JSFunction* candidate = jsfunction_candidates_head_; |
| 993 JSFunction* next_candidate; | 994 JSFunction* next_candidate; |
| 994 while (candidate != NULL) { | 995 while (candidate != NULL) { |
| 995 next_candidate = GetNextCandidate(candidate); | 996 next_candidate = GetNextCandidate(candidate); |
| 996 ClearNextCandidate(candidate, undefined); | 997 ClearNextCandidate(candidate, undefined); |
| 997 | 998 |
| 998 SharedFunctionInfo* shared = candidate->shared(); | 999 SharedFunctionInfo* shared = candidate->shared(); |
| 999 | 1000 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 1024 RecordSlot(shared_code_slot, shared_code_slot, *shared_code_slot); | 1025 RecordSlot(shared_code_slot, shared_code_slot, *shared_code_slot); |
| 1025 | 1026 |
| 1026 candidate = next_candidate; | 1027 candidate = next_candidate; |
| 1027 } | 1028 } |
| 1028 | 1029 |
| 1029 jsfunction_candidates_head_ = NULL; | 1030 jsfunction_candidates_head_ = NULL; |
| 1030 } | 1031 } |
| 1031 | 1032 |
| 1032 | 1033 |
| 1033 void CodeFlusher::ProcessSharedFunctionInfoCandidates() { | 1034 void CodeFlusher::ProcessSharedFunctionInfoCandidates() { |
| 1034 Code* lazy_compile = isolate_->builtins()->builtin(Builtins::kLazyCompile); | 1035 Code* lazy_compile = |
| 1036 isolate_->builtins()->builtin(Builtins::kCompileUnoptimized); |
| 1035 | 1037 |
| 1036 SharedFunctionInfo* candidate = shared_function_info_candidates_head_; | 1038 SharedFunctionInfo* candidate = shared_function_info_candidates_head_; |
| 1037 SharedFunctionInfo* next_candidate; | 1039 SharedFunctionInfo* next_candidate; |
| 1038 while (candidate != NULL) { | 1040 while (candidate != NULL) { |
| 1039 next_candidate = GetNextCandidate(candidate); | 1041 next_candidate = GetNextCandidate(candidate); |
| 1040 ClearNextCandidate(candidate); | 1042 ClearNextCandidate(candidate); |
| 1041 | 1043 |
| 1042 Code* code = candidate->code(); | 1044 Code* code = candidate->code(); |
| 1043 MarkBit code_mark = Marking::MarkBitFrom(code); | 1045 MarkBit code_mark = Marking::MarkBitFrom(code); |
| 1044 if (!code_mark.Get()) { | 1046 if (!code_mark.Get()) { |
| (...skipping 3311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4356 while (buffer != NULL) { | 4358 while (buffer != NULL) { |
| 4357 SlotsBuffer* next_buffer = buffer->next(); | 4359 SlotsBuffer* next_buffer = buffer->next(); |
| 4358 DeallocateBuffer(buffer); | 4360 DeallocateBuffer(buffer); |
| 4359 buffer = next_buffer; | 4361 buffer = next_buffer; |
| 4360 } | 4362 } |
| 4361 *buffer_address = NULL; | 4363 *buffer_address = NULL; |
| 4362 } | 4364 } |
| 4363 | 4365 |
| 4364 | 4366 |
| 4365 } } // namespace v8::internal | 4367 } } // namespace v8::internal |
| OLD | NEW |