Chromium Code Reviews| Index: src/arm/macro-assembler-arm.h |
| diff --git a/src/arm/macro-assembler-arm.h b/src/arm/macro-assembler-arm.h |
| index d26eda7f8578cd7068b02498a815f3d7efeafa4a..5496b7d407910fef8ca4a4c8f3f85f241bf49e8a 100644 |
| --- a/src/arm/macro-assembler-arm.h |
| +++ b/src/arm/macro-assembler-arm.h |
| @@ -660,19 +660,26 @@ class MacroAssembler: public Assembler { |
| // --------------------------------------------------------------------------- |
| // Allocation support |
| - // Allocate an object in new space. The object_size is specified |
| - // either in bytes or in words if the allocation flag SIZE_IN_WORDS |
| - // is passed. If the new space is exhausted control continues at the |
| - // gc_required label. The allocated object is returned in result. If |
| - // the flag tag_allocated_object is true the result is tagged as as |
| - // a heap object. All registers are clobbered also when control |
| - // continues at the gc_required label. |
| - void AllocateInNewSpace(int object_size, |
| - Register result, |
| - Register scratch1, |
| - Register scratch2, |
| - Label* gc_required, |
| - AllocationFlags flags); |
| + // Allocate an object in new space or old pointer space. The object_size is |
| + // specified either in bytes or in words if the allocation flag SIZE_IN_WORDS |
| + // is passed. If the space is exhausted control continues at the gc_required |
| + // label. The allocated object is returned in result. If the flag |
| + // tag_allocated_object is true the result is tagged as as a heap object. |
| + // All registers are clobbered also when control continues at the gc_required |
| + // label. |
| + enum AllocationTarget { |
| + NEW_SPACE, |
| + OLD_POINTER_SPACE |
|
danno
2013/03/05 12:18:18
In general, is there any way to combine Allocation
Hannes Payer (out of office)
2013/03/11 17:16:31
Done.
|
| + }; |
| + |
| + void Allocate(int object_size, |
| + Register result, |
| + Register scratch1, |
| + Register scratch2, |
| + Label* gc_required, |
| + AllocationFlags flags, |
| + AllocationTarget target); |
| + |
| void AllocateInNewSpace(Register object_size, |
| Register result, |
| Register scratch1, |
| @@ -680,6 +687,9 @@ class MacroAssembler: public Assembler { |
| Label* gc_required, |
| AllocationFlags flags); |
| + ExternalReference GetTopAddress(AllocationTarget target); |
| + ExternalReference GetLimitAddress(AllocationTarget target); |
| + |
| // Undo allocation in new space. The object passed and objects allocated after |
| // it will no longer be allocated. The caller must make sure that no pointers |
| // are left to the object(s) no longer allocated as they would be invalid when |