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

Unified Diff: src/objects.cc

Issue 16509005: Implemented function that returns code age. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 6512c607799dd34fd71e69aa8e656681ff3f5e42..9651b91c4556ab6cede3c0227ffd6f3c22ae45f4 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -10299,6 +10299,18 @@ byte* Code::FindCodeAgeSequence() {
}
+int Code::GetAge() {
+ byte* sequence = FindCodeAgeSequence();
+ if (sequence == NULL) {
+ return Code::kNoAge;
+ }
+ Age age;
+ MarkingParity parity;
+ GetCodeAgeAndParity(sequence, &age, &parity);
+ return age;
+}
+
+
void Code::GetCodeAgeAndParity(Code* code, Age* age,
MarkingParity* parity) {
Isolate* isolate = Isolate::Current();
« no previous file with comments | « src/objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698