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

Unified Diff: src/crankshaft/arm64/lithium-codegen-arm64.cc

Issue 1459083003: Fix object initialization when slack tracking for it's map is still enabled. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@toon
Patch Set: Fixed second nit in all platforms Created 5 years, 1 month 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/arm64/macro-assembler-arm64.cc ('k') | src/ia32/builtins-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/arm64/lithium-codegen-arm64.cc
diff --git a/src/crankshaft/arm64/lithium-codegen-arm64.cc b/src/crankshaft/arm64/lithium-codegen-arm64.cc
index 5c90beb68ef79d5b81d0625e5073b6941ba1baf9..61413192b7a1ec03a16e8e08a0a35b47f8752577 100644
--- a/src/crankshaft/arm64/lithium-codegen-arm64.cc
+++ b/src/crankshaft/arm64/lithium-codegen-arm64.cc
@@ -1555,20 +1555,20 @@ void LCodeGen::DoAllocate(LAllocate* instr) {
__ Bind(deferred->exit());
if (instr->hydrogen()->MustPrefillWithFiller()) {
- Register filler_count = temp1;
- Register filler = temp2;
- Register untagged_result = ToRegister(instr->temp3());
+ Register start = temp1;
+ Register end = temp2;
+ Register filler = ToRegister(instr->temp3());
+
+ __ Sub(start, result, kHeapObjectTag);
if (instr->size()->IsConstantOperand()) {
int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
- __ Mov(filler_count, size / kPointerSize);
+ __ Add(end, start, size);
} else {
- __ Lsr(filler_count.W(), ToRegister32(instr->size()), kPointerSizeLog2);
+ __ Add(end, start, ToRegister(instr->size()));
}
-
- __ Sub(untagged_result, result, kHeapObjectTag);
- __ Mov(filler, Operand(isolate()->factory()->one_pointer_filler_map()));
- __ FillFields(untagged_result, filler_count, filler);
+ __ LoadRoot(filler, Heap::kOnePointerFillerMapRootIndex);
+ __ InitializeFieldsWithFiller(start, end, filler);
} else {
DCHECK(instr->temp3() == NULL);
}
« no previous file with comments | « src/arm64/macro-assembler-arm64.cc ('k') | src/ia32/builtins-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698