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

Unified Diff: src/code-stub-assembler.cc

Issue 2028633002: Provide a tagged allocation top pointer. Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Update Created 4 years, 7 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
Index: src/code-stub-assembler.cc
diff --git a/src/code-stub-assembler.cc b/src/code-stub-assembler.cc
index 9aa67811cd6733900a64535e097cdee9448d6fe8..5dbf000c9286a012383f291f6699f1e793ab6f6f 100644
--- a/src/code-stub-assembler.cc
+++ b/src/code-stub-assembler.cc
@@ -367,9 +367,7 @@ Node* CodeStubAssembler::AllocateRawUnaligned(Node* size_in_bytes,
Node* no_runtime_result = top;
StoreNoWriteBarrier(MachineType::PointerRepresentation(), top_address,
new_top);
- no_runtime_result = BitcastWordToTagged(
- IntPtrAdd(no_runtime_result, IntPtrConstant(kHeapObjectTag)));
- result.Bind(no_runtime_result);
+ result.Bind(BitcastWordToTagged(no_runtime_result));
Goto(&merge_runtime);
Bind(&merge_runtime);
@@ -387,8 +385,9 @@ Node* CodeStubAssembler::AllocateRawAligned(Node* size_in_bytes,
if (flags & kDoubleAlignment) {
// TODO(epertoso): Simd128 alignment.
Label aligned(this), not_aligned(this), merge(this, &adjusted_size);
- Branch(WordAnd(top, IntPtrConstant(kDoubleAlignmentMask)), &not_aligned,
- &aligned);
+ Branch(WordAnd(IntPtrSub(top, IntPtrConstant(kHeapObjectTag)),
+ IntPtrConstant(kDoubleAlignmentMask)),
+ &not_aligned, &aligned);
Bind(&not_aligned);
Node* not_aligned_size =

Powered by Google App Engine
This is Rietveld 408576698