| 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 1968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1979 bool record_slots) { | 1979 bool record_slots) { |
| 1980 Object* allocation_site_obj = | 1980 Object* allocation_site_obj = |
| 1981 VisitWeakList<AllocationSite>(this, | 1981 VisitWeakList<AllocationSite>(this, |
| 1982 allocation_sites_list(), | 1982 allocation_sites_list(), |
| 1983 retainer, record_slots); | 1983 retainer, record_slots); |
| 1984 set_allocation_sites_list(allocation_site_obj); | 1984 set_allocation_sites_list(allocation_site_obj); |
| 1985 } | 1985 } |
| 1986 | 1986 |
| 1987 | 1987 |
| 1988 void Heap::ResetAllAllocationSitesDependentCode(PretenureFlag flag) { | 1988 void Heap::ResetAllAllocationSitesDependentCode(PretenureFlag flag) { |
| 1989 ASSERT(AllowCodeDependencyChange::IsAllowed()); | |
| 1990 DisallowHeapAllocation no_allocation_scope; | 1989 DisallowHeapAllocation no_allocation_scope; |
| 1991 Object* cur = allocation_sites_list(); | 1990 Object* cur = allocation_sites_list(); |
| 1992 bool marked = false; | 1991 bool marked = false; |
| 1993 while (cur->IsAllocationSite()) { | 1992 while (cur->IsAllocationSite()) { |
| 1994 AllocationSite* casted = AllocationSite::cast(cur); | 1993 AllocationSite* casted = AllocationSite::cast(cur); |
| 1995 if (casted->GetPretenureMode() == flag) { | 1994 if (casted->GetPretenureMode() == flag) { |
| 1996 casted->ResetPretenureDecision(); | 1995 casted->ResetPretenureDecision(); |
| 1997 bool got_marked = casted->dependent_code()->MarkCodeForDeoptimization( | 1996 bool got_marked = casted->dependent_code()->MarkCodeForDeoptimization( |
| 1998 isolate_, | 1997 isolate_, |
| 1999 DependentCode::kAllocationSiteTenuringChangedGroup); | 1998 DependentCode::kAllocationSiteTenuringChangedGroup); |
| (...skipping 5739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7739 static_cast<int>(object_sizes_last_time_[index])); | 7738 static_cast<int>(object_sizes_last_time_[index])); |
| 7740 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 7739 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
| 7741 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 7740 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
| 7742 | 7741 |
| 7743 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 7742 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
| 7744 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 7743 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
| 7745 ClearObjectStats(); | 7744 ClearObjectStats(); |
| 7746 } | 7745 } |
| 7747 | 7746 |
| 7748 } } // namespace v8::internal | 7747 } } // namespace v8::internal |
| OLD | NEW |