OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved.7 | 1 // Copyright 2012 the V8 project authors. All rights reserved.7 |
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 5123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5134 if (instr->hydrogen()->IsOldSpaceAllocation()) { | 5134 if (instr->hydrogen()->IsOldSpaceAllocation()) { |
5135 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); | 5135 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); |
5136 allocation_flags = static_cast<AllocationFlags>(flags | PRETENURE); | 5136 allocation_flags = static_cast<AllocationFlags>(flags | PRETENURE); |
5137 } | 5137 } |
5138 // If the allocation folding dominator allocate triggered a GC, allocation | 5138 // If the allocation folding dominator allocate triggered a GC, allocation |
5139 // happend in the runtime. We have to reset the top pointer to virtually | 5139 // happend in the runtime. We have to reset the top pointer to virtually |
5140 // undo the allocation. | 5140 // undo the allocation. |
5141 ExternalReference allocation_top = | 5141 ExternalReference allocation_top = |
5142 AllocationUtils::GetAllocationTopReference(isolate(), allocation_flags); | 5142 AllocationUtils::GetAllocationTopReference(isolate(), allocation_flags); |
5143 Register top_address = scratch0(); | 5143 Register top_address = scratch0(); |
| 5144 __ Subu(v0, v0, Operand(kHeapObjectTag)); |
5144 __ li(top_address, Operand(allocation_top)); | 5145 __ li(top_address, Operand(allocation_top)); |
5145 __ sw(v0, MemOperand(top_address)); | 5146 __ sw(v0, MemOperand(top_address)); |
| 5147 __ Addu(v0, v0, Operand(kHeapObjectTag)); |
5146 } | 5148 } |
5147 } | 5149 } |
5148 | 5150 |
5149 void LCodeGen::DoFastAllocate(LFastAllocate* instr) { | 5151 void LCodeGen::DoFastAllocate(LFastAllocate* instr) { |
5150 DCHECK(instr->hydrogen()->IsAllocationFolded()); | 5152 DCHECK(instr->hydrogen()->IsAllocationFolded()); |
5151 DCHECK(!instr->hydrogen()->IsAllocationFoldingDominator()); | 5153 DCHECK(!instr->hydrogen()->IsAllocationFoldingDominator()); |
5152 Register result = ToRegister(instr->result()); | 5154 Register result = ToRegister(instr->result()); |
5153 Register scratch1 = ToRegister(instr->temp1()); | 5155 Register scratch1 = ToRegister(instr->temp1()); |
5154 Register scratch2 = ToRegister(instr->temp2()); | 5156 Register scratch2 = ToRegister(instr->temp2()); |
5155 | 5157 |
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5556 __ lw(result, FieldMemOperand(scratch, | 5558 __ lw(result, FieldMemOperand(scratch, |
5557 FixedArray::kHeaderSize - kPointerSize)); | 5559 FixedArray::kHeaderSize - kPointerSize)); |
5558 __ bind(deferred->exit()); | 5560 __ bind(deferred->exit()); |
5559 __ bind(&done); | 5561 __ bind(&done); |
5560 } | 5562 } |
5561 | 5563 |
5562 #undef __ | 5564 #undef __ |
5563 | 5565 |
5564 } // namespace internal | 5566 } // namespace internal |
5565 } // namespace v8 | 5567 } // namespace v8 |
OLD | NEW |