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/crankshaft/arm/lithium-codegen-arm.h" | 5 #include "src/crankshaft/arm/lithium-codegen-arm.h" |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/crankshaft/arm/lithium-gap-resolver-arm.h" | 10 #include "src/crankshaft/arm/lithium-gap-resolver-arm.h" |
(...skipping 5003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5014 } | 5014 } |
5015 } | 5015 } |
5016 | 5016 |
5017 | 5017 |
5018 void LCodeGen::DoDeferredAllocate(LAllocate* instr) { | 5018 void LCodeGen::DoDeferredAllocate(LAllocate* instr) { |
5019 Register result = ToRegister(instr->result()); | 5019 Register result = ToRegister(instr->result()); |
5020 | 5020 |
5021 // TODO(3095996): Get rid of this. For now, we need to make the | 5021 // TODO(3095996): Get rid of this. For now, we need to make the |
5022 // result register contain a valid pointer because it is already | 5022 // result register contain a valid pointer because it is already |
5023 // contained in the register pointer map. | 5023 // contained in the register pointer map. |
5024 __ mov(result, Operand(Smi::FromInt(0))); | 5024 __ mov(result, Operand(Smi::kZero)); |
5025 | 5025 |
5026 PushSafepointRegistersScope scope(this); | 5026 PushSafepointRegistersScope scope(this); |
5027 if (instr->size()->IsRegister()) { | 5027 if (instr->size()->IsRegister()) { |
5028 Register size = ToRegister(instr->size()); | 5028 Register size = ToRegister(instr->size()); |
5029 DCHECK(!size.is(result)); | 5029 DCHECK(!size.is(result)); |
5030 __ SmiTag(size); | 5030 __ SmiTag(size); |
5031 __ push(size); | 5031 __ push(size); |
5032 } else { | 5032 } else { |
5033 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); | 5033 int32_t size = ToInteger32(LConstantOperand::cast(instr->size())); |
5034 if (size >= 0 && size <= Smi::kMaxValue) { | 5034 if (size >= 0 && size <= Smi::kMaxValue) { |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5348 CallRuntime(Runtime::kForInEnumerate, instr); | 5348 CallRuntime(Runtime::kForInEnumerate, instr); |
5349 __ bind(&use_cache); | 5349 __ bind(&use_cache); |
5350 } | 5350 } |
5351 | 5351 |
5352 | 5352 |
5353 void LCodeGen::DoForInCacheArray(LForInCacheArray* instr) { | 5353 void LCodeGen::DoForInCacheArray(LForInCacheArray* instr) { |
5354 Register map = ToRegister(instr->map()); | 5354 Register map = ToRegister(instr->map()); |
5355 Register result = ToRegister(instr->result()); | 5355 Register result = ToRegister(instr->result()); |
5356 Label load_cache, done; | 5356 Label load_cache, done; |
5357 __ EnumLength(result, map); | 5357 __ EnumLength(result, map); |
5358 __ cmp(result, Operand(Smi::FromInt(0))); | 5358 __ cmp(result, Operand(Smi::kZero)); |
5359 __ b(ne, &load_cache); | 5359 __ b(ne, &load_cache); |
5360 __ mov(result, Operand(isolate()->factory()->empty_fixed_array())); | 5360 __ mov(result, Operand(isolate()->factory()->empty_fixed_array())); |
5361 __ jmp(&done); | 5361 __ jmp(&done); |
5362 | 5362 |
5363 __ bind(&load_cache); | 5363 __ bind(&load_cache); |
5364 __ LoadInstanceDescriptors(map, result); | 5364 __ LoadInstanceDescriptors(map, result); |
5365 __ ldr(result, | 5365 __ ldr(result, |
5366 FieldMemOperand(result, DescriptorArray::kEnumCacheOffset)); | 5366 FieldMemOperand(result, DescriptorArray::kEnumCacheOffset)); |
5367 __ ldr(result, | 5367 __ ldr(result, |
5368 FieldMemOperand(result, FixedArray::SizeFor(instr->idx()))); | 5368 FieldMemOperand(result, FixedArray::SizeFor(instr->idx()))); |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5454 __ ldr(result, FieldMemOperand(scratch, | 5454 __ ldr(result, FieldMemOperand(scratch, |
5455 FixedArray::kHeaderSize - kPointerSize)); | 5455 FixedArray::kHeaderSize - kPointerSize)); |
5456 __ bind(deferred->exit()); | 5456 __ bind(deferred->exit()); |
5457 __ bind(&done); | 5457 __ bind(&done); |
5458 } | 5458 } |
5459 | 5459 |
5460 #undef __ | 5460 #undef __ |
5461 | 5461 |
5462 } // namespace internal | 5462 } // namespace internal |
5463 } // namespace v8 | 5463 } // namespace v8 |
OLD | NEW |