OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 5132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5143 ASSERT(!instr->hydrogen()->IsOldDataSpaceAllocation()); | 5143 ASSERT(!instr->hydrogen()->IsOldDataSpaceAllocation()); |
5144 ASSERT(!instr->hydrogen()->IsNewSpaceAllocation()); | 5144 ASSERT(!instr->hydrogen()->IsNewSpaceAllocation()); |
5145 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE); | 5145 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE); |
5146 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) { | 5146 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) { |
5147 ASSERT(!instr->hydrogen()->IsNewSpaceAllocation()); | 5147 ASSERT(!instr->hydrogen()->IsNewSpaceAllocation()); |
5148 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_DATA_SPACE); | 5148 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_DATA_SPACE); |
5149 } | 5149 } |
5150 | 5150 |
5151 if (instr->size()->IsConstantOperand()) { | 5151 if (instr->size()->IsConstantOperand()) { |
5152 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); | 5152 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); |
5153 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); | 5153 if (size <= Page::kMaxRegularHeapObjectSize) { |
| 5154 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); |
| 5155 } else { |
| 5156 __ jmp(deferred->entry()); |
| 5157 } |
5154 } else { | 5158 } else { |
5155 Register size = ToRegister(instr->size()); | 5159 Register size = ToRegister(instr->size()); |
5156 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); | 5160 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); |
5157 } | 5161 } |
5158 | 5162 |
5159 __ bind(deferred->exit()); | 5163 __ bind(deferred->exit()); |
5160 | 5164 |
5161 if (instr->hydrogen()->MustPrefillWithFiller()) { | 5165 if (instr->hydrogen()->MustPrefillWithFiller()) { |
5162 if (instr->size()->IsConstantOperand()) { | 5166 if (instr->size()->IsConstantOperand()) { |
5163 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); | 5167 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); |
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5645 FixedArray::kHeaderSize - kPointerSize)); | 5649 FixedArray::kHeaderSize - kPointerSize)); |
5646 __ bind(&done); | 5650 __ bind(&done); |
5647 } | 5651 } |
5648 | 5652 |
5649 | 5653 |
5650 #undef __ | 5654 #undef __ |
5651 | 5655 |
5652 } } // namespace v8::internal | 5656 } } // namespace v8::internal |
5653 | 5657 |
5654 #endif // V8_TARGET_ARCH_X64 | 5658 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |