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