Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(479)

Unified Diff: src/ia32/macro-assembler-ia32.h

Issue 12314155: Allow direct allocation in old pointer space. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/ia32/macro-assembler-ia32.h
diff --git a/src/ia32/macro-assembler-ia32.h b/src/ia32/macro-assembler-ia32.h
index 8c893dcdaffe5692101d86bf94e20b2450fb4b2c..395eb212e188bd28ec2c0f819b3a6061a24de2d9 100644
--- a/src/ia32/macro-assembler-ia32.h
+++ b/src/ia32/macro-assembler-ia32.h
@@ -550,22 +550,28 @@ class MacroAssembler: public Assembler {
// ---------------------------------------------------------------------------
// Allocation support
- // Allocate an object in new space. If the new space is exhausted control
- // continues at the gc_required label. The allocated object is returned in
- // result and end of the new object is returned in result_end. The register
- // scratch can be passed as no_reg in which case an additional object
- // reference will be added to the reloc info. The returned pointers in result
- // and result_end have not yet been tagged as heap objects. If
- // result_contains_top_on_entry is true the content of result is known to be
- // the allocation top on entry (could be result_end from a previous call to
- // AllocateInNewSpace). If result_contains_top_on_entry is true scratch
+ // Allocate an object in new space or old pointer space. If the given space
+ // is exhausted control continues at the gc_required label. The allocated
+ // object is returned in result and end of the new object is returned in
+ // result_end. The register scratch can be passed as no_reg in which case
+ // an additional object reference will be added to the reloc info. The
+ // returned pointers in result and result_end have not yet been tagged as
+ // heap objects. If result_contains_top_on_entry is true the content of
+ // result is known to be the allocation top on entry (could be result_end
+ // from a previous call). If result_contains_top_on_entry is true scratch
// should be no_reg as it is never used.
- void AllocateInNewSpace(int object_size,
- Register result,
- Register result_end,
- Register scratch,
- Label* gc_required,
- AllocationFlags flags);
+ enum AllocationTarget {
+ NEW_SPACE,
+ OLD_POINTER_SPACE
+ };
+
+ void Allocate(int object_size,
+ Register result,
+ Register result_end,
+ Register scratch,
+ Label* gc_required,
+ AllocationFlags flags,
+ AllocationTarget target);
void AllocateInNewSpace(int header_size,
ScaleFactor element_size,
@@ -892,11 +898,18 @@ class MacroAssembler: public Assembler {
void LeaveExitFrameEpilogue();
+ ExternalReference GetTopAddress(AllocationTarget target);
+ ExternalReference GetLimitAddress(AllocationTarget target);
+
// Allocation support helpers.
void LoadAllocationTopHelper(Register result,
Register scratch,
- AllocationFlags flags);
- void UpdateAllocationTopHelper(Register result_end, Register scratch);
+ AllocationFlags flags,
+ AllocationTarget target);
+
+ void UpdateAllocationTopHelper(Register result_end,
+ Register scratch,
+ AllocationTarget target);
// Helper for PopHandleScope. Allowed to perform a GC and returns
// NULL if gc_allowed. Does not perform a GC if !gc_allowed, and

Powered by Google App Engine
This is Rietveld 408576698