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

Side by Side Diff: src/arm/lithium-codegen-arm.cc

Issue 1088993003: Replace OVERRIDE->override and FINAL->final since we now require C++11. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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/arm/lithium-codegen-arm.h ('k') | src/arm/lithium-gap-resolver-arm.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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/arm/lithium-codegen-arm.h" 7 #include "src/arm/lithium-codegen-arm.h"
8 #include "src/arm/lithium-gap-resolver-arm.h" 8 #include "src/arm/lithium-gap-resolver-arm.h"
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
11 #include "src/code-stubs.h" 11 #include "src/code-stubs.h"
12 #include "src/cpu-profiler.h" 12 #include "src/cpu-profiler.h"
13 #include "src/hydrogen-osr.h" 13 #include "src/hydrogen-osr.h"
14 #include "src/ic/ic.h" 14 #include "src/ic/ic.h"
15 #include "src/ic/stub-cache.h" 15 #include "src/ic/stub-cache.h"
16 16
17 namespace v8 { 17 namespace v8 {
18 namespace internal { 18 namespace internal {
19 19
20 20
21 class SafepointGenerator FINAL : public CallWrapper { 21 class SafepointGenerator final : public CallWrapper {
22 public: 22 public:
23 SafepointGenerator(LCodeGen* codegen, 23 SafepointGenerator(LCodeGen* codegen,
24 LPointerMap* pointers, 24 LPointerMap* pointers,
25 Safepoint::DeoptMode mode) 25 Safepoint::DeoptMode mode)
26 : codegen_(codegen), 26 : codegen_(codegen),
27 pointers_(pointers), 27 pointers_(pointers),
28 deopt_mode_(mode) { } 28 deopt_mode_(mode) { }
29 virtual ~SafepointGenerator() {} 29 virtual ~SafepointGenerator() {}
30 30
31 void BeforeCall(int call_size) const OVERRIDE {} 31 void BeforeCall(int call_size) const override {}
32 32
33 void AfterCall() const OVERRIDE { 33 void AfterCall() const override {
34 codegen_->RecordSafepoint(pointers_, deopt_mode_); 34 codegen_->RecordSafepoint(pointers_, deopt_mode_);
35 } 35 }
36 36
37 private: 37 private:
38 LCodeGen* codegen_; 38 LCodeGen* codegen_;
39 LPointerMap* pointers_; 39 LPointerMap* pointers_;
40 Safepoint::DeoptMode deopt_mode_; 40 Safepoint::DeoptMode deopt_mode_;
41 }; 41 };
42 42
43 43
(...skipping 2732 matching lines...) Expand 10 before | Expand all | Expand 10 after
2776 InstanceofStub stub(isolate(), InstanceofStub::kArgsInRegisters); 2776 InstanceofStub stub(isolate(), InstanceofStub::kArgsInRegisters);
2777 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); 2777 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
2778 2778
2779 __ cmp(r0, Operand::Zero()); 2779 __ cmp(r0, Operand::Zero());
2780 __ mov(r0, Operand(factory()->false_value()), LeaveCC, ne); 2780 __ mov(r0, Operand(factory()->false_value()), LeaveCC, ne);
2781 __ mov(r0, Operand(factory()->true_value()), LeaveCC, eq); 2781 __ mov(r0, Operand(factory()->true_value()), LeaveCC, eq);
2782 } 2782 }
2783 2783
2784 2784
2785 void LCodeGen::DoInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr) { 2785 void LCodeGen::DoInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr) {
2786 class DeferredInstanceOfKnownGlobal FINAL : public LDeferredCode { 2786 class DeferredInstanceOfKnownGlobal final : public LDeferredCode {
2787 public: 2787 public:
2788 DeferredInstanceOfKnownGlobal(LCodeGen* codegen, 2788 DeferredInstanceOfKnownGlobal(LCodeGen* codegen,
2789 LInstanceOfKnownGlobal* instr) 2789 LInstanceOfKnownGlobal* instr)
2790 : LDeferredCode(codegen), instr_(instr) { } 2790 : LDeferredCode(codegen), instr_(instr) { }
2791 void Generate() OVERRIDE { 2791 void Generate() override {
2792 codegen()->DoDeferredInstanceOfKnownGlobal(instr_, &map_check_, 2792 codegen()->DoDeferredInstanceOfKnownGlobal(instr_, &map_check_,
2793 &load_bool_); 2793 &load_bool_);
2794 } 2794 }
2795 LInstruction* instr() OVERRIDE { return instr_; } 2795 LInstruction* instr() override { return instr_; }
2796 Label* map_check() { return &map_check_; } 2796 Label* map_check() { return &map_check_; }
2797 Label* load_bool() { return &load_bool_; } 2797 Label* load_bool() { return &load_bool_; }
2798 2798
2799 private: 2799 private:
2800 LInstanceOfKnownGlobal* instr_; 2800 LInstanceOfKnownGlobal* instr_;
2801 Label map_check_; 2801 Label map_check_;
2802 Label load_bool_; 2802 Label load_bool_;
2803 }; 2803 };
2804 2804
2805 DeferredInstanceOfKnownGlobal* deferred; 2805 DeferredInstanceOfKnownGlobal* deferred;
(...skipping 913 matching lines...) Expand 10 before | Expand all | Expand 10 after
3719 // will clear the V (overflow) flag and rsb won't set this flag 3719 // will clear the V (overflow) flag and rsb won't set this flag
3720 // if input is positive. 3720 // if input is positive.
3721 __ rsb(result, input, Operand::Zero(), SetCC, mi); 3721 __ rsb(result, input, Operand::Zero(), SetCC, mi);
3722 // Deoptimize on overflow. 3722 // Deoptimize on overflow.
3723 DeoptimizeIf(vs, instr, Deoptimizer::kOverflow); 3723 DeoptimizeIf(vs, instr, Deoptimizer::kOverflow);
3724 } 3724 }
3725 3725
3726 3726
3727 void LCodeGen::DoMathAbs(LMathAbs* instr) { 3727 void LCodeGen::DoMathAbs(LMathAbs* instr) {
3728 // Class for deferred case. 3728 // Class for deferred case.
3729 class DeferredMathAbsTaggedHeapNumber FINAL : public LDeferredCode { 3729 class DeferredMathAbsTaggedHeapNumber final : public LDeferredCode {
3730 public: 3730 public:
3731 DeferredMathAbsTaggedHeapNumber(LCodeGen* codegen, LMathAbs* instr) 3731 DeferredMathAbsTaggedHeapNumber(LCodeGen* codegen, LMathAbs* instr)
3732 : LDeferredCode(codegen), instr_(instr) { } 3732 : LDeferredCode(codegen), instr_(instr) { }
3733 void Generate() OVERRIDE { 3733 void Generate() override {
3734 codegen()->DoDeferredMathAbsTaggedHeapNumber(instr_); 3734 codegen()->DoDeferredMathAbsTaggedHeapNumber(instr_);
3735 } 3735 }
3736 LInstruction* instr() OVERRIDE { return instr_; } 3736 LInstruction* instr() override { return instr_; }
3737 3737
3738 private: 3738 private:
3739 LMathAbs* instr_; 3739 LMathAbs* instr_;
3740 }; 3740 };
3741 3741
3742 Representation r = instr->hydrogen()->value()->representation(); 3742 Representation r = instr->hydrogen()->value()->representation();
3743 if (r.IsDouble()) { 3743 if (r.IsDouble()) {
3744 DwVfpRegister input = ToDoubleRegister(instr->value()); 3744 DwVfpRegister input = ToDoubleRegister(instr->value());
3745 DwVfpRegister result = ToDoubleRegister(instr->result()); 3745 DwVfpRegister result = ToDoubleRegister(instr->result());
3746 __ vabs(result, input); 3746 __ vabs(result, input);
(...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after
4537 DCHECK(ToRegister(instr->left()).is(r1)); 4537 DCHECK(ToRegister(instr->left()).is(r1));
4538 DCHECK(ToRegister(instr->right()).is(r0)); 4538 DCHECK(ToRegister(instr->right()).is(r0));
4539 StringAddStub stub(isolate(), 4539 StringAddStub stub(isolate(),
4540 instr->hydrogen()->flags(), 4540 instr->hydrogen()->flags(),
4541 instr->hydrogen()->pretenure_flag()); 4541 instr->hydrogen()->pretenure_flag());
4542 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); 4542 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
4543 } 4543 }
4544 4544
4545 4545
4546 void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) { 4546 void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) {
4547 class DeferredStringCharCodeAt FINAL : public LDeferredCode { 4547 class DeferredStringCharCodeAt final : public LDeferredCode {
4548 public: 4548 public:
4549 DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr) 4549 DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr)
4550 : LDeferredCode(codegen), instr_(instr) { } 4550 : LDeferredCode(codegen), instr_(instr) { }
4551 void Generate() OVERRIDE { codegen()->DoDeferredStringCharCodeAt(instr_); } 4551 void Generate() override { codegen()->DoDeferredStringCharCodeAt(instr_); }
4552 LInstruction* instr() OVERRIDE { return instr_; } 4552 LInstruction* instr() override { return instr_; }
4553 4553
4554 private: 4554 private:
4555 LStringCharCodeAt* instr_; 4555 LStringCharCodeAt* instr_;
4556 }; 4556 };
4557 4557
4558 DeferredStringCharCodeAt* deferred = 4558 DeferredStringCharCodeAt* deferred =
4559 new(zone()) DeferredStringCharCodeAt(this, instr); 4559 new(zone()) DeferredStringCharCodeAt(this, instr);
4560 4560
4561 StringCharLoadGenerator::Generate(masm(), 4561 StringCharLoadGenerator::Generate(masm(),
4562 ToRegister(instr->string()), 4562 ToRegister(instr->string()),
(...skipping 29 matching lines...) Expand all
4592 } 4592 }
4593 CallRuntimeFromDeferred(Runtime::kStringCharCodeAtRT, 2, instr, 4593 CallRuntimeFromDeferred(Runtime::kStringCharCodeAtRT, 2, instr,
4594 instr->context()); 4594 instr->context());
4595 __ AssertSmi(r0); 4595 __ AssertSmi(r0);
4596 __ SmiUntag(r0); 4596 __ SmiUntag(r0);
4597 __ StoreToSafepointRegisterSlot(r0, result); 4597 __ StoreToSafepointRegisterSlot(r0, result);
4598 } 4598 }
4599 4599
4600 4600
4601 void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) { 4601 void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) {
4602 class DeferredStringCharFromCode FINAL : public LDeferredCode { 4602 class DeferredStringCharFromCode final : public LDeferredCode {
4603 public: 4603 public:
4604 DeferredStringCharFromCode(LCodeGen* codegen, LStringCharFromCode* instr) 4604 DeferredStringCharFromCode(LCodeGen* codegen, LStringCharFromCode* instr)
4605 : LDeferredCode(codegen), instr_(instr) { } 4605 : LDeferredCode(codegen), instr_(instr) { }
4606 void Generate() OVERRIDE { 4606 void Generate() override {
4607 codegen()->DoDeferredStringCharFromCode(instr_); 4607 codegen()->DoDeferredStringCharFromCode(instr_);
4608 } 4608 }
4609 LInstruction* instr() OVERRIDE { return instr_; } 4609 LInstruction* instr() override { return instr_; }
4610 4610
4611 private: 4611 private:
4612 LStringCharFromCode* instr_; 4612 LStringCharFromCode* instr_;
4613 }; 4613 };
4614 4614
4615 DeferredStringCharFromCode* deferred = 4615 DeferredStringCharFromCode* deferred =
4616 new(zone()) DeferredStringCharFromCode(this, instr); 4616 new(zone()) DeferredStringCharFromCode(this, instr);
4617 4617
4618 DCHECK(instr->hydrogen()->value()->representation().IsInteger32()); 4618 DCHECK(instr->hydrogen()->value()->representation().IsInteger32());
4619 Register char_code = ToRegister(instr->char_code()); 4619 Register char_code = ToRegister(instr->char_code());
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
4670 LOperand* input = instr->value(); 4670 LOperand* input = instr->value();
4671 LOperand* output = instr->result(); 4671 LOperand* output = instr->result();
4672 4672
4673 SwVfpRegister flt_scratch = double_scratch0().low(); 4673 SwVfpRegister flt_scratch = double_scratch0().low();
4674 __ vmov(flt_scratch, ToRegister(input)); 4674 __ vmov(flt_scratch, ToRegister(input));
4675 __ vcvt_f64_u32(ToDoubleRegister(output), flt_scratch); 4675 __ vcvt_f64_u32(ToDoubleRegister(output), flt_scratch);
4676 } 4676 }
4677 4677
4678 4678
4679 void LCodeGen::DoNumberTagI(LNumberTagI* instr) { 4679 void LCodeGen::DoNumberTagI(LNumberTagI* instr) {
4680 class DeferredNumberTagI FINAL : public LDeferredCode { 4680 class DeferredNumberTagI final : public LDeferredCode {
4681 public: 4681 public:
4682 DeferredNumberTagI(LCodeGen* codegen, LNumberTagI* instr) 4682 DeferredNumberTagI(LCodeGen* codegen, LNumberTagI* instr)
4683 : LDeferredCode(codegen), instr_(instr) { } 4683 : LDeferredCode(codegen), instr_(instr) { }
4684 void Generate() OVERRIDE { 4684 void Generate() override {
4685 codegen()->DoDeferredNumberTagIU(instr_, 4685 codegen()->DoDeferredNumberTagIU(instr_,
4686 instr_->value(), 4686 instr_->value(),
4687 instr_->temp1(), 4687 instr_->temp1(),
4688 instr_->temp2(), 4688 instr_->temp2(),
4689 SIGNED_INT32); 4689 SIGNED_INT32);
4690 } 4690 }
4691 LInstruction* instr() OVERRIDE { return instr_; } 4691 LInstruction* instr() override { return instr_; }
4692 4692
4693 private: 4693 private:
4694 LNumberTagI* instr_; 4694 LNumberTagI* instr_;
4695 }; 4695 };
4696 4696
4697 Register src = ToRegister(instr->value()); 4697 Register src = ToRegister(instr->value());
4698 Register dst = ToRegister(instr->result()); 4698 Register dst = ToRegister(instr->result());
4699 4699
4700 DeferredNumberTagI* deferred = new(zone()) DeferredNumberTagI(this, instr); 4700 DeferredNumberTagI* deferred = new(zone()) DeferredNumberTagI(this, instr);
4701 __ SmiTag(dst, src, SetCC); 4701 __ SmiTag(dst, src, SetCC);
4702 __ b(vs, deferred->entry()); 4702 __ b(vs, deferred->entry());
4703 __ bind(deferred->exit()); 4703 __ bind(deferred->exit());
4704 } 4704 }
4705 4705
4706 4706
4707 void LCodeGen::DoNumberTagU(LNumberTagU* instr) { 4707 void LCodeGen::DoNumberTagU(LNumberTagU* instr) {
4708 class DeferredNumberTagU FINAL : public LDeferredCode { 4708 class DeferredNumberTagU final : public LDeferredCode {
4709 public: 4709 public:
4710 DeferredNumberTagU(LCodeGen* codegen, LNumberTagU* instr) 4710 DeferredNumberTagU(LCodeGen* codegen, LNumberTagU* instr)
4711 : LDeferredCode(codegen), instr_(instr) { } 4711 : LDeferredCode(codegen), instr_(instr) { }
4712 void Generate() OVERRIDE { 4712 void Generate() override {
4713 codegen()->DoDeferredNumberTagIU(instr_, 4713 codegen()->DoDeferredNumberTagIU(instr_,
4714 instr_->value(), 4714 instr_->value(),
4715 instr_->temp1(), 4715 instr_->temp1(),
4716 instr_->temp2(), 4716 instr_->temp2(),
4717 UNSIGNED_INT32); 4717 UNSIGNED_INT32);
4718 } 4718 }
4719 LInstruction* instr() OVERRIDE { return instr_; } 4719 LInstruction* instr() override { return instr_; }
4720 4720
4721 private: 4721 private:
4722 LNumberTagU* instr_; 4722 LNumberTagU* instr_;
4723 }; 4723 };
4724 4724
4725 Register input = ToRegister(instr->value()); 4725 Register input = ToRegister(instr->value());
4726 Register result = ToRegister(instr->result()); 4726 Register result = ToRegister(instr->result());
4727 4727
4728 DeferredNumberTagU* deferred = new(zone()) DeferredNumberTagU(this, instr); 4728 DeferredNumberTagU* deferred = new(zone()) DeferredNumberTagU(this, instr);
4729 __ cmp(input, Operand(Smi::kMaxValue)); 4729 __ cmp(input, Operand(Smi::kMaxValue));
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
4793 4793
4794 // Done. Put the value in dbl_scratch into the value of the allocated heap 4794 // Done. Put the value in dbl_scratch into the value of the allocated heap
4795 // number. 4795 // number.
4796 __ bind(&done); 4796 __ bind(&done);
4797 __ vstr(dbl_scratch, dst, HeapNumber::kValueOffset); 4797 __ vstr(dbl_scratch, dst, HeapNumber::kValueOffset);
4798 __ add(dst, dst, Operand(kHeapObjectTag)); 4798 __ add(dst, dst, Operand(kHeapObjectTag));
4799 } 4799 }
4800 4800
4801 4801
4802 void LCodeGen::DoNumberTagD(LNumberTagD* instr) { 4802 void LCodeGen::DoNumberTagD(LNumberTagD* instr) {
4803 class DeferredNumberTagD FINAL : public LDeferredCode { 4803 class DeferredNumberTagD final : public LDeferredCode {
4804 public: 4804 public:
4805 DeferredNumberTagD(LCodeGen* codegen, LNumberTagD* instr) 4805 DeferredNumberTagD(LCodeGen* codegen, LNumberTagD* instr)
4806 : LDeferredCode(codegen), instr_(instr) { } 4806 : LDeferredCode(codegen), instr_(instr) { }
4807 void Generate() OVERRIDE { codegen()->DoDeferredNumberTagD(instr_); } 4807 void Generate() override { codegen()->DoDeferredNumberTagD(instr_); }
4808 LInstruction* instr() OVERRIDE { return instr_; } 4808 LInstruction* instr() override { return instr_; }
4809 4809
4810 private: 4810 private:
4811 LNumberTagD* instr_; 4811 LNumberTagD* instr_;
4812 }; 4812 };
4813 4813
4814 DwVfpRegister input_reg = ToDoubleRegister(instr->value()); 4814 DwVfpRegister input_reg = ToDoubleRegister(instr->value());
4815 Register scratch = scratch0(); 4815 Register scratch = scratch0();
4816 Register reg = ToRegister(instr->result()); 4816 Register reg = ToRegister(instr->result());
4817 Register temp1 = ToRegister(instr->temp()); 4817 Register temp1 = ToRegister(instr->temp());
4818 Register temp2 = ToRegister(instr->temp2()); 4818 Register temp2 = ToRegister(instr->temp2());
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
5011 __ VmovHigh(scratch1, double_scratch2); 5011 __ VmovHigh(scratch1, double_scratch2);
5012 __ tst(scratch1, Operand(HeapNumber::kSignMask)); 5012 __ tst(scratch1, Operand(HeapNumber::kSignMask));
5013 DeoptimizeIf(ne, instr, Deoptimizer::kMinusZero); 5013 DeoptimizeIf(ne, instr, Deoptimizer::kMinusZero);
5014 } 5014 }
5015 } 5015 }
5016 __ bind(&done); 5016 __ bind(&done);
5017 } 5017 }
5018 5018
5019 5019
5020 void LCodeGen::DoTaggedToI(LTaggedToI* instr) { 5020 void LCodeGen::DoTaggedToI(LTaggedToI* instr) {
5021 class DeferredTaggedToI FINAL : public LDeferredCode { 5021 class DeferredTaggedToI final : public LDeferredCode {
5022 public: 5022 public:
5023 DeferredTaggedToI(LCodeGen* codegen, LTaggedToI* instr) 5023 DeferredTaggedToI(LCodeGen* codegen, LTaggedToI* instr)
5024 : LDeferredCode(codegen), instr_(instr) { } 5024 : LDeferredCode(codegen), instr_(instr) { }
5025 void Generate() OVERRIDE { codegen()->DoDeferredTaggedToI(instr_); } 5025 void Generate() override { codegen()->DoDeferredTaggedToI(instr_); }
5026 LInstruction* instr() OVERRIDE { return instr_; } 5026 LInstruction* instr() override { return instr_; }
5027 5027
5028 private: 5028 private:
5029 LTaggedToI* instr_; 5029 LTaggedToI* instr_;
5030 }; 5030 };
5031 5031
5032 LOperand* input = instr->value(); 5032 LOperand* input = instr->value();
5033 DCHECK(input->IsRegister()); 5033 DCHECK(input->IsRegister());
5034 DCHECK(input->Equals(instr->result())); 5034 DCHECK(input->Equals(instr->result()));
5035 5035
5036 Register input_reg = ToRegister(input); 5036 Register input_reg = ToRegister(input);
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
5205 RecordSafepointWithRegisters( 5205 RecordSafepointWithRegisters(
5206 instr->pointer_map(), 1, Safepoint::kNoLazyDeopt); 5206 instr->pointer_map(), 1, Safepoint::kNoLazyDeopt);
5207 __ StoreToSafepointRegisterSlot(r0, scratch0()); 5207 __ StoreToSafepointRegisterSlot(r0, scratch0());
5208 } 5208 }
5209 __ tst(scratch0(), Operand(kSmiTagMask)); 5209 __ tst(scratch0(), Operand(kSmiTagMask));
5210 DeoptimizeIf(eq, instr, Deoptimizer::kInstanceMigrationFailed); 5210 DeoptimizeIf(eq, instr, Deoptimizer::kInstanceMigrationFailed);
5211 } 5211 }
5212 5212
5213 5213
5214 void LCodeGen::DoCheckMaps(LCheckMaps* instr) { 5214 void LCodeGen::DoCheckMaps(LCheckMaps* instr) {
5215 class DeferredCheckMaps FINAL : public LDeferredCode { 5215 class DeferredCheckMaps final : public LDeferredCode {
5216 public: 5216 public:
5217 DeferredCheckMaps(LCodeGen* codegen, LCheckMaps* instr, Register object) 5217 DeferredCheckMaps(LCodeGen* codegen, LCheckMaps* instr, Register object)
5218 : LDeferredCode(codegen), instr_(instr), object_(object) { 5218 : LDeferredCode(codegen), instr_(instr), object_(object) {
5219 SetExit(check_maps()); 5219 SetExit(check_maps());
5220 } 5220 }
5221 void Generate() OVERRIDE { 5221 void Generate() override {
5222 codegen()->DoDeferredInstanceMigration(instr_, object_); 5222 codegen()->DoDeferredInstanceMigration(instr_, object_);
5223 } 5223 }
5224 Label* check_maps() { return &check_maps_; } 5224 Label* check_maps() { return &check_maps_; }
5225 LInstruction* instr() OVERRIDE { return instr_; } 5225 LInstruction* instr() override { return instr_; }
5226 5226
5227 private: 5227 private:
5228 LCheckMaps* instr_; 5228 LCheckMaps* instr_;
5229 Label check_maps_; 5229 Label check_maps_;
5230 Register object_; 5230 Register object_;
5231 }; 5231 };
5232 5232
5233 if (instr->hydrogen()->IsStabilityCheck()) { 5233 if (instr->hydrogen()->IsStabilityCheck()) {
5234 const UniqueSet<Map>* maps = instr->hydrogen()->maps(); 5234 const UniqueSet<Map>* maps = instr->hydrogen()->maps();
5235 for (int i = 0; i < maps->size(); ++i) { 5235 for (int i = 0; i < maps->size(); ++i) {
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
5336 void LCodeGen::DoConstructDouble(LConstructDouble* instr) { 5336 void LCodeGen::DoConstructDouble(LConstructDouble* instr) {
5337 Register hi_reg = ToRegister(instr->hi()); 5337 Register hi_reg = ToRegister(instr->hi());
5338 Register lo_reg = ToRegister(instr->lo()); 5338 Register lo_reg = ToRegister(instr->lo());
5339 DwVfpRegister result_reg = ToDoubleRegister(instr->result()); 5339 DwVfpRegister result_reg = ToDoubleRegister(instr->result());
5340 __ VmovHigh(result_reg, hi_reg); 5340 __ VmovHigh(result_reg, hi_reg);
5341 __ VmovLow(result_reg, lo_reg); 5341 __ VmovLow(result_reg, lo_reg);
5342 } 5342 }
5343 5343
5344 5344
5345 void LCodeGen::DoAllocate(LAllocate* instr) { 5345 void LCodeGen::DoAllocate(LAllocate* instr) {
5346 class DeferredAllocate FINAL : public LDeferredCode { 5346 class DeferredAllocate final : public LDeferredCode {
5347 public: 5347 public:
5348 DeferredAllocate(LCodeGen* codegen, LAllocate* instr) 5348 DeferredAllocate(LCodeGen* codegen, LAllocate* instr)
5349 : LDeferredCode(codegen), instr_(instr) { } 5349 : LDeferredCode(codegen), instr_(instr) { }
5350 void Generate() OVERRIDE { codegen()->DoDeferredAllocate(instr_); } 5350 void Generate() override { codegen()->DoDeferredAllocate(instr_); }
5351 LInstruction* instr() OVERRIDE { return instr_; } 5351 LInstruction* instr() override { return instr_; }
5352 5352
5353 private: 5353 private:
5354 LAllocate* instr_; 5354 LAllocate* instr_;
5355 }; 5355 };
5356 5356
5357 DeferredAllocate* deferred = 5357 DeferredAllocate* deferred =
5358 new(zone()) DeferredAllocate(this, instr); 5358 new(zone()) DeferredAllocate(this, instr);
5359 5359
5360 Register result = ToRegister(instr->result()); 5360 Register result = ToRegister(instr->result());
5361 Register scratch = ToRegister(instr->temp1()); 5361 Register scratch = ToRegister(instr->temp1());
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
5692 __ CallRuntimeSaveDoubles(Runtime::kStackGuard); 5692 __ CallRuntimeSaveDoubles(Runtime::kStackGuard);
5693 RecordSafepointWithLazyDeopt( 5693 RecordSafepointWithLazyDeopt(
5694 instr, RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS); 5694 instr, RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS);
5695 DCHECK(instr->HasEnvironment()); 5695 DCHECK(instr->HasEnvironment());
5696 LEnvironment* env = instr->environment(); 5696 LEnvironment* env = instr->environment();
5697 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); 5697 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index());
5698 } 5698 }
5699 5699
5700 5700
5701 void LCodeGen::DoStackCheck(LStackCheck* instr) { 5701 void LCodeGen::DoStackCheck(LStackCheck* instr) {
5702 class DeferredStackCheck FINAL : public LDeferredCode { 5702 class DeferredStackCheck final : public LDeferredCode {
5703 public: 5703 public:
5704 DeferredStackCheck(LCodeGen* codegen, LStackCheck* instr) 5704 DeferredStackCheck(LCodeGen* codegen, LStackCheck* instr)
5705 : LDeferredCode(codegen), instr_(instr) { } 5705 : LDeferredCode(codegen), instr_(instr) { }
5706 void Generate() OVERRIDE { codegen()->DoDeferredStackCheck(instr_); } 5706 void Generate() override { codegen()->DoDeferredStackCheck(instr_); }
5707 LInstruction* instr() OVERRIDE { return instr_; } 5707 LInstruction* instr() override { return instr_; }
5708 5708
5709 private: 5709 private:
5710 LStackCheck* instr_; 5710 LStackCheck* instr_;
5711 }; 5711 };
5712 5712
5713 DCHECK(instr->HasEnvironment()); 5713 DCHECK(instr->HasEnvironment());
5714 LEnvironment* env = instr->environment(); 5714 LEnvironment* env = instr->environment();
5715 // There is no LLazyBailout instruction for stack-checks. We have to 5715 // There is no LLazyBailout instruction for stack-checks. We have to
5716 // prepare for lazy deoptimization explicitly here. 5716 // prepare for lazy deoptimization explicitly here.
5717 if (instr->hydrogen()->is_function_entry()) { 5717 if (instr->hydrogen()->is_function_entry()) {
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
5831 __ Push(index); 5831 __ Push(index);
5832 __ mov(cp, Operand::Zero()); 5832 __ mov(cp, Operand::Zero());
5833 __ CallRuntimeSaveDoubles(Runtime::kLoadMutableDouble); 5833 __ CallRuntimeSaveDoubles(Runtime::kLoadMutableDouble);
5834 RecordSafepointWithRegisters( 5834 RecordSafepointWithRegisters(
5835 instr->pointer_map(), 2, Safepoint::kNoLazyDeopt); 5835 instr->pointer_map(), 2, Safepoint::kNoLazyDeopt);
5836 __ StoreToSafepointRegisterSlot(r0, result); 5836 __ StoreToSafepointRegisterSlot(r0, result);
5837 } 5837 }
5838 5838
5839 5839
5840 void LCodeGen::DoLoadFieldByIndex(LLoadFieldByIndex* instr) { 5840 void LCodeGen::DoLoadFieldByIndex(LLoadFieldByIndex* instr) {
5841 class DeferredLoadMutableDouble FINAL : public LDeferredCode { 5841 class DeferredLoadMutableDouble final : public LDeferredCode {
5842 public: 5842 public:
5843 DeferredLoadMutableDouble(LCodeGen* codegen, 5843 DeferredLoadMutableDouble(LCodeGen* codegen,
5844 LLoadFieldByIndex* instr, 5844 LLoadFieldByIndex* instr,
5845 Register result, 5845 Register result,
5846 Register object, 5846 Register object,
5847 Register index) 5847 Register index)
5848 : LDeferredCode(codegen), 5848 : LDeferredCode(codegen),
5849 instr_(instr), 5849 instr_(instr),
5850 result_(result), 5850 result_(result),
5851 object_(object), 5851 object_(object),
5852 index_(index) { 5852 index_(index) {
5853 } 5853 }
5854 void Generate() OVERRIDE { 5854 void Generate() override {
5855 codegen()->DoDeferredLoadMutableDouble(instr_, result_, object_, index_); 5855 codegen()->DoDeferredLoadMutableDouble(instr_, result_, object_, index_);
5856 } 5856 }
5857 LInstruction* instr() OVERRIDE { return instr_; } 5857 LInstruction* instr() override { return instr_; }
5858 5858
5859 private: 5859 private:
5860 LLoadFieldByIndex* instr_; 5860 LLoadFieldByIndex* instr_;
5861 Register result_; 5861 Register result_;
5862 Register object_; 5862 Register object_;
5863 Register index_; 5863 Register index_;
5864 }; 5864 };
5865 5865
5866 Register object = ToRegister(instr->object()); 5866 Register object = ToRegister(instr->object());
5867 Register index = ToRegister(instr->index()); 5867 Register index = ToRegister(instr->index());
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
5909 __ Push(scope_info); 5909 __ Push(scope_info);
5910 __ push(ToRegister(instr->function())); 5910 __ push(ToRegister(instr->function()));
5911 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5911 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5912 RecordSafepoint(Safepoint::kNoLazyDeopt); 5912 RecordSafepoint(Safepoint::kNoLazyDeopt);
5913 } 5913 }
5914 5914
5915 5915
5916 #undef __ 5916 #undef __
5917 5917
5918 } } // namespace v8::internal 5918 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.h ('k') | src/arm/lithium-gap-resolver-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698