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

Unified Diff: src/compiler/code-stub-assembler.h

Issue 1735803003: [turbofan] Adds an Allocate macro to the CodeStubAssembler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Update. Created 4 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
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | src/compiler/code-stub-assembler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | src/compiler/code-stub-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698