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 984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
995 JSFunction* next_candidate; | 995 JSFunction* next_candidate; |
996 while (candidate != NULL) { | 996 while (candidate != NULL) { |
997 next_candidate = GetNextCandidate(candidate); | 997 next_candidate = GetNextCandidate(candidate); |
998 ClearNextCandidate(candidate, undefined); | 998 ClearNextCandidate(candidate, undefined); |
999 | 999 |
1000 SharedFunctionInfo* shared = candidate->shared(); | 1000 SharedFunctionInfo* shared = candidate->shared(); |
1001 | 1001 |
1002 Code* code = shared->code(); | 1002 Code* code = shared->code(); |
1003 MarkBit code_mark = Marking::MarkBitFrom(code); | 1003 MarkBit code_mark = Marking::MarkBitFrom(code); |
1004 if (!code_mark.Get()) { | 1004 if (!code_mark.Get()) { |
1005 ASSERT(!FLAG_age_code || code->GetAge() >= Code::kSexagenarianCodeAge); | |
Michael Starzinger
2013/06/12 09:09:32
I don't think this assert is entirely correct, if
Michael Starzinger
2013/06/12 09:12:17
Sorry, should have been ...
ASSERT(!FLAG_age_code
| |
1005 if (FLAG_trace_code_flushing && shared->is_compiled()) { | 1006 if (FLAG_trace_code_flushing && shared->is_compiled()) { |
1006 SmartArrayPointer<char> name = shared->DebugName()->ToCString(); | 1007 SmartArrayPointer<char> name = shared->DebugName()->ToCString(); |
1007 PrintF("[code-flushing clears: %s]\n", *name); | 1008 PrintF("[code-flushing clears: %s]\n", *name); |
1008 } | 1009 } |
1009 shared->set_code(lazy_compile); | 1010 shared->set_code(lazy_compile); |
1010 candidate->set_code(lazy_compile); | 1011 candidate->set_code(lazy_compile); |
1011 } else { | 1012 } else { |
1012 candidate->set_code(code); | 1013 candidate->set_code(code); |
1013 } | 1014 } |
1014 | 1015 |
(...skipping 21 matching lines...) Expand all Loading... | |
1036 | 1037 |
1037 SharedFunctionInfo* candidate = shared_function_info_candidates_head_; | 1038 SharedFunctionInfo* candidate = shared_function_info_candidates_head_; |
1038 SharedFunctionInfo* next_candidate; | 1039 SharedFunctionInfo* next_candidate; |
1039 while (candidate != NULL) { | 1040 while (candidate != NULL) { |
1040 next_candidate = GetNextCandidate(candidate); | 1041 next_candidate = GetNextCandidate(candidate); |
1041 ClearNextCandidate(candidate); | 1042 ClearNextCandidate(candidate); |
1042 | 1043 |
1043 Code* code = candidate->code(); | 1044 Code* code = candidate->code(); |
1044 MarkBit code_mark = Marking::MarkBitFrom(code); | 1045 MarkBit code_mark = Marking::MarkBitFrom(code); |
1045 if (!code_mark.Get()) { | 1046 if (!code_mark.Get()) { |
1047 ASSERT(!FLAG_age_code || code->GetAge() >= Code::kSexagenarianCodeAge); | |
danno
2013/06/12 09:08:13
Perhaps add a constant for Code::kOldCodeAge that
Michael Starzinger
2013/06/12 09:09:32
Likewise.
| |
1046 if (FLAG_trace_code_flushing && candidate->is_compiled()) { | 1048 if (FLAG_trace_code_flushing && candidate->is_compiled()) { |
1047 SmartArrayPointer<char> name = candidate->DebugName()->ToCString(); | 1049 SmartArrayPointer<char> name = candidate->DebugName()->ToCString(); |
1048 PrintF("[code-flushing clears: %s]\n", *name); | 1050 PrintF("[code-flushing clears: %s]\n", *name); |
1049 } | 1051 } |
1050 candidate->set_code(lazy_compile); | 1052 candidate->set_code(lazy_compile); |
1051 } | 1053 } |
1052 | 1054 |
1053 Object** code_slot = | 1055 Object** code_slot = |
1054 HeapObject::RawField(candidate, SharedFunctionInfo::kCodeOffset); | 1056 HeapObject::RawField(candidate, SharedFunctionInfo::kCodeOffset); |
1055 isolate_->heap()->mark_compact_collector()-> | 1057 isolate_->heap()->mark_compact_collector()-> |
(...skipping 3209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4265 while (buffer != NULL) { | 4267 while (buffer != NULL) { |
4266 SlotsBuffer* next_buffer = buffer->next(); | 4268 SlotsBuffer* next_buffer = buffer->next(); |
4267 DeallocateBuffer(buffer); | 4269 DeallocateBuffer(buffer); |
4268 buffer = next_buffer; | 4270 buffer = next_buffer; |
4269 } | 4271 } |
4270 *buffer_address = NULL; | 4272 *buffer_address = NULL; |
4271 } | 4273 } |
4272 | 4274 |
4273 | 4275 |
4274 } } // namespace v8::internal | 4276 } } // namespace v8::internal |
OLD | NEW |