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 12757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12768 void JSObject::TransitionElementsKind(Handle<JSObject> object, | 12768 void JSObject::TransitionElementsKind(Handle<JSObject> object, |
12769 ElementsKind to_kind) { | 12769 ElementsKind to_kind) { |
12770 CALL_HEAP_FUNCTION_VOID(object->GetIsolate(), | 12770 CALL_HEAP_FUNCTION_VOID(object->GetIsolate(), |
12771 object->TransitionElementsKind(to_kind)); | 12771 object->TransitionElementsKind(to_kind)); |
12772 } | 12772 } |
12773 | 12773 |
12774 | 12774 |
12775 const double AllocationSite::kPretenureRatio = 0.60; | 12775 const double AllocationSite::kPretenureRatio = 0.60; |
12776 | 12776 |
12777 | 12777 |
| 12778 void AllocationSite::ResetPretenureDecision() { |
| 12779 dependent_code()->DeoptimizeDependentCodeGroup( |
| 12780 GetIsolate(), |
| 12781 DependentCode::kAllocationSiteTenuringChangedGroup); |
| 12782 set_pretenure_decision(Smi::FromInt(kUndecided)); |
| 12783 set_memento_found_count(Smi::FromInt(0)); |
| 12784 set_memento_create_count(Smi::FromInt(0)); |
| 12785 } |
| 12786 |
| 12787 |
| 12788 PretenureFlag AllocationSite::GetPretenureMode() { |
| 12789 int mode = pretenure_decision()->value(); |
| 12790 // Zombie objects "decide" to be untenured. |
| 12791 return (mode == kTenure && GetHeap()->GetPretenureMode() == TENURED) |
| 12792 ? TENURED : NOT_TENURED; |
| 12793 } |
| 12794 |
| 12795 |
12778 bool AllocationSite::IsNestedSite() { | 12796 bool AllocationSite::IsNestedSite() { |
12779 ASSERT(FLAG_trace_track_allocation_sites); | 12797 ASSERT(FLAG_trace_track_allocation_sites); |
12780 Object* current = GetHeap()->allocation_sites_list(); | 12798 Object* current = GetHeap()->allocation_sites_list(); |
12781 while (current->IsAllocationSite()) { | 12799 while (current->IsAllocationSite()) { |
12782 AllocationSite* current_site = AllocationSite::cast(current); | 12800 AllocationSite* current_site = AllocationSite::cast(current); |
12783 if (current_site->nested_site() == this) { | 12801 if (current_site->nested_site() == this) { |
12784 return true; | 12802 return true; |
12785 } | 12803 } |
12786 current = current_site->weak_next(); | 12804 current = current_site->weak_next(); |
12787 } | 12805 } |
(...skipping 3852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16640 #define ERROR_MESSAGES_TEXTS(C, T) T, | 16658 #define ERROR_MESSAGES_TEXTS(C, T) T, |
16641 static const char* error_messages_[] = { | 16659 static const char* error_messages_[] = { |
16642 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 16660 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
16643 }; | 16661 }; |
16644 #undef ERROR_MESSAGES_TEXTS | 16662 #undef ERROR_MESSAGES_TEXTS |
16645 return error_messages_[reason]; | 16663 return error_messages_[reason]; |
16646 } | 16664 } |
16647 | 16665 |
16648 | 16666 |
16649 } } // namespace v8::internal | 16667 } } // namespace v8::internal |
OLD | NEW |