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 5234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5245 ASSERT(!instr->hydrogen()->IsOldDataSpaceAllocation()); | 5245 ASSERT(!instr->hydrogen()->IsOldDataSpaceAllocation()); |
5246 ASSERT(!instr->hydrogen()->IsNewSpaceAllocation()); | 5246 ASSERT(!instr->hydrogen()->IsNewSpaceAllocation()); |
5247 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE); | 5247 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE); |
5248 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) { | 5248 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) { |
5249 ASSERT(!instr->hydrogen()->IsNewSpaceAllocation()); | 5249 ASSERT(!instr->hydrogen()->IsNewSpaceAllocation()); |
5250 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_DATA_SPACE); | 5250 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_DATA_SPACE); |
5251 } | 5251 } |
5252 | 5252 |
5253 if (instr->size()->IsConstantOperand()) { | 5253 if (instr->size()->IsConstantOperand()) { |
5254 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); | 5254 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); |
5255 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags); | 5255 if (size <= Page::kMaxRegularHeapObjectSize) { |
| 5256 __ Allocate(size, result, scratch, scratch2, deferred->entry(), flags); |
| 5257 } else { |
| 5258 __ jmp(deferred->entry()); |
| 5259 } |
5256 } else { | 5260 } else { |
5257 Register size = ToRegister(instr->size()); | 5261 Register size = ToRegister(instr->size()); |
5258 __ Allocate(size, | 5262 __ Allocate(size, |
5259 result, | 5263 result, |
5260 scratch, | 5264 scratch, |
5261 scratch2, | 5265 scratch2, |
5262 deferred->entry(), | 5266 deferred->entry(), |
5263 flags); | 5267 flags); |
5264 } | 5268 } |
5265 | 5269 |
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5742 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); | 5746 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); |
5743 __ ldr(result, FieldMemOperand(scratch, | 5747 __ ldr(result, FieldMemOperand(scratch, |
5744 FixedArray::kHeaderSize - kPointerSize)); | 5748 FixedArray::kHeaderSize - kPointerSize)); |
5745 __ bind(&done); | 5749 __ bind(&done); |
5746 } | 5750 } |
5747 | 5751 |
5748 | 5752 |
5749 #undef __ | 5753 #undef __ |
5750 | 5754 |
5751 } } // namespace v8::internal | 5755 } } // namespace v8::internal |
OLD | NEW |