| 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 #if V8_TARGET_ARCH_X87 | 5 #if V8_TARGET_ARCH_X87 |
| 6 | 6 |
| 7 #include "src/crankshaft/x87/lithium-codegen-x87.h" | 7 #include "src/crankshaft/x87/lithium-codegen-x87.h" |
| 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 5281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5292 __ FastAllocate(size, result, temp, flags); | 5292 __ FastAllocate(size, result, temp, flags); |
| 5293 } | 5293 } |
| 5294 } | 5294 } |
| 5295 | 5295 |
| 5296 void LCodeGen::DoDeferredAllocate(LAllocate* instr) { | 5296 void LCodeGen::DoDeferredAllocate(LAllocate* instr) { |
| 5297 Register result = ToRegister(instr->result()); | 5297 Register result = ToRegister(instr->result()); |
| 5298 | 5298 |
| 5299 // TODO(3095996): Get rid of this. For now, we need to make the | 5299 // TODO(3095996): Get rid of this. For now, we need to make the |
| 5300 // result register contain a valid pointer because it is already | 5300 // result register contain a valid pointer because it is already |
| 5301 // contained in the register pointer map. | 5301 // contained in the register pointer map. |
| 5302 __ Move(result, Immediate(Smi::kZero)); | 5302 __ Move(result, Immediate(Smi::FromInt(0))); |
| 5303 | 5303 |
| 5304 PushSafepointRegistersScope scope(this); | 5304 PushSafepointRegistersScope scope(this); |
| 5305 if (instr->size()->IsRegister()) { | 5305 if (instr->size()->IsRegister()) { |
| 5306 Register size = ToRegister(instr->size()); | 5306 Register size = ToRegister(instr->size()); |
| 5307 DCHECK(!size.is(result)); | 5307 DCHECK(!size.is(result)); |
| 5308 __ SmiTag(ToRegister(instr->size())); | 5308 __ SmiTag(ToRegister(instr->size())); |
| 5309 __ push(size); | 5309 __ push(size); |
| 5310 } else { | 5310 } else { |
| 5311 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); | 5311 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); |
| 5312 if (size >= 0 && size <= Smi::kMaxValue) { | 5312 if (size >= 0 && size <= Smi::kMaxValue) { |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5598 CallRuntime(Runtime::kForInEnumerate, instr); | 5598 CallRuntime(Runtime::kForInEnumerate, instr); |
| 5599 __ bind(&use_cache); | 5599 __ bind(&use_cache); |
| 5600 } | 5600 } |
| 5601 | 5601 |
| 5602 | 5602 |
| 5603 void LCodeGen::DoForInCacheArray(LForInCacheArray* instr) { | 5603 void LCodeGen::DoForInCacheArray(LForInCacheArray* instr) { |
| 5604 Register map = ToRegister(instr->map()); | 5604 Register map = ToRegister(instr->map()); |
| 5605 Register result = ToRegister(instr->result()); | 5605 Register result = ToRegister(instr->result()); |
| 5606 Label load_cache, done; | 5606 Label load_cache, done; |
| 5607 __ EnumLength(result, map); | 5607 __ EnumLength(result, map); |
| 5608 __ cmp(result, Immediate(Smi::kZero)); | 5608 __ cmp(result, Immediate(Smi::FromInt(0))); |
| 5609 __ j(not_equal, &load_cache, Label::kNear); | 5609 __ j(not_equal, &load_cache, Label::kNear); |
| 5610 __ mov(result, isolate()->factory()->empty_fixed_array()); | 5610 __ mov(result, isolate()->factory()->empty_fixed_array()); |
| 5611 __ jmp(&done, Label::kNear); | 5611 __ jmp(&done, Label::kNear); |
| 5612 | 5612 |
| 5613 __ bind(&load_cache); | 5613 __ bind(&load_cache); |
| 5614 __ LoadInstanceDescriptors(map, result); | 5614 __ LoadInstanceDescriptors(map, result); |
| 5615 __ mov(result, | 5615 __ mov(result, |
| 5616 FieldOperand(result, DescriptorArray::kEnumCacheOffset)); | 5616 FieldOperand(result, DescriptorArray::kEnumCacheOffset)); |
| 5617 __ mov(result, | 5617 __ mov(result, |
| 5618 FieldOperand(result, FixedArray::SizeFor(instr->idx()))); | 5618 FieldOperand(result, FixedArray::SizeFor(instr->idx()))); |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5700 __ bind(deferred->exit()); | 5700 __ bind(deferred->exit()); |
| 5701 __ bind(&done); | 5701 __ bind(&done); |
| 5702 } | 5702 } |
| 5703 | 5703 |
| 5704 #undef __ | 5704 #undef __ |
| 5705 | 5705 |
| 5706 } // namespace internal | 5706 } // namespace internal |
| 5707 } // namespace v8 | 5707 } // namespace v8 |
| 5708 | 5708 |
| 5709 #endif // V8_TARGET_ARCH_X87 | 5709 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |