Revision: 4432
Author: [email protected]
Date: Thu Apr 15 08:07:46 2010
Log: Apply change 4431 to trunk
Review URL: http://codereview.chromium.org/1523026
http://code.google.com/p/v8/source/detail?r=4432

Modified:
 /trunk/src/ia32/macro-assembler-ia32.cc
 /trunk/src/version.cc
 /trunk/src/x64/macro-assembler-x64.cc

=======================================
--- /trunk/src/ia32/macro-assembler-ia32.cc     Mon Mar 22 07:44:04 2010
+++ /trunk/src/ia32/macro-assembler-ia32.cc     Thu Apr 15 08:07:46 2010
@@ -143,7 +143,17 @@

   InNewSpace(object, value, equal, &done);

-  if ((offset > 0) && (offset < Page::kMaxHeapObjectSize)) {
+  // The offset is relative to a tagged or untagged HeapObject pointer,
+  // so either offset or offset + kHeapObjectTag must be a
+  // multiple of kPointerSize.
+  ASSERT(IsAligned(offset, kPointerSize) ||
+         IsAligned(offset + kHeapObjectTag, kPointerSize));
+
+ // We use optimized write barrier code if the word being written to is not in
+  // a large object chunk or is in the first page of a large object chunk.
+  // We make sure that an offset is inside the right limits whether it is
+  // tagged or untagged.
+ if ((offset > 0) && (offset < Page::kMaxHeapObjectSize - kHeapObjectTag)) {
     // Compute the bit offset in the remembered set, leave it in 'value'.
     lea(value, Operand(object, offset));
     and_(value, Page::kPageAlignmentMask);
=======================================
--- /trunk/src/version.cc       Wed Apr 14 04:52:26 2010
+++ /trunk/src/version.cc       Thu Apr 15 08:07:46 2010
@@ -1,4 +1,4 @@
-// Copyright 2008 the V8 project authors. All rights reserved.
+// Copyright 2010 the V8 project authors. All rights reserved.
 // Redistribution and use in source and binary forms, with or without
 // modification, are permitted provided that the following conditions are
 // met:
@@ -35,7 +35,7 @@
 #define MAJOR_VERSION     2
 #define MINOR_VERSION     2
 #define BUILD_NUMBER      3
-#define PATCH_LEVEL       1
+#define PATCH_LEVEL       2
 #define CANDIDATE_VERSION false

 // Define SONAME to have the SCons build the put a specific SONAME into the
=======================================
--- /trunk/src/x64/macro-assembler-x64.cc       Wed Apr 14 02:36:28 2010
+++ /trunk/src/x64/macro-assembler-x64.cc       Thu Apr 15 08:07:46 2010
@@ -226,7 +226,17 @@
   cmpq(scratch, kScratchRegister);
   j(equal, &done);

-  if ((offset > 0) && (offset < Page::kMaxHeapObjectSize)) {
+  // The offset is relative to a tagged or untagged HeapObject pointer,
+  // so either offset or offset + kHeapObjectTag must be a
+  // multiple of kPointerSize.
+  ASSERT(IsAligned(offset, kPointerSize) ||
+         IsAligned(offset + kHeapObjectTag, kPointerSize));
+
+ // We use optimized write barrier code if the word being written to is not in
+  // a large object page, or is in the first "page" of a large object page.
+  // We make sure that an offset is inside the right limits whether it is
+  // tagged or untagged.
+ if ((offset > 0) && (offset < Page::kMaxHeapObjectSize - kHeapObjectTag)) {
     // Compute the bit offset in the remembered set, leave it in 'value'.
     lea(scratch, Operand(object, offset));
     ASSERT(is_int32(Page::kPageAlignmentMask));

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

To unsubscribe, reply using "remove me" as the subject.

Reply via email to