| 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/mips64/lithium-codegen-mips64.h" | 5 #include "src/crankshaft/mips64/lithium-codegen-mips64.h" |
| 6 | 6 |
| 7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
| 8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
| 9 #include "src/crankshaft/hydrogen-osr.h" | 9 #include "src/crankshaft/hydrogen-osr.h" |
| 10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" | 10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" |
| (...skipping 2483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2494 | 2494 |
| 2495 void LCodeGen::DoCmpMapAndBranch(LCmpMapAndBranch* instr) { | 2495 void LCodeGen::DoCmpMapAndBranch(LCmpMapAndBranch* instr) { |
| 2496 Register reg = ToRegister(instr->value()); | 2496 Register reg = ToRegister(instr->value()); |
| 2497 Register temp = ToRegister(instr->temp()); | 2497 Register temp = ToRegister(instr->temp()); |
| 2498 | 2498 |
| 2499 __ ld(temp, FieldMemOperand(reg, HeapObject::kMapOffset)); | 2499 __ ld(temp, FieldMemOperand(reg, HeapObject::kMapOffset)); |
| 2500 EmitBranch(instr, eq, temp, Operand(instr->map())); | 2500 EmitBranch(instr, eq, temp, Operand(instr->map())); |
| 2501 } | 2501 } |
| 2502 | 2502 |
| 2503 | 2503 |
| 2504 void LCodeGen::DoInstanceOf(LInstanceOf* instr) { | |
| 2505 DCHECK(ToRegister(instr->context()).is(cp)); | |
| 2506 Label true_label, done; | |
| 2507 DCHECK(ToRegister(instr->left()).is(InstanceOfDescriptor::LeftRegister())); | |
| 2508 DCHECK(ToRegister(instr->right()).is(InstanceOfDescriptor::RightRegister())); | |
| 2509 DCHECK(ToRegister(instr->result()).is(v0)); | |
| 2510 | |
| 2511 InstanceOfStub stub(isolate()); | |
| 2512 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); | |
| 2513 } | |
| 2514 | |
| 2515 | |
| 2516 void LCodeGen::DoHasInPrototypeChainAndBranch( | 2504 void LCodeGen::DoHasInPrototypeChainAndBranch( |
| 2517 LHasInPrototypeChainAndBranch* instr) { | 2505 LHasInPrototypeChainAndBranch* instr) { |
| 2518 Register const object = ToRegister(instr->object()); | 2506 Register const object = ToRegister(instr->object()); |
| 2519 Register const object_map = scratch0(); | 2507 Register const object_map = scratch0(); |
| 2520 Register const object_instance_type = scratch1(); | 2508 Register const object_instance_type = scratch1(); |
| 2521 Register const object_prototype = object_map; | 2509 Register const object_prototype = object_map; |
| 2522 Register const prototype = ToRegister(instr->prototype()); | 2510 Register const prototype = ToRegister(instr->prototype()); |
| 2523 | 2511 |
| 2524 // The {object} must be a spec object. It's sufficient to know that {object} | 2512 // The {object} must be a spec object. It's sufficient to know that {object} |
| 2525 // is not a smi, since all other non-spec objects have {null} prototypes and | 2513 // is not a smi, since all other non-spec objects have {null} prototypes and |
| (...skipping 3256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5782 __ ld(result, FieldMemOperand(scratch, | 5770 __ ld(result, FieldMemOperand(scratch, |
| 5783 FixedArray::kHeaderSize - kPointerSize)); | 5771 FixedArray::kHeaderSize - kPointerSize)); |
| 5784 __ bind(deferred->exit()); | 5772 __ bind(deferred->exit()); |
| 5785 __ bind(&done); | 5773 __ bind(&done); |
| 5786 } | 5774 } |
| 5787 | 5775 |
| 5788 #undef __ | 5776 #undef __ |
| 5789 | 5777 |
| 5790 } // namespace internal | 5778 } // namespace internal |
| 5791 } // namespace v8 | 5779 } // namespace v8 |
| OLD | NEW |