Index: src/macro-assembler.h |
diff --git a/src/macro-assembler.h b/src/macro-assembler.h |
index 9e7112369e570c1a87d43b52428de117c89c2c52..55dccfa95041330db89872895801f049f54fcfbf 100644 |
--- a/src/macro-assembler.h |
+++ b/src/macro-assembler.h |
@@ -49,7 +49,9 @@ enum AllocationFlags { |
// words instead of bytes. |
SIZE_IN_WORDS = 1 << 2, |
// Align the allocation to a multiple of kDoubleSize |
- DOUBLE_ALIGNMENT = 1 << 3 |
+ DOUBLE_ALIGNMENT = 1 << 3, |
+ // Directly allocate in old pointer space |
+ PRETENURE_OLD_POINTER_SPACE = 1 << 4 |
}; |
@@ -168,6 +170,26 @@ class Comment { |
#endif // DEBUG |
+ |
+class AllocationUtils { |
+ public: |
+ static ExternalReference GetAllocationTopReference( |
+ Isolate* isolate, AllocationFlags flags) { |
+ return ((flags & PRETENURE_OLD_POINTER_SPACE) != 0) ? |
+ ExternalReference::old_pointer_space_allocation_top_address(isolate) : |
+ ExternalReference::new_space_allocation_top_address(isolate); |
+ } |
+ |
+ |
+ static ExternalReference GetAllocationLimitReference( |
+ Isolate* isolate, AllocationFlags flags) { |
+ return ((flags & PRETENURE_OLD_POINTER_SPACE) != 0) ? |
+ ExternalReference::old_pointer_space_allocation_limit_address(isolate) : |
+ ExternalReference::new_space_allocation_limit_address(isolate); |
+ } |
+}; |
+ |
+ |
} } // namespace v8::internal |
#endif // V8_MACRO_ASSEMBLER_H_ |