Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Side by Side Diff: src/objects.cc

Issue 757983002: Reset code age on the cloned code when serializing. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/objects.h ('k') | src/serialize.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <sstream> 5 #include <sstream>
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #include "src/accessors.h" 9 #include "src/accessors.h"
10 #include "src/allocation-site-scopes.h" 10 #include "src/allocation-site-scopes.h"
(...skipping 10735 matching lines...) Expand 10 before | Expand all | Expand 10 after
10746 // Treat that's never been executed as old immediately. 10746 // Treat that's never been executed as old immediately.
10747 age = Code::kIsOldCodeAge; 10747 age = Code::kIsOldCodeAge;
10748 } else if (age == Code::kExecutedOnceCodeAge) { 10748 } else if (age == Code::kExecutedOnceCodeAge) {
10749 // Pre-age code that has only been executed once. 10749 // Pre-age code that has only been executed once.
10750 age = Code::kPreAgedCodeAge; 10750 age = Code::kPreAgedCodeAge;
10751 } 10751 }
10752 return age; 10752 return age;
10753 } 10753 }
10754 10754
10755 10755
10756 void Code::MakeYoung() { 10756 void Code::MakeYoung(Isolate* isolate) {
10757 byte* sequence = FindCodeAgeSequence(); 10757 byte* sequence = FindCodeAgeSequence();
10758 if (sequence != NULL) MakeCodeAgeSequenceYoung(sequence, GetIsolate()); 10758 if (sequence != NULL) MakeCodeAgeSequenceYoung(sequence, isolate);
10759 } 10759 }
10760 10760
10761 10761
10762 void Code::MakeOlder(MarkingParity current_parity) { 10762 void Code::MakeOlder(MarkingParity current_parity) {
10763 byte* sequence = FindCodeAgeSequence(); 10763 byte* sequence = FindCodeAgeSequence();
10764 if (sequence != NULL) { 10764 if (sequence != NULL) {
10765 Age age; 10765 Age age;
10766 MarkingParity code_parity; 10766 MarkingParity code_parity;
10767 Isolate* isolate = GetIsolate(); 10767 Isolate* isolate = GetIsolate();
10768 GetCodeAgeAndParity(isolate, sequence, &age, &code_parity); 10768 GetCodeAgeAndParity(isolate, sequence, &age, &code_parity);
(...skipping 6070 matching lines...) Expand 10 before | Expand all | Expand 10 after
16839 Handle<DependentCode> codes = 16839 Handle<DependentCode> codes =
16840 DependentCode::Insert(handle(cell->dependent_code(), info->isolate()), 16840 DependentCode::Insert(handle(cell->dependent_code(), info->isolate()),
16841 DependentCode::kPropertyCellChangedGroup, 16841 DependentCode::kPropertyCellChangedGroup,
16842 info->object_wrapper()); 16842 info->object_wrapper());
16843 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); 16843 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes);
16844 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( 16844 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add(
16845 cell, info->zone()); 16845 cell, info->zone());
16846 } 16846 }
16847 16847
16848 } } // namespace v8::internal 16848 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698