Revision: 4433
Author: [email protected]
Date: Fri Apr 16 00:49:54 2010
Log: Merge change 4431 to V8 2.0
Review URL: http://codereview.chromium.org/1618024
http://code.google.com/p/v8/source/detail?r=4433

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

=======================================
--- /branches/2.0/src/ia32/macro-assembler-ia32.cc      Tue Feb  2 00:41:56 2010
+++ /branches/2.0/src/ia32/macro-assembler-ia32.cc      Fri Apr 16 00:49:54 2010
@@ -176,7 +176,17 @@
     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 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);
=======================================
--- /branches/2.0/src/version.cc        Tue Feb  2 05:48:49 2010
+++ /branches/2.0/src/version.cc        Fri Apr 16 00:49:54 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     0
 #define BUILD_NUMBER      6
-#define PATCH_LEVEL       6
+#define PATCH_LEVEL       7
 #define CANDIDATE_VERSION false

 // Define SONAME to have the SCons build the put a specific SONAME into the
=======================================
--- /branches/2.0/src/x64/macro-assembler-x64.cc        Tue Feb  2 00:41:56 2010
+++ /branches/2.0/src/x64/macro-assembler-x64.cc        Fri Apr 16 00:49:54 2010
@@ -208,7 +208,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

Reply via email to