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

Side by Side Diff: src/arm/lithium-codegen-arm.cc

Issue 19723004: Prefill pre-allocated memory of folded allocation with one pointer fillers when heap verifier is on. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/hydrogen-instructions.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 5351 matching lines...) Expand 10 before | Expand all | Expand 10 after
5362 Register size = ToRegister(instr->size()); 5362 Register size = ToRegister(instr->size());
5363 __ Allocate(size, 5363 __ Allocate(size,
5364 result, 5364 result,
5365 scratch, 5365 scratch,
5366 scratch2, 5366 scratch2,
5367 deferred->entry(), 5367 deferred->entry(),
5368 flags); 5368 flags);
5369 } 5369 }
5370 5370
5371 __ bind(deferred->exit()); 5371 __ bind(deferred->exit());
5372
5373 if (instr->hydrogen()->MustPrefillWithFiller()) {
5374 if (instr->size()->IsConstantOperand()) {
5375 int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
5376 __ mov(scratch, Operand(size));
5377 } else {
5378 scratch = ToRegister(instr->size());
5379 }
5380 __ sub(scratch, scratch, Operand(kPointerSize));
5381 __ sub(result, result, Operand(kHeapObjectTag));
5382 Label loop;
5383 __ bind(&loop);
5384 __ mov(scratch2, Operand(isolate()->factory()->one_pointer_filler_map()));
5385 __ str(scratch2, MemOperand(result, scratch));
5386 __ sub(scratch, scratch, Operand(kPointerSize));
5387 __ cmp(scratch, Operand(0));
5388 __ b(ge, &loop);
5389 __ add(result, result, Operand(kHeapObjectTag));
5390 }
5372 } 5391 }
5373 5392
5374 5393
5375 void LCodeGen::DoDeferredAllocate(LAllocate* instr) { 5394 void LCodeGen::DoDeferredAllocate(LAllocate* instr) {
5376 Register result = ToRegister(instr->result()); 5395 Register result = ToRegister(instr->result());
5377 5396
5378 // TODO(3095996): Get rid of this. For now, we need to make the 5397 // TODO(3095996): Get rid of this. For now, we need to make the
5379 // result register contain a valid pointer because it is already 5398 // result register contain a valid pointer because it is already
5380 // contained in the register pointer map. 5399 // contained in the register pointer map.
5381 __ mov(result, Operand(Smi::FromInt(0))); 5400 __ mov(result, Operand(Smi::FromInt(0)));
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
5807 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); 5826 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index));
5808 __ ldr(result, FieldMemOperand(scratch, 5827 __ ldr(result, FieldMemOperand(scratch,
5809 FixedArray::kHeaderSize - kPointerSize)); 5828 FixedArray::kHeaderSize - kPointerSize));
5810 __ bind(&done); 5829 __ bind(&done);
5811 } 5830 }
5812 5831
5813 5832
5814 #undef __ 5833 #undef __
5815 5834
5816 } } // namespace v8::internal 5835 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698