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

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

Issue 2028633002: Provide a tagged allocation top pointer. Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: WIP: adding a few tests. 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 8c66347a6e1210494f0f8d372f4f468d211e4a92..420494840af90bc129580a6f47eeb65d1f7d926f 100644
--- a/src/compiler/memory-optimizer.cc
+++ b/src/compiler/memory-optimizer.cc
@@ -146,10 +146,7 @@ void MemoryOptimizer::VisitAllocate(Node* node, AllocationState const* state) {
top_address, jsgraph()->IntPtrConstant(0), top, effect, control);
// Compute the effective inner allocated address.
- value = graph()->NewNode(
- machine()->BitcastWordToTagged(),
- graph()->NewNode(machine()->IntAdd(), state->top(),
- jsgraph()->IntPtrConstant(kHeapObjectTag)));
+ value = graph()->NewNode(machine()->BitcastWordToTagged(), state->top());
// Extend the allocation {group}.
group->Add(value);
@@ -198,8 +195,6 @@ void MemoryOptimizer::VisitAllocate(Node* node, AllocationState const* state) {
}
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);
@@ -217,10 +212,7 @@ void MemoryOptimizer::VisitAllocate(Node* node, AllocationState const* state) {
top_address, jsgraph()->IntPtrConstant(0), top, effect, control);
// Compute the initial object address.
- value = graph()->NewNode(
- machine()->BitcastWordToTagged(),
- graph()->NewNode(machine()->IntAdd(), value,
- jsgraph()->IntPtrConstant(kHeapObjectTag)));
+ value = graph()->NewNode(machine()->BitcastWordToTagged(), value);
// Start a new allocation group.
AllocationGroup* group =
@@ -256,10 +248,7 @@ void MemoryOptimizer::VisitAllocate(Node* node, AllocationState const* state) {
machine()->Store(StoreRepresentation(
MachineType::PointerRepresentation(), kNoWriteBarrier)),
top_address, jsgraph()->IntPtrConstant(0), new_top, etrue, if_true);
- vtrue = graph()->NewNode(
- machine()->BitcastWordToTagged(),
- graph()->NewNode(machine()->IntAdd(), top,
- jsgraph()->IntPtrConstant(kHeapObjectTag)));
+ vtrue = graph()->NewNode(machine()->BitcastWordToTagged(), top);
}
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