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

Side by Side Diff: src/objects.cc

Issue 642283002: Reset code age when serializing code objects. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 months 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 | Annotate | Revision Log
« 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 10445 matching lines...) Expand 10 before | Expand all | Expand 10 after
10456 // Treat that's never been executed as old immediately. 10456 // Treat that's never been executed as old immediately.
10457 age = Code::kIsOldCodeAge; 10457 age = Code::kIsOldCodeAge;
10458 } else if (age == Code::kExecutedOnceCodeAge) { 10458 } else if (age == Code::kExecutedOnceCodeAge) {
10459 // Pre-age code that has only been executed once. 10459 // Pre-age code that has only been executed once.
10460 age = Code::kPreAgedCodeAge; 10460 age = Code::kPreAgedCodeAge;
10461 } 10461 }
10462 return age; 10462 return age;
10463 } 10463 }
10464 10464
10465 10465
10466 void Code::MakeYoung() {
10467 byte* sequence = FindCodeAgeSequence();
10468 if (sequence != NULL) MakeCodeAgeSequenceYoung(sequence, GetIsolate());
10469 }
10470
10471
10466 void Code::MakeOlder(MarkingParity current_parity) { 10472 void Code::MakeOlder(MarkingParity current_parity) {
10467 byte* sequence = FindCodeAgeSequence(); 10473 byte* sequence = FindCodeAgeSequence();
10468 if (sequence != NULL) { 10474 if (sequence != NULL) {
10469 Age age; 10475 Age age;
10470 MarkingParity code_parity; 10476 MarkingParity code_parity;
10471 Isolate* isolate = GetIsolate(); 10477 Isolate* isolate = GetIsolate();
10472 GetCodeAgeAndParity(isolate, sequence, &age, &code_parity); 10478 GetCodeAgeAndParity(isolate, sequence, &age, &code_parity);
10473 age = EffectiveAge(age); 10479 age = EffectiveAge(age);
10474 if (age != kLastCodeAge && code_parity != current_parity) { 10480 if (age != kLastCodeAge && code_parity != current_parity) {
10475 PatchPlatformCodeAge(isolate, 10481 PatchPlatformCodeAge(isolate,
(...skipping 5906 matching lines...) Expand 10 before | Expand all | Expand 10 after
16382 Handle<DependentCode> codes = 16388 Handle<DependentCode> codes =
16383 DependentCode::Insert(handle(cell->dependent_code(), info->isolate()), 16389 DependentCode::Insert(handle(cell->dependent_code(), info->isolate()),
16384 DependentCode::kPropertyCellChangedGroup, 16390 DependentCode::kPropertyCellChangedGroup,
16385 info->object_wrapper()); 16391 info->object_wrapper());
16386 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); 16392 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes);
16387 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( 16393 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add(
16388 cell, info->zone()); 16394 cell, info->zone());
16389 } 16395 }
16390 16396
16391 } } // namespace v8::internal 16397 } } // 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