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

Unified Diff: src/compiler/memory-optimizer.cc

Issue 2035413003: Revert of Provide a tagged allocation top pointer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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-stub-assembler.cc ('k') | src/crankshaft/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/memory-optimizer.cc
diff --git a/src/compiler/memory-optimizer.cc b/src/compiler/memory-optimizer.cc
index 420494840af90bc129580a6f47eeb65d1f7d926f..8c66347a6e1210494f0f8d372f4f468d211e4a92 100644
--- a/src/compiler/memory-optimizer.cc
+++ b/src/compiler/memory-optimizer.cc
@@ -146,7 +146,10 @@
top_address, jsgraph()->IntPtrConstant(0), top, effect, control);
// Compute the effective inner allocated address.
- value = graph()->NewNode(machine()->BitcastWordToTagged(), state->top());
+ value = graph()->NewNode(
+ machine()->BitcastWordToTagged(),
+ graph()->NewNode(machine()->IntAdd(), state->top(),
+ jsgraph()->IntPtrConstant(kHeapObjectTag)));
// Extend the allocation {group}.
group->Add(value);
@@ -195,6 +198,8 @@
}
vfalse = efalse = graph()->NewNode(allocate_operator_.get(), target,
size, efalse, if_false);
+ vfalse = graph()->NewNode(machine()->IntSub(), vfalse,
+ jsgraph()->IntPtrConstant(kHeapObjectTag));
}
control = graph()->NewNode(common()->Merge(2), if_true, if_false);
@@ -212,7 +217,10 @@
top_address, jsgraph()->IntPtrConstant(0), top, effect, control);
// Compute the initial object address.
- value = graph()->NewNode(machine()->BitcastWordToTagged(), value);
+ value = graph()->NewNode(
+ machine()->BitcastWordToTagged(),
+ graph()->NewNode(machine()->IntAdd(), value,
+ jsgraph()->IntPtrConstant(kHeapObjectTag)));
// Start a new allocation group.
AllocationGroup* group =
@@ -248,7 +256,10 @@
machine()->Store(StoreRepresentation(
MachineType::PointerRepresentation(), kNoWriteBarrier)),
top_address, jsgraph()->IntPtrConstant(0), new_top, etrue, if_true);
- vtrue = graph()->NewNode(machine()->BitcastWordToTagged(), top);
+ vtrue = graph()->NewNode(
+ machine()->BitcastWordToTagged(),
+ graph()->NewNode(machine()->IntAdd(), top,
+ jsgraph()->IntPtrConstant(kHeapObjectTag)));
}
Node* if_false = graph()->NewNode(common()->IfFalse(), branch);
« no previous file with comments | « src/code-stub-assembler.cc ('k') | src/crankshaft/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698