Version 2.2.3
Added stack command and mem command to ARM simulator debugger.
Fixed scons snapshot and ARM build, and Windows X64 build issues.
Performance improvements on all platforms.
git-svn-id: http://v8.googlecode.com/svn/trunk@4410 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/src/heap-inl.h b/src/heap-inl.h
index ba4850e..bf9c535 100644
--- a/src/heap-inl.h
+++ b/src/heap-inl.h
@@ -240,6 +240,27 @@
}
+void Heap::MoveBlock(Object** dst, Object** src, size_t byte_size) {
+ ASSERT(IsAligned<size_t>(byte_size, kPointerSize));
+
+ int size_in_words = byte_size / kPointerSize;
+
+ if ((dst < src) || (dst >= (src + size_in_words))) {
+ ASSERT((dst >= (src + size_in_words)) ||
+ ((OffsetFrom(reinterpret_cast<Address>(src)) -
+ OffsetFrom(reinterpret_cast<Address>(dst))) >= kPointerSize));
+
+ Object** end = src + size_in_words;
+
+ while (src != end) {
+ *dst++ = *src++;
+ }
+ } else {
+ memmove(dst, src, byte_size);
+ }
+}
+
+
void Heap::ScavengeObject(HeapObject** p, HeapObject* object) {
ASSERT(InFromSpace(object));