Index: src/x64/macro-assembler-x64.h |
=================================================================== |
--- src/x64/macro-assembler-x64.h (revision 2828) |
+++ src/x64/macro-assembler-x64.h (working copy) |
@@ -1,4 +1,4 @@ |
-// Copyright 2006-2008 the V8 project authors. All rights reserved. |
+// Copyright 2009 the V8 project authors. All rights reserved. |
// Redistribution and use in source and binary forms, with or without |
// modification, are permitted provided that the following conditions are |
// met: |
@@ -61,6 +61,18 @@ |
}; |
+// Flags used for the AllocateObjectInNewSpace functions. |
+enum AllocationFlags { |
+ // No special flags. |
+ NO_ALLOCATION_FLAGS = 0, |
+ // Return the pointer to the allocated already tagged as a heap object. |
+ TAG_OBJECT = 1 << 0, |
+ // The content of the result register already contains the allocation top in |
+ // new space. |
+ RESULT_CONTAINS_TOP = 1 << 1 |
+}; |
+ |
+ |
// MacroAssembler implements a collection of frequently used macros. |
class MacroAssembler: public Assembler { |
public: |
@@ -244,7 +256,7 @@ |
Register result_end, |
Register scratch, |
Label* gc_required, |
- bool result_contains_top_on_entry); |
+ AllocationFlags flags); |
void AllocateObjectInNewSpace(int header_size, |
ScaleFactor element_size, |
@@ -253,14 +265,14 @@ |
Register result_end, |
Register scratch, |
Label* gc_required, |
- bool result_contains_top_on_entry); |
+ AllocationFlags flags); |
void AllocateObjectInNewSpace(Register object_size, |
Register result, |
Register result_end, |
Register scratch, |
Label* gc_required, |
- bool result_contains_top_on_entry); |
+ AllocationFlags flags); |
// Undo allocation in new space. The object passed and objects allocated after |
// it will no longer be allocated. Make sure that no pointers are left to the |
@@ -392,7 +404,7 @@ |
void LoadAllocationTopHelper(Register result, |
Register result_end, |
Register scratch, |
- bool result_contains_top_on_entry); |
+ AllocationFlags flags); |
void UpdateAllocationTopHelper(Register result_end, Register scratch); |
}; |