Commit 6ca8f782 authored by yangguo@chromium.org's avatar yangguo@chromium.org

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
parent c9049c03
......@@ -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) {
......
......@@ -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();
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment