Index: src/compiler/code-stub-assembler.h |
diff --git a/src/compiler/code-stub-assembler.h b/src/compiler/code-stub-assembler.h |
index a12414b3d9f42e82f7100962e87b940b3dc6ed34..85418a9150a6eaba51a7cec35752e6327a1e24f4 100644 |
--- a/src/compiler/code-stub-assembler.h |
+++ b/src/compiler/code-stub-assembler.h |
@@ -111,6 +111,14 @@ class CodeStubAssembler { |
Impl* impl_; |
}; |
+ enum AllocationFlag : uint8_t { |
+ kNone = 0, |
+ kDoubleAlignment = 1, |
+ kPretenured = 1 << 1 |
+ }; |
+ |
+ typedef base::Flags<AllocationFlag> AllocationFlags; |
+ |
// =========================================================================== |
// Base Assembler |
// =========================================================================== |
@@ -241,6 +249,9 @@ class CodeStubAssembler { |
int additional_offset = 0); |
Node* LoadFixedArrayElementConstantIndex(Node* object, int index); |
+ // Allocate an object of the given size. |
+ Node* Allocate(int size, AllocationFlags flags); |
+ |
// Store an array element to a FixedArray. |
Node* StoreFixedArrayElementNoWriteBarrier(Node* object, Node* index, |
Node* value); |
@@ -272,6 +283,11 @@ class CodeStubAssembler { |
Node* SmiShiftBitsConstant(); |
+ Node* AllocateRawAligned(Node* size_in_bytes, AllocationFlags flags, |
+ Node* top_address, Node* limit_address); |
+ Node* AllocateRawUnaligned(Node* size_in_bytes, AllocationFlags flags, |
+ Node* top_adddress, Node* limit_address); |
+ |
base::SmartPointer<RawMachineAssembler> raw_assembler_; |
Code::Flags flags_; |
const char* name_; |
@@ -281,6 +297,8 @@ class CodeStubAssembler { |
DISALLOW_COPY_AND_ASSIGN(CodeStubAssembler); |
}; |
+DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); |
+ |
class CodeStubAssembler::Label { |
public: |
explicit Label(CodeStubAssembler* assembler); |