| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_X64 | 5 #if V8_TARGET_ARCH_X64 |
| 6 | 6 |
| 7 #include "src/crankshaft/x64/lithium-codegen-x64.h" | 7 #include "src/crankshaft/x64/lithium-codegen-x64.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 2419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2430 | 2430 |
| 2431 | 2431 |
| 2432 void LCodeGen::DoCmpMapAndBranch(LCmpMapAndBranch* instr) { | 2432 void LCodeGen::DoCmpMapAndBranch(LCmpMapAndBranch* instr) { |
| 2433 Register reg = ToRegister(instr->value()); | 2433 Register reg = ToRegister(instr->value()); |
| 2434 | 2434 |
| 2435 __ Cmp(FieldOperand(reg, HeapObject::kMapOffset), instr->map()); | 2435 __ Cmp(FieldOperand(reg, HeapObject::kMapOffset), instr->map()); |
| 2436 EmitBranch(instr, equal); | 2436 EmitBranch(instr, equal); |
| 2437 } | 2437 } |
| 2438 | 2438 |
| 2439 | 2439 |
| 2440 void LCodeGen::DoInstanceOf(LInstanceOf* instr) { | |
| 2441 DCHECK(ToRegister(instr->context()).is(rsi)); | |
| 2442 DCHECK(ToRegister(instr->left()).is(InstanceOfDescriptor::LeftRegister())); | |
| 2443 DCHECK(ToRegister(instr->right()).is(InstanceOfDescriptor::RightRegister())); | |
| 2444 DCHECK(ToRegister(instr->result()).is(rax)); | |
| 2445 InstanceOfStub stub(isolate()); | |
| 2446 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | |
| 2447 } | |
| 2448 | |
| 2449 | |
| 2450 void LCodeGen::DoHasInPrototypeChainAndBranch( | 2440 void LCodeGen::DoHasInPrototypeChainAndBranch( |
| 2451 LHasInPrototypeChainAndBranch* instr) { | 2441 LHasInPrototypeChainAndBranch* instr) { |
| 2452 Register const object = ToRegister(instr->object()); | 2442 Register const object = ToRegister(instr->object()); |
| 2453 Register const object_map = kScratchRegister; | 2443 Register const object_map = kScratchRegister; |
| 2454 Register const object_prototype = object_map; | 2444 Register const object_prototype = object_map; |
| 2455 Register const prototype = ToRegister(instr->prototype()); | 2445 Register const prototype = ToRegister(instr->prototype()); |
| 2456 | 2446 |
| 2457 // The {object} must be a spec object. It's sufficient to know that {object} | 2447 // The {object} must be a spec object. It's sufficient to know that {object} |
| 2458 // is not a smi, since all other non-spec objects have {null} prototypes and | 2448 // is not a smi, since all other non-spec objects have {null} prototypes and |
| 2459 // will be ruled out below. | 2449 // will be ruled out below. |
| (...skipping 3173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5633 __ bind(deferred->exit()); | 5623 __ bind(deferred->exit()); |
| 5634 __ bind(&done); | 5624 __ bind(&done); |
| 5635 } | 5625 } |
| 5636 | 5626 |
| 5637 #undef __ | 5627 #undef __ |
| 5638 | 5628 |
| 5639 } // namespace internal | 5629 } // namespace internal |
| 5640 } // namespace v8 | 5630 } // namespace v8 |
| 5641 | 5631 |
| 5642 #endif // V8_TARGET_ARCH_X64 | 5632 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |