| 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 5455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5466 if (instr->size()->IsRegister()) { | 5466 if (instr->size()->IsRegister()) { |
| 5467 Register size = ToRegister(instr->size()); | 5467 Register size = ToRegister(instr->size()); |
| 5468 ASSERT(!size.is(result)); | 5468 ASSERT(!size.is(result)); |
| 5469 __ SmiTag(size); | 5469 __ SmiTag(size); |
| 5470 __ push(size); | 5470 __ push(size); |
| 5471 } else { | 5471 } else { |
| 5472 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); | 5472 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); |
| 5473 __ Push(Smi::FromInt(size)); | 5473 __ Push(Smi::FromInt(size)); |
| 5474 } | 5474 } |
| 5475 | 5475 |
| 5476 int flags = AllocateDoubleAlignFlag::encode( |
| 5477 instr->hydrogen()->MustAllocateDoubleAligned()); |
| 5476 if (instr->hydrogen()->IsOldPointerSpaceAllocation()) { | 5478 if (instr->hydrogen()->IsOldPointerSpaceAllocation()) { |
| 5477 ASSERT(!instr->hydrogen()->IsOldDataSpaceAllocation()); | 5479 ASSERT(!instr->hydrogen()->IsOldDataSpaceAllocation()); |
| 5478 ASSERT(!instr->hydrogen()->IsNewSpaceAllocation()); | 5480 ASSERT(!instr->hydrogen()->IsNewSpaceAllocation()); |
| 5479 CallRuntimeFromDeferred(Runtime::kAllocateInOldPointerSpace, 1, instr, | 5481 flags = AllocateTargetSpace::update(flags, OLD_POINTER_SPACE); |
| 5480 instr->context()); | |
| 5481 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) { | 5482 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) { |
| 5482 ASSERT(!instr->hydrogen()->IsNewSpaceAllocation()); | 5483 ASSERT(!instr->hydrogen()->IsNewSpaceAllocation()); |
| 5483 CallRuntimeFromDeferred(Runtime::kAllocateInOldDataSpace, 1, instr, | 5484 flags = AllocateTargetSpace::update(flags, OLD_DATA_SPACE); |
| 5484 instr->context()); | |
| 5485 } else { | 5485 } else { |
| 5486 CallRuntimeFromDeferred(Runtime::kAllocateInNewSpace, 1, instr, | 5486 flags = AllocateTargetSpace::update(flags, NEW_SPACE); |
| 5487 instr->context()); | |
| 5488 } | 5487 } |
| 5488 __ Push(Smi::FromInt(flags)); |
| 5489 |
| 5490 CallRuntimeFromDeferred( |
| 5491 Runtime::kAllocateInTargetSpace, 2, instr, instr->context()); |
| 5489 __ StoreToSafepointRegisterSlot(r0, result); | 5492 __ StoreToSafepointRegisterSlot(r0, result); |
| 5490 } | 5493 } |
| 5491 | 5494 |
| 5492 | 5495 |
| 5493 void LCodeGen::DoToFastProperties(LToFastProperties* instr) { | 5496 void LCodeGen::DoToFastProperties(LToFastProperties* instr) { |
| 5494 ASSERT(ToRegister(instr->value()).is(r0)); | 5497 ASSERT(ToRegister(instr->value()).is(r0)); |
| 5495 __ push(r0); | 5498 __ push(r0); |
| 5496 CallRuntime(Runtime::kToFastProperties, 1, instr); | 5499 CallRuntime(Runtime::kToFastProperties, 1, instr); |
| 5497 } | 5500 } |
| 5498 | 5501 |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5910 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); | 5913 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); |
| 5911 __ ldr(result, FieldMemOperand(scratch, | 5914 __ ldr(result, FieldMemOperand(scratch, |
| 5912 FixedArray::kHeaderSize - kPointerSize)); | 5915 FixedArray::kHeaderSize - kPointerSize)); |
| 5913 __ bind(&done); | 5916 __ bind(&done); |
| 5914 } | 5917 } |
| 5915 | 5918 |
| 5916 | 5919 |
| 5917 #undef __ | 5920 #undef __ |
| 5918 | 5921 |
| 5919 } } // namespace v8::internal | 5922 } } // namespace v8::internal |
| OLD | NEW |