OLD | NEW |
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 5305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5316 Register size = ToRegister(instr->size()); | 5316 Register size = ToRegister(instr->size()); |
5317 __ Allocate(size, | 5317 __ Allocate(size, |
5318 result, | 5318 result, |
5319 scratch, | 5319 scratch, |
5320 scratch2, | 5320 scratch2, |
5321 deferred->entry(), | 5321 deferred->entry(), |
5322 flags); | 5322 flags); |
5323 } | 5323 } |
5324 | 5324 |
5325 __ bind(deferred->exit()); | 5325 __ bind(deferred->exit()); |
| 5326 |
| 5327 if (instr->hydrogen()->MustPrefillWithFiller()) { |
| 5328 if (instr->size()->IsConstantOperand()) { |
| 5329 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); |
| 5330 __ li(scratch, Operand(size)); |
| 5331 } else { |
| 5332 scratch = ToRegister(instr->size()); |
| 5333 } |
| 5334 __ Subu(scratch, scratch, Operand(kPointerSize)); |
| 5335 __ Subu(result, result, Operand(kHeapObjectTag)); |
| 5336 Label loop; |
| 5337 __ bind(&loop); |
| 5338 __ li(scratch2, Operand(isolate()->factory()->one_pointer_filler_map())); |
| 5339 __ Addu(at, result, Operand(scratch)); |
| 5340 __ sw(scratch2, MemOperand(at)); |
| 5341 __ Subu(scratch, scratch, Operand(kPointerSize)); |
| 5342 __ Branch(&loop, ge, scratch, Operand(zero_reg)); |
| 5343 __ Addu(result, result, Operand(kHeapObjectTag)); |
| 5344 } |
5326 } | 5345 } |
5327 | 5346 |
5328 | 5347 |
5329 void LCodeGen::DoDeferredAllocate(LAllocate* instr) { | 5348 void LCodeGen::DoDeferredAllocate(LAllocate* instr) { |
5330 Register result = ToRegister(instr->result()); | 5349 Register result = ToRegister(instr->result()); |
5331 | 5350 |
5332 // TODO(3095996): Get rid of this. For now, we need to make the | 5351 // TODO(3095996): Get rid of this. For now, we need to make the |
5333 // result register contain a valid pointer because it is already | 5352 // result register contain a valid pointer because it is already |
5334 // contained in the register pointer map. | 5353 // contained in the register pointer map. |
5335 __ mov(result, zero_reg); | 5354 __ mov(result, zero_reg); |
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5802 __ Subu(scratch, result, scratch); | 5821 __ Subu(scratch, result, scratch); |
5803 __ lw(result, FieldMemOperand(scratch, | 5822 __ lw(result, FieldMemOperand(scratch, |
5804 FixedArray::kHeaderSize - kPointerSize)); | 5823 FixedArray::kHeaderSize - kPointerSize)); |
5805 __ bind(&done); | 5824 __ bind(&done); |
5806 } | 5825 } |
5807 | 5826 |
5808 | 5827 |
5809 #undef __ | 5828 #undef __ |
5810 | 5829 |
5811 } } // namespace v8::internal | 5830 } } // namespace v8::internal |
OLD | NEW |