Reviewers: Vyacheslav Egorov,

Description:
Fix code age assignment.

We currently or the value with the current value, i.e., we will never
reset it (resulting in 0,1,3,5,5,5,5,5,5,... as age)

Please review this at http://codereview.chromium.org/6969038/

SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/

Affected files:
  M     src/objects-inl.h


Index: src/objects-inl.h
===================================================================
--- src/objects-inl.h   (revision 7871)
+++ src/objects-inl.h   (working copy)
@@ -3325,7 +3325,8 @@


 void SharedFunctionInfo::set_code_age(int code_age) {
-  set_compiler_hints(compiler_hints() |
+  int clear_mask = ~(kCodeAgeMask << kCodeAgeShift);
+  set_compiler_hints((compiler_hints() & clear_mask) |
                      ((code_age & kCodeAgeMask) << kCodeAgeShift));
 }



--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to