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

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

Issue 1991663002: X87: [es6] Reintroduce the instanceof operator in the backends. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 | « no previous file | src/crankshaft/x87/lithium-x87.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 #if V8_TARGET_ARCH_X87 5 #if V8_TARGET_ARCH_X87
6 6
7 #include "src/crankshaft/x87/lithium-codegen-x87.h" 7 #include "src/crankshaft/x87/lithium-codegen-x87.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 2557 matching lines...) Expand 10 before | Expand all | Expand 10 after
2568 } 2568 }
2569 2569
2570 2570
2571 void LCodeGen::DoCmpMapAndBranch(LCmpMapAndBranch* instr) { 2571 void LCodeGen::DoCmpMapAndBranch(LCmpMapAndBranch* instr) {
2572 Register reg = ToRegister(instr->value()); 2572 Register reg = ToRegister(instr->value());
2573 __ cmp(FieldOperand(reg, HeapObject::kMapOffset), instr->map()); 2573 __ cmp(FieldOperand(reg, HeapObject::kMapOffset), instr->map());
2574 EmitBranch(instr, equal); 2574 EmitBranch(instr, equal);
2575 } 2575 }
2576 2576
2577 2577
2578 void LCodeGen::DoInstanceOf(LInstanceOf* instr) {
2579 DCHECK(ToRegister(instr->context()).is(esi));
2580 DCHECK(ToRegister(instr->left()).is(InstanceOfDescriptor::LeftRegister()));
2581 DCHECK(ToRegister(instr->right()).is(InstanceOfDescriptor::RightRegister()));
2582 DCHECK(ToRegister(instr->result()).is(eax));
2583 InstanceOfStub stub(isolate());
2584 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
2585 }
2586
2587
2588 void LCodeGen::DoHasInPrototypeChainAndBranch( 2578 void LCodeGen::DoHasInPrototypeChainAndBranch(
2589 LHasInPrototypeChainAndBranch* instr) { 2579 LHasInPrototypeChainAndBranch* instr) {
2590 Register const object = ToRegister(instr->object()); 2580 Register const object = ToRegister(instr->object());
2591 Register const object_map = ToRegister(instr->scratch()); 2581 Register const object_map = ToRegister(instr->scratch());
2592 Register const object_prototype = object_map; 2582 Register const object_prototype = object_map;
2593 Register const prototype = ToRegister(instr->prototype()); 2583 Register const prototype = ToRegister(instr->prototype());
2594 2584
2595 // The {object} must be a spec object. It's sufficient to know that {object} 2585 // The {object} must be a spec object. It's sufficient to know that {object}
2596 // is not a smi, since all other non-spec objects have {null} prototypes and 2586 // is not a smi, since all other non-spec objects have {null} prototypes and
2597 // will be ruled out below. 2587 // will be ruled out below.
(...skipping 3283 matching lines...) Expand 10 before | Expand all | Expand 10 after
5881 __ bind(deferred->exit()); 5871 __ bind(deferred->exit());
5882 __ bind(&done); 5872 __ bind(&done);
5883 } 5873 }
5884 5874
5885 #undef __ 5875 #undef __
5886 5876
5887 } // namespace internal 5877 } // namespace internal
5888 } // namespace v8 5878 } // namespace v8
5889 5879
5890 #endif // V8_TARGET_ARCH_X87 5880 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « no previous file | src/crankshaft/x87/lithium-x87.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698