Reset code age when serializing code objects.

R=mvstanton@chromium.org

Review URL: https://codereview.chromium.org/642283002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24523 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
yangguo@chromium.org 2014-10-10 10:51:34 +00:00
parent c9049c0325
commit 6ca8f782aa
3 changed files with 8 additions and 0 deletions

View File

@ -10463,6 +10463,12 @@ static Code::Age EffectiveAge(Code::Age age) {
}
void Code::MakeYoung() {
byte* sequence = FindCodeAgeSequence();
if (sequence != NULL) MakeCodeAgeSequenceYoung(sequence, GetIsolate());
}
void Code::MakeOlder(MarkingParity current_parity) {
byte* sequence = FindCodeAgeSequence();
if (sequence != NULL) {

View File

@ -5310,6 +5310,7 @@ class Code: public HeapObject {
// compilation stub.
static void MakeCodeAgeSequenceYoung(byte* sequence, Isolate* isolate);
static void MarkCodeAsExecuted(byte* sequence, Isolate* isolate);
void MakeYoung();
void MakeOlder(MarkingParity);
static bool IsYoungSequence(Isolate* isolate, byte* sequence);
bool IsOld();

View File

@ -1991,6 +1991,7 @@ void CodeSerializer::SerializeObject(Object* o, HowToCode how_to_code,
Code* lazy = *isolate()->builtins()->CompileLazy();
SerializeBuiltin(lazy, how_to_code, where_to_point);
} else {
code_object->MakeYoung();
SerializeHeapObject(code_object, how_to_code, where_to_point);
}
return;