| 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 5313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5324 Register result = ToRegister(instr->result()); | 5324 Register result = ToRegister(instr->result()); |
| 5325 | 5325 |
| 5326 // TODO(3095996): Get rid of this. For now, we need to make the | 5326 // TODO(3095996): Get rid of this. For now, we need to make the |
| 5327 // result register contain a valid pointer because it is already | 5327 // result register contain a valid pointer because it is already |
| 5328 // contained in the register pointer map. | 5328 // contained in the register pointer map. |
| 5329 __ mov(result, zero_reg); | 5329 __ mov(result, zero_reg); |
| 5330 | 5330 |
| 5331 PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters); | 5331 PushSafepointRegistersScope scope(this, Safepoint::kWithRegisters); |
| 5332 __ SmiTag(size, size); | 5332 __ SmiTag(size, size); |
| 5333 __ push(size); | 5333 __ push(size); |
| 5334 CallRuntimeFromDeferred(Runtime::kAllocateInNewSpace, 1, instr); | 5334 if (instr->hydrogen()->CanAllocateInOldPointerSpace()) { |
| 5335 CallRuntimeFromDeferred( |
| 5336 Runtime::kAllocateInOldPointerSpace, 1, instr); |
| 5337 } else { |
| 5338 CallRuntimeFromDeferred( |
| 5339 Runtime::kAllocateInNewSpace, 1, instr); |
| 5340 } |
| 5335 __ StoreToSafepointRegisterSlot(v0, result); | 5341 __ StoreToSafepointRegisterSlot(v0, result); |
| 5336 } | 5342 } |
| 5337 | 5343 |
| 5338 | 5344 |
| 5339 void LCodeGen::DoArrayLiteral(LArrayLiteral* instr) { | 5345 void LCodeGen::DoArrayLiteral(LArrayLiteral* instr) { |
| 5340 Handle<FixedArray> literals(instr->environment()->closure()->literals()); | 5346 Handle<FixedArray> literals(instr->environment()->closure()->literals()); |
| 5341 ElementsKind boilerplate_elements_kind = | 5347 ElementsKind boilerplate_elements_kind = |
| 5342 instr->hydrogen()->boilerplate_elements_kind(); | 5348 instr->hydrogen()->boilerplate_elements_kind(); |
| 5343 AllocationSiteMode allocation_site_mode = | 5349 AllocationSiteMode allocation_site_mode = |
| 5344 instr->hydrogen()->allocation_site_mode(); | 5350 instr->hydrogen()->allocation_site_mode(); |
| (...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5900 __ Subu(scratch, result, scratch); | 5906 __ Subu(scratch, result, scratch); |
| 5901 __ lw(result, FieldMemOperand(scratch, | 5907 __ lw(result, FieldMemOperand(scratch, |
| 5902 FixedArray::kHeaderSize - kPointerSize)); | 5908 FixedArray::kHeaderSize - kPointerSize)); |
| 5903 __ bind(&done); | 5909 __ bind(&done); |
| 5904 } | 5910 } |
| 5905 | 5911 |
| 5906 | 5912 |
| 5907 #undef __ | 5913 #undef __ |
| 5908 | 5914 |
| 5909 } } // namespace v8::internal | 5915 } } // namespace v8::internal |
| OLD | NEW |