Index: src/mark-compact.cc |
=================================================================== |
--- src/mark-compact.cc (revision 2217) |
+++ src/mark-compact.cc (working copy) |
@@ -949,11 +949,15 @@ |
// Try to promote all objects in new space. Heap numbers and sequential |
// strings are promoted to the code space, all others to the old space. |
Mads Ager (chromium)
2009/06/18 14:01:20
Not your code, but this comment seems wrong. Heap
|
inline Object* MCAllocateFromNewSpace(HeapObject* object, int object_size) { |
- OldSpace* target_space = Heap::TargetSpace(object); |
- ASSERT(target_space == Heap::old_pointer_space() || |
- target_space == Heap::old_data_space()); |
- Object* forwarded = target_space->MCAllocateRaw(object_size); |
- |
+ Object* forwarded ; |
Mads Ager (chromium)
2009/06/18 14:01:20
Remove space before ';'.
|
+ if (object_size > Heap::MaxObjectSizeInPagedSpace()) { |
+ forwarded = Failure::Exception(); |
+ } else { |
+ OldSpace* target_space = Heap::TargetSpace(object); |
+ ASSERT(target_space == Heap::old_pointer_space() || |
+ target_space == Heap::old_data_space()); |
+ forwarded = target_space->MCAllocateRaw(object_size); |
+ } |
if (forwarded->IsFailure()) { |
forwarded = Heap::new_space()->MCAllocateRaw(object_size); |
} |
@@ -1674,7 +1678,7 @@ |
ASSERT(space->MCSpaceOffsetForAddress(new_addr) <= |
space->MCSpaceOffsetForAddress(obj->address())); |
- space->MCAdjustRelocationEnd(new_addr, obj_size); |
+ reinterpret_cast<OldSpace*>(space)->MCAdjustRelocationEnd(new_addr, obj_size); |
Mads Ager (chromium)
2009/06/18 14:01:20
space is already has type OldSpace*, so there shou
|
#ifdef DEBUG |
if (FLAG_gc_verbose) { |