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 5930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5941 ASSERT(!instr->hydrogen()->IsOldDataSpaceAllocation()); | 5941 ASSERT(!instr->hydrogen()->IsOldDataSpaceAllocation()); |
5942 ASSERT(!instr->hydrogen()->IsNewSpaceAllocation()); | 5942 ASSERT(!instr->hydrogen()->IsNewSpaceAllocation()); |
5943 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE); | 5943 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE); |
5944 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) { | 5944 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) { |
5945 ASSERT(!instr->hydrogen()->IsNewSpaceAllocation()); | 5945 ASSERT(!instr->hydrogen()->IsNewSpaceAllocation()); |
5946 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_DATA_SPACE); | 5946 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_DATA_SPACE); |
5947 } | 5947 } |
5948 | 5948 |
5949 if (instr->size()->IsConstantOperand()) { | 5949 if (instr->size()->IsConstantOperand()) { |
5950 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); | 5950 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); |
5951 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); | 5951 if (size <= Page::kMaxRegularHeapObjectSize) { |
| 5952 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); |
| 5953 } else { |
| 5954 __ jmp(deferred->entry()); |
| 5955 } |
5952 } else { | 5956 } else { |
5953 Register size = ToRegister(instr->size()); | 5957 Register size = ToRegister(instr->size()); |
5954 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); | 5958 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); |
5955 } | 5959 } |
5956 | 5960 |
5957 __ bind(deferred->exit()); | 5961 __ bind(deferred->exit()); |
5958 | 5962 |
5959 if (instr->hydrogen()->MustPrefillWithFiller()) { | 5963 if (instr->hydrogen()->MustPrefillWithFiller()) { |
5960 if (instr->size()->IsConstantOperand()) { | 5964 if (instr->size()->IsConstantOperand()) { |
5961 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); | 5965 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); |
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6434 FixedArray::kHeaderSize - kPointerSize)); | 6438 FixedArray::kHeaderSize - kPointerSize)); |
6435 __ bind(&done); | 6439 __ bind(&done); |
6436 } | 6440 } |
6437 | 6441 |
6438 | 6442 |
6439 #undef __ | 6443 #undef __ |
6440 | 6444 |
6441 } } // namespace v8::internal | 6445 } } // namespace v8::internal |
6442 | 6446 |
6443 #endif // V8_TARGET_ARCH_IA32 | 6447 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |