Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(507)

Side by Side Diff: src/crankshaft/mips64/lithium-codegen-mips64.cc

Issue 1980483003: [es6] Reintroduce the instanceof operator in the backends. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Igors comments. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/crankshaft/mips/lithium-mips.cc ('k') | src/crankshaft/mips64/lithium-mips64.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/crankshaft/mips/lithium-mips.cc ('k') | src/crankshaft/mips64/lithium-mips64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698