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 2476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2487 void LCodeGen::DoCmpMapAndBranch(LCmpMapAndBranch* instr) { | 2487 void LCodeGen::DoCmpMapAndBranch(LCmpMapAndBranch* instr) { |
2488 Register reg = ToRegister(instr->value()); | 2488 Register reg = ToRegister(instr->value()); |
2489 Register temp = ToRegister(instr->temp()); | 2489 Register temp = ToRegister(instr->temp()); |
2490 | 2490 |
2491 __ ldr(temp, FieldMemOperand(reg, HeapObject::kMapOffset)); | 2491 __ ldr(temp, FieldMemOperand(reg, HeapObject::kMapOffset)); |
2492 __ cmp(temp, Operand(instr->map())); | 2492 __ cmp(temp, Operand(instr->map())); |
2493 EmitBranch(instr, eq); | 2493 EmitBranch(instr, eq); |
2494 } | 2494 } |
2495 | 2495 |
2496 | 2496 |
2497 void LCodeGen::DoInstanceOf(LInstanceOf* instr) { | |
2498 DCHECK(ToRegister(instr->context()).is(cp)); | |
2499 DCHECK(ToRegister(instr->left()).is(InstanceOfDescriptor::LeftRegister())); | |
2500 DCHECK(ToRegister(instr->right()).is(InstanceOfDescriptor::RightRegister())); | |
2501 DCHECK(ToRegister(instr->result()).is(r0)); | |
2502 InstanceOfStub stub(isolate()); | |
2503 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | |
2504 } | |
2505 | |
2506 | |
2507 void LCodeGen::DoHasInPrototypeChainAndBranch( | 2497 void LCodeGen::DoHasInPrototypeChainAndBranch( |
2508 LHasInPrototypeChainAndBranch* instr) { | 2498 LHasInPrototypeChainAndBranch* instr) { |
2509 Register const object = ToRegister(instr->object()); | 2499 Register const object = ToRegister(instr->object()); |
2510 Register const object_map = scratch0(); | 2500 Register const object_map = scratch0(); |
2511 Register const object_instance_type = ip; | 2501 Register const object_instance_type = ip; |
2512 Register const object_prototype = object_map; | 2502 Register const object_prototype = object_map; |
2513 Register const prototype = ToRegister(instr->prototype()); | 2503 Register const prototype = ToRegister(instr->prototype()); |
2514 | 2504 |
2515 // The {object} must be a spec object. It's sufficient to know that {object} | 2505 // The {object} must be a spec object. It's sufficient to know that {object} |
2516 // is not a smi, since all other non-spec objects have {null} prototypes and | 2506 // is not a smi, since all other non-spec objects have {null} prototypes and |
(...skipping 3062 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5579 __ ldr(result, FieldMemOperand(scratch, | 5569 __ ldr(result, FieldMemOperand(scratch, |
5580 FixedArray::kHeaderSize - kPointerSize)); | 5570 FixedArray::kHeaderSize - kPointerSize)); |
5581 __ bind(deferred->exit()); | 5571 __ bind(deferred->exit()); |
5582 __ bind(&done); | 5572 __ bind(&done); |
5583 } | 5573 } |
5584 | 5574 |
5585 #undef __ | 5575 #undef __ |
5586 | 5576 |
5587 } // namespace internal | 5577 } // namespace internal |
5588 } // namespace v8 | 5578 } // namespace v8 |
OLD | NEW |