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

Side by Side Diff: src/crankshaft/arm64/lithium-codegen-arm64.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/arm64/lithium-arm64.cc ('k') | src/crankshaft/hydrogen.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 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 #include "src/crankshaft/arm64/lithium-codegen-arm64.h" 5 #include "src/crankshaft/arm64/lithium-codegen-arm64.h"
6 6
7 #include "src/arm64/frames-arm64.h" 7 #include "src/arm64/frames-arm64.h"
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 2784 matching lines...) Expand 10 before | Expand all | Expand 10 after
2795 Register result = ToRegister(instr->result()); 2795 Register result = ToRegister(instr->result());
2796 Register base = ToRegister(instr->base_object()); 2796 Register base = ToRegister(instr->base_object());
2797 if (instr->offset()->IsConstantOperand()) { 2797 if (instr->offset()->IsConstantOperand()) {
2798 __ Add(result, base, ToOperand32(instr->offset())); 2798 __ Add(result, base, ToOperand32(instr->offset()));
2799 } else { 2799 } else {
2800 __ Add(result, base, Operand(ToRegister32(instr->offset()), SXTW)); 2800 __ Add(result, base, Operand(ToRegister32(instr->offset()), SXTW));
2801 } 2801 }
2802 } 2802 }
2803 2803
2804 2804
2805 void LCodeGen::DoInstanceOf(LInstanceOf* instr) {
2806 DCHECK(ToRegister(instr->context()).is(cp));
2807 DCHECK(ToRegister(instr->left()).is(InstanceOfDescriptor::LeftRegister()));
2808 DCHECK(ToRegister(instr->right()).is(InstanceOfDescriptor::RightRegister()));
2809 DCHECK(ToRegister(instr->result()).is(x0));
2810 InstanceOfStub stub(isolate());
2811 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
2812 }
2813
2814
2815 void LCodeGen::DoHasInPrototypeChainAndBranch( 2805 void LCodeGen::DoHasInPrototypeChainAndBranch(
2816 LHasInPrototypeChainAndBranch* instr) { 2806 LHasInPrototypeChainAndBranch* instr) {
2817 Register const object = ToRegister(instr->object()); 2807 Register const object = ToRegister(instr->object());
2818 Register const object_map = ToRegister(instr->scratch1()); 2808 Register const object_map = ToRegister(instr->scratch1());
2819 Register const object_instance_type = ToRegister(instr->scratch2()); 2809 Register const object_instance_type = ToRegister(instr->scratch2());
2820 Register const object_prototype = object_map; 2810 Register const object_prototype = object_map;
2821 Register const prototype = ToRegister(instr->prototype()); 2811 Register const prototype = ToRegister(instr->prototype());
2822 2812
2823 // The {object} must be a spec object. It's sufficient to know that {object} 2813 // The {object} must be a spec object. It's sufficient to know that {object}
2824 // is not a smi, since all other non-spec objects have {null} prototypes and 2814 // is not a smi, since all other non-spec objects have {null} prototypes and
(...skipping 2945 matching lines...) Expand 10 before | Expand all | Expand 10 after
5770 // Index is equal to negated out of object property index plus 1. 5760 // Index is equal to negated out of object property index plus 1.
5771 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); 5761 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2));
5772 __ Ldr(result, FieldMemOperand(result, 5762 __ Ldr(result, FieldMemOperand(result,
5773 FixedArray::kHeaderSize - kPointerSize)); 5763 FixedArray::kHeaderSize - kPointerSize));
5774 __ Bind(deferred->exit()); 5764 __ Bind(deferred->exit());
5775 __ Bind(&done); 5765 __ Bind(&done);
5776 } 5766 }
5777 5767
5778 } // namespace internal 5768 } // namespace internal
5779 } // namespace v8 5769 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/arm64/lithium-arm64.cc ('k') | src/crankshaft/hydrogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698