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

Unified Diff: src/hydrogen-instructions.h

Issue 1027463002: Revert "Merge old data and pointer space." (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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/heap/store-buffer-inl.h ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-instructions.h
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
index 8219f3ed2200af69a9e1bae3e97c179300f60b4f..5cf575c9e5efb91b38daab91bcf2368d856b7069 100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -5509,8 +5509,12 @@ class HAllocate FINAL : public HTemplateInstruction<2> {
return (flags_ & ALLOCATE_IN_NEW_SPACE) != 0;
}
- bool IsOldSpaceAllocation() const {
- return (flags_ & ALLOCATE_IN_OLD_SPACE) != 0;
+ bool IsOldDataSpaceAllocation() const {
+ return (flags_ & ALLOCATE_IN_OLD_DATA_SPACE) != 0;
+ }
+
+ bool IsOldPointerSpaceAllocation() const {
+ return (flags_ & ALLOCATE_IN_OLD_POINTER_SPACE) != 0;
}
bool MustAllocateDoubleAligned() const {
@@ -5543,7 +5547,8 @@ class HAllocate FINAL : public HTemplateInstruction<2> {
private:
enum Flags {
ALLOCATE_IN_NEW_SPACE = 1 << 0,
- ALLOCATE_IN_OLD_SPACE = 1 << 2,
+ ALLOCATE_IN_OLD_DATA_SPACE = 1 << 1,
+ ALLOCATE_IN_OLD_POINTER_SPACE = 1 << 2,
ALLOCATE_DOUBLE_ALIGNED = 1 << 3,
PREFILL_WITH_FILLER = 1 << 4,
CLEAR_NEXT_MAP_WORD = 1 << 5
@@ -5579,8 +5584,11 @@ class HAllocate FINAL : public HTemplateInstruction<2> {
static Flags ComputeFlags(PretenureFlag pretenure_flag,
InstanceType instance_type) {
- Flags flags = pretenure_flag == TENURED ? ALLOCATE_IN_OLD_SPACE
- : ALLOCATE_IN_NEW_SPACE;
+ Flags flags = pretenure_flag == TENURED
+ ? (Heap::TargetSpaceId(instance_type) == OLD_POINTER_SPACE
+ ? ALLOCATE_IN_OLD_POINTER_SPACE
+ : ALLOCATE_IN_OLD_DATA_SPACE)
+ : ALLOCATE_IN_NEW_SPACE;
if (instance_type == FIXED_DOUBLE_ARRAY_TYPE) {
flags = static_cast<Flags>(flags | ALLOCATE_DOUBLE_ALIGNED);
}
@@ -5622,7 +5630,10 @@ class HAllocate FINAL : public HTemplateInstruction<2> {
bool IsFoldable(HAllocate* allocate) {
return (IsNewSpaceAllocation() && allocate->IsNewSpaceAllocation()) ||
- (IsOldSpaceAllocation() && allocate->IsOldSpaceAllocation());
+ (IsOldDataSpaceAllocation() &&
+ allocate->IsOldDataSpaceAllocation()) ||
+ (IsOldPointerSpaceAllocation() &&
+ allocate->IsOldPointerSpaceAllocation());
}
void ClearNextMapWord(int offset);
« no previous file with comments | « src/heap/store-buffer-inl.h ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698