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 6027 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6038 if (instr->size()->IsRegister()) { | 6038 if (instr->size()->IsRegister()) { |
6039 Register size = ToRegister(instr->size()); | 6039 Register size = ToRegister(instr->size()); |
6040 ASSERT(!size.is(result)); | 6040 ASSERT(!size.is(result)); |
6041 __ SmiTag(ToRegister(instr->size())); | 6041 __ SmiTag(ToRegister(instr->size())); |
6042 __ push(size); | 6042 __ push(size); |
6043 } else { | 6043 } else { |
6044 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); | 6044 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); |
6045 __ push(Immediate(Smi::FromInt(size))); | 6045 __ push(Immediate(Smi::FromInt(size))); |
6046 } | 6046 } |
6047 | 6047 |
| 6048 int flags = AllocateDoubleAlignFlag::encode( |
| 6049 instr->hydrogen()->MustAllocateDoubleAligned()); |
6048 if (instr->hydrogen()->IsOldPointerSpaceAllocation()) { | 6050 if (instr->hydrogen()->IsOldPointerSpaceAllocation()) { |
6049 ASSERT(!instr->hydrogen()->IsOldDataSpaceAllocation()); | 6051 ASSERT(!instr->hydrogen()->IsOldDataSpaceAllocation()); |
6050 ASSERT(!instr->hydrogen()->IsNewSpaceAllocation()); | 6052 ASSERT(!instr->hydrogen()->IsNewSpaceAllocation()); |
6051 CallRuntimeFromDeferred( | 6053 flags = AllocateTargetSpace::update(flags, OLD_POINTER_SPACE); |
6052 Runtime::kAllocateInOldPointerSpace, 1, instr, instr->context()); | |
6053 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) { | 6054 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) { |
6054 ASSERT(!instr->hydrogen()->IsNewSpaceAllocation()); | 6055 ASSERT(!instr->hydrogen()->IsNewSpaceAllocation()); |
6055 CallRuntimeFromDeferred( | 6056 flags = AllocateTargetSpace::update(flags, OLD_DATA_SPACE); |
6056 Runtime::kAllocateInOldDataSpace, 1, instr, instr->context()); | |
6057 } else { | 6057 } else { |
6058 CallRuntimeFromDeferred( | 6058 flags = AllocateTargetSpace::update(flags, NEW_SPACE); |
6059 Runtime::kAllocateInNewSpace, 1, instr, instr->context()); | |
6060 } | 6059 } |
| 6060 __ push(Immediate(Smi::FromInt(flags))); |
| 6061 |
| 6062 CallRuntimeFromDeferred( |
| 6063 Runtime::kAllocateInTargetSpace, 2, instr, instr->context()); |
6061 __ StoreToSafepointRegisterSlot(result, eax); | 6064 __ StoreToSafepointRegisterSlot(result, eax); |
6062 } | 6065 } |
6063 | 6066 |
6064 | 6067 |
6065 void LCodeGen::DoToFastProperties(LToFastProperties* instr) { | 6068 void LCodeGen::DoToFastProperties(LToFastProperties* instr) { |
6066 ASSERT(ToRegister(instr->value()).is(eax)); | 6069 ASSERT(ToRegister(instr->value()).is(eax)); |
6067 __ push(eax); | 6070 __ push(eax); |
6068 CallRuntime(Runtime::kToFastProperties, 1, instr); | 6071 CallRuntime(Runtime::kToFastProperties, 1, instr); |
6069 } | 6072 } |
6070 | 6073 |
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6477 FixedArray::kHeaderSize - kPointerSize)); | 6480 FixedArray::kHeaderSize - kPointerSize)); |
6478 __ bind(&done); | 6481 __ bind(&done); |
6479 } | 6482 } |
6480 | 6483 |
6481 | 6484 |
6482 #undef __ | 6485 #undef __ |
6483 | 6486 |
6484 } } // namespace v8::internal | 6487 } } // namespace v8::internal |
6485 | 6488 |
6486 #endif // V8_TARGET_ARCH_IA32 | 6489 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |