OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 12715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12726 void AllocationSite::ResetPretenureDecision() { | 12726 void AllocationSite::ResetPretenureDecision() { |
12727 set_pretenure_decision(kUndecided); | 12727 set_pretenure_decision(kUndecided); |
12728 set_memento_found_count(0); | 12728 set_memento_found_count(0); |
12729 set_memento_create_count(0); | 12729 set_memento_create_count(0); |
12730 } | 12730 } |
12731 | 12731 |
12732 | 12732 |
12733 PretenureFlag AllocationSite::GetPretenureMode() { | 12733 PretenureFlag AllocationSite::GetPretenureMode() { |
12734 PretenureDecision mode = pretenure_decision(); | 12734 PretenureDecision mode = pretenure_decision(); |
12735 // Zombie objects "decide" to be untenured. | 12735 // Zombie objects "decide" to be untenured. |
12736 return (mode == kTenure && GetHeap()->GetPretenureMode() == TENURED) | 12736 return mode == kTenure ? TENURED : NOT_TENURED; |
12737 ? TENURED : NOT_TENURED; | |
12738 } | 12737 } |
12739 | 12738 |
12740 | 12739 |
12741 bool AllocationSite::IsNestedSite() { | 12740 bool AllocationSite::IsNestedSite() { |
12742 ASSERT(FLAG_trace_track_allocation_sites); | 12741 ASSERT(FLAG_trace_track_allocation_sites); |
12743 Object* current = GetHeap()->allocation_sites_list(); | 12742 Object* current = GetHeap()->allocation_sites_list(); |
12744 while (current->IsAllocationSite()) { | 12743 while (current->IsAllocationSite()) { |
12745 AllocationSite* current_site = AllocationSite::cast(current); | 12744 AllocationSite* current_site = AllocationSite::cast(current); |
12746 if (current_site->nested_site() == this) { | 12745 if (current_site->nested_site() == this) { |
12747 return true; | 12746 return true; |
(...skipping 3676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16424 #define ERROR_MESSAGES_TEXTS(C, T) T, | 16423 #define ERROR_MESSAGES_TEXTS(C, T) T, |
16425 static const char* error_messages_[] = { | 16424 static const char* error_messages_[] = { |
16426 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 16425 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
16427 }; | 16426 }; |
16428 #undef ERROR_MESSAGES_TEXTS | 16427 #undef ERROR_MESSAGES_TEXTS |
16429 return error_messages_[reason]; | 16428 return error_messages_[reason]; |
16430 } | 16429 } |
16431 | 16430 |
16432 | 16431 |
16433 } } // namespace v8::internal | 16432 } } // namespace v8::internal |
OLD | NEW |