| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
| 8 | 8 |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
| (...skipping 5135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5146 DCHECK(!instr->hydrogen()->IsOldDataSpaceAllocation()); | 5146 DCHECK(!instr->hydrogen()->IsOldDataSpaceAllocation()); |
| 5147 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); | 5147 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); |
| 5148 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE); | 5148 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_POINTER_SPACE); |
| 5149 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) { | 5149 } else if (instr->hydrogen()->IsOldDataSpaceAllocation()) { |
| 5150 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); | 5150 DCHECK(!instr->hydrogen()->IsNewSpaceAllocation()); |
| 5151 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_DATA_SPACE); | 5151 flags = static_cast<AllocationFlags>(flags | PRETENURE_OLD_DATA_SPACE); |
| 5152 } | 5152 } |
| 5153 | 5153 |
| 5154 if (instr->size()->IsConstantOperand()) { | 5154 if (instr->size()->IsConstantOperand()) { |
| 5155 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); | 5155 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); |
| 5156 if (size <= Page::kMaxRegularHeapObjectSize) { | 5156 if (static_cast<uint32_t>(size) <= |
| 5157 static_cast<uint32_t>(Page::kMaxRegularHeapObjectSize)) { |
| 5157 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); | 5158 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); |
| 5158 } else { | 5159 } else { |
| 5159 __ jmp(deferred->entry()); | 5160 __ jmp(deferred->entry()); |
| 5160 } | 5161 } |
| 5161 } else { | 5162 } else { |
| 5162 Register size = ToRegister(instr->size()); | 5163 Register size = ToRegister(instr->size()); |
| 5163 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); | 5164 __ Allocate(size, result, temp, no_reg, deferred->entry(), flags); |
| 5164 } | 5165 } |
| 5165 | 5166 |
| 5166 __ bind(deferred->exit()); | 5167 __ bind(deferred->exit()); |
| (...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5697 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5698 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 5698 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5699 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5699 } | 5700 } |
| 5700 | 5701 |
| 5701 | 5702 |
| 5702 #undef __ | 5703 #undef __ |
| 5703 | 5704 |
| 5704 } } // namespace v8::internal | 5705 } } // namespace v8::internal |
| 5705 | 5706 |
| 5706 #endif // V8_TARGET_ARCH_IA32 | 5707 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |