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

Side by Side Diff: src/mips64/lithium-codegen-mips64.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/mips64/lithium-codegen-mips64.h ('k') | src/mips64/lithium-gap-resolver-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/v8.h" 5 #include "src/v8.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/cpu-profiler.h" 9 #include "src/cpu-profiler.h"
10 #include "src/hydrogen-osr.h" 10 #include "src/hydrogen-osr.h"
11 #include "src/ic/ic.h" 11 #include "src/ic/ic.h"
12 #include "src/ic/stub-cache.h" 12 #include "src/ic/stub-cache.h"
13 #include "src/mips64/lithium-codegen-mips64.h" 13 #include "src/mips64/lithium-codegen-mips64.h"
14 #include "src/mips64/lithium-gap-resolver-mips64.h" 14 #include "src/mips64/lithium-gap-resolver-mips64.h"
15 15
16 namespace v8 { 16 namespace v8 {
17 namespace internal { 17 namespace internal {
18 18
19 19
20 class SafepointGenerator FINAL : public CallWrapper { 20 class SafepointGenerator final : public CallWrapper {
21 public: 21 public:
22 SafepointGenerator(LCodeGen* codegen, 22 SafepointGenerator(LCodeGen* codegen,
23 LPointerMap* pointers, 23 LPointerMap* pointers,
24 Safepoint::DeoptMode mode) 24 Safepoint::DeoptMode mode)
25 : codegen_(codegen), 25 : codegen_(codegen),
26 pointers_(pointers), 26 pointers_(pointers),
27 deopt_mode_(mode) { } 27 deopt_mode_(mode) { }
28 virtual ~SafepointGenerator() {} 28 virtual ~SafepointGenerator() {}
29 29
30 void BeforeCall(int call_size) const OVERRIDE {} 30 void BeforeCall(int call_size) const override {}
31 31
32 void AfterCall() const OVERRIDE { 32 void AfterCall() const override {
33 codegen_->RecordSafepoint(pointers_, deopt_mode_); 33 codegen_->RecordSafepoint(pointers_, deopt_mode_);
34 } 34 }
35 35
36 private: 36 private:
37 LCodeGen* codegen_; 37 LCodeGen* codegen_;
38 LPointerMap* pointers_; 38 LPointerMap* pointers_;
39 Safepoint::DeoptMode deopt_mode_; 39 Safepoint::DeoptMode deopt_mode_;
40 }; 40 };
41 41
42 42
(...skipping 2668 matching lines...) Expand 10 before | Expand all | Expand 10 after
2711 __ Branch(&true_label, eq, result, Operand(zero_reg)); 2711 __ Branch(&true_label, eq, result, Operand(zero_reg));
2712 __ li(result, Operand(factory()->false_value())); 2712 __ li(result, Operand(factory()->false_value()));
2713 __ Branch(&done); 2713 __ Branch(&done);
2714 __ bind(&true_label); 2714 __ bind(&true_label);
2715 __ li(result, Operand(factory()->true_value())); 2715 __ li(result, Operand(factory()->true_value()));
2716 __ bind(&done); 2716 __ bind(&done);
2717 } 2717 }
2718 2718
2719 2719
2720 void LCodeGen::DoInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr) { 2720 void LCodeGen::DoInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr) {
2721 class DeferredInstanceOfKnownGlobal FINAL : public LDeferredCode { 2721 class DeferredInstanceOfKnownGlobal final : public LDeferredCode {
2722 public: 2722 public:
2723 DeferredInstanceOfKnownGlobal(LCodeGen* codegen, 2723 DeferredInstanceOfKnownGlobal(LCodeGen* codegen,
2724 LInstanceOfKnownGlobal* instr) 2724 LInstanceOfKnownGlobal* instr)
2725 : LDeferredCode(codegen), instr_(instr) { } 2725 : LDeferredCode(codegen), instr_(instr) { }
2726 void Generate() OVERRIDE { 2726 void Generate() override {
2727 codegen()->DoDeferredInstanceOfKnownGlobal(instr_, &map_check_); 2727 codegen()->DoDeferredInstanceOfKnownGlobal(instr_, &map_check_);
2728 } 2728 }
2729 LInstruction* instr() OVERRIDE { return instr_; } 2729 LInstruction* instr() override { return instr_; }
2730 Label* map_check() { return &map_check_; } 2730 Label* map_check() { return &map_check_; }
2731 2731
2732 private: 2732 private:
2733 LInstanceOfKnownGlobal* instr_; 2733 LInstanceOfKnownGlobal* instr_;
2734 Label map_check_; 2734 Label map_check_;
2735 }; 2735 };
2736 2736
2737 DeferredInstanceOfKnownGlobal* deferred; 2737 DeferredInstanceOfKnownGlobal* deferred;
2738 deferred = new(zone()) DeferredInstanceOfKnownGlobal(this, instr); 2738 deferred = new(zone()) DeferredInstanceOfKnownGlobal(this, instr);
2739 2739
(...skipping 981 matching lines...) Expand 10 before | Expand all | Expand 10 after
3721 __ mov(result, input); 3721 __ mov(result, input);
3722 __ dsubu(result, zero_reg, input); 3722 __ dsubu(result, zero_reg, input);
3723 // Overflow if result is still negative, i.e. 0x80000000. 3723 // Overflow if result is still negative, i.e. 0x80000000.
3724 DeoptimizeIf(lt, instr, Deoptimizer::kOverflow, result, Operand(zero_reg)); 3724 DeoptimizeIf(lt, instr, Deoptimizer::kOverflow, result, Operand(zero_reg));
3725 __ bind(&done); 3725 __ bind(&done);
3726 } 3726 }
3727 3727
3728 3728
3729 void LCodeGen::DoMathAbs(LMathAbs* instr) { 3729 void LCodeGen::DoMathAbs(LMathAbs* instr) {
3730 // Class for deferred case. 3730 // Class for deferred case.
3731 class DeferredMathAbsTaggedHeapNumber FINAL : public LDeferredCode { 3731 class DeferredMathAbsTaggedHeapNumber final : public LDeferredCode {
3732 public: 3732 public:
3733 DeferredMathAbsTaggedHeapNumber(LCodeGen* codegen, LMathAbs* instr) 3733 DeferredMathAbsTaggedHeapNumber(LCodeGen* codegen, LMathAbs* instr)
3734 : LDeferredCode(codegen), instr_(instr) { } 3734 : LDeferredCode(codegen), instr_(instr) { }
3735 void Generate() OVERRIDE { 3735 void Generate() override {
3736 codegen()->DoDeferredMathAbsTaggedHeapNumber(instr_); 3736 codegen()->DoDeferredMathAbsTaggedHeapNumber(instr_);
3737 } 3737 }
3738 LInstruction* instr() OVERRIDE { return instr_; } 3738 LInstruction* instr() override { return instr_; }
3739 3739
3740 private: 3740 private:
3741 LMathAbs* instr_; 3741 LMathAbs* instr_;
3742 }; 3742 };
3743 3743
3744 Representation r = instr->hydrogen()->value()->representation(); 3744 Representation r = instr->hydrogen()->value()->representation();
3745 if (r.IsDouble()) { 3745 if (r.IsDouble()) {
3746 FPURegister input = ToDoubleRegister(instr->value()); 3746 FPURegister input = ToDoubleRegister(instr->value());
3747 FPURegister result = ToDoubleRegister(instr->result()); 3747 FPURegister result = ToDoubleRegister(instr->result());
3748 __ abs_d(result, input); 3748 __ abs_d(result, input);
(...skipping 866 matching lines...) Expand 10 before | Expand all | Expand 10 after
4615 DCHECK(ToRegister(instr->left()).is(a1)); 4615 DCHECK(ToRegister(instr->left()).is(a1));
4616 DCHECK(ToRegister(instr->right()).is(a0)); 4616 DCHECK(ToRegister(instr->right()).is(a0));
4617 StringAddStub stub(isolate(), 4617 StringAddStub stub(isolate(),
4618 instr->hydrogen()->flags(), 4618 instr->hydrogen()->flags(),
4619 instr->hydrogen()->pretenure_flag()); 4619 instr->hydrogen()->pretenure_flag());
4620 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); 4620 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
4621 } 4621 }
4622 4622
4623 4623
4624 void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) { 4624 void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) {
4625 class DeferredStringCharCodeAt FINAL : public LDeferredCode { 4625 class DeferredStringCharCodeAt final : public LDeferredCode {
4626 public: 4626 public:
4627 DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr) 4627 DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr)
4628 : LDeferredCode(codegen), instr_(instr) { } 4628 : LDeferredCode(codegen), instr_(instr) { }
4629 void Generate() OVERRIDE { codegen()->DoDeferredStringCharCodeAt(instr_); } 4629 void Generate() override { codegen()->DoDeferredStringCharCodeAt(instr_); }
4630 LInstruction* instr() OVERRIDE { return instr_; } 4630 LInstruction* instr() override { return instr_; }
4631 4631
4632 private: 4632 private:
4633 LStringCharCodeAt* instr_; 4633 LStringCharCodeAt* instr_;
4634 }; 4634 };
4635 4635
4636 DeferredStringCharCodeAt* deferred = 4636 DeferredStringCharCodeAt* deferred =
4637 new(zone()) DeferredStringCharCodeAt(this, instr); 4637 new(zone()) DeferredStringCharCodeAt(this, instr);
4638 StringCharLoadGenerator::Generate(masm(), 4638 StringCharLoadGenerator::Generate(masm(),
4639 ToRegister(instr->string()), 4639 ToRegister(instr->string()),
4640 ToRegister(instr->index()), 4640 ToRegister(instr->index()),
(...skipping 28 matching lines...) Expand all
4669 } 4669 }
4670 CallRuntimeFromDeferred(Runtime::kStringCharCodeAtRT, 2, instr, 4670 CallRuntimeFromDeferred(Runtime::kStringCharCodeAtRT, 2, instr,
4671 instr->context()); 4671 instr->context());
4672 __ AssertSmi(v0); 4672 __ AssertSmi(v0);
4673 __ SmiUntag(v0); 4673 __ SmiUntag(v0);
4674 __ StoreToSafepointRegisterSlot(v0, result); 4674 __ StoreToSafepointRegisterSlot(v0, result);
4675 } 4675 }
4676 4676
4677 4677
4678 void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) { 4678 void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) {
4679 class DeferredStringCharFromCode FINAL : public LDeferredCode { 4679 class DeferredStringCharFromCode final : public LDeferredCode {
4680 public: 4680 public:
4681 DeferredStringCharFromCode(LCodeGen* codegen, LStringCharFromCode* instr) 4681 DeferredStringCharFromCode(LCodeGen* codegen, LStringCharFromCode* instr)
4682 : LDeferredCode(codegen), instr_(instr) { } 4682 : LDeferredCode(codegen), instr_(instr) { }
4683 void Generate() OVERRIDE { 4683 void Generate() override {
4684 codegen()->DoDeferredStringCharFromCode(instr_); 4684 codegen()->DoDeferredStringCharFromCode(instr_);
4685 } 4685 }
4686 LInstruction* instr() OVERRIDE { return instr_; } 4686 LInstruction* instr() override { return instr_; }
4687 4687
4688 private: 4688 private:
4689 LStringCharFromCode* instr_; 4689 LStringCharFromCode* instr_;
4690 }; 4690 };
4691 4691
4692 DeferredStringCharFromCode* deferred = 4692 DeferredStringCharFromCode* deferred =
4693 new(zone()) DeferredStringCharFromCode(this, instr); 4693 new(zone()) DeferredStringCharFromCode(this, instr);
4694 4694
4695 DCHECK(instr->hydrogen()->value()->representation().IsInteger32()); 4695 DCHECK(instr->hydrogen()->value()->representation().IsInteger32());
4696 Register char_code = ToRegister(instr->char_code()); 4696 Register char_code = ToRegister(instr->char_code());
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
4748 LOperand* input = instr->value(); 4748 LOperand* input = instr->value();
4749 LOperand* output = instr->result(); 4749 LOperand* output = instr->result();
4750 4750
4751 FPURegister dbl_scratch = double_scratch0(); 4751 FPURegister dbl_scratch = double_scratch0();
4752 __ mtc1(ToRegister(input), dbl_scratch); 4752 __ mtc1(ToRegister(input), dbl_scratch);
4753 __ Cvt_d_uw(ToDoubleRegister(output), dbl_scratch, f22); // TODO(plind): f22? 4753 __ Cvt_d_uw(ToDoubleRegister(output), dbl_scratch, f22); // TODO(plind): f22?
4754 } 4754 }
4755 4755
4756 4756
4757 void LCodeGen::DoNumberTagU(LNumberTagU* instr) { 4757 void LCodeGen::DoNumberTagU(LNumberTagU* instr) {
4758 class DeferredNumberTagU FINAL : public LDeferredCode { 4758 class DeferredNumberTagU final : public LDeferredCode {
4759 public: 4759 public:
4760 DeferredNumberTagU(LCodeGen* codegen, LNumberTagU* instr) 4760 DeferredNumberTagU(LCodeGen* codegen, LNumberTagU* instr)
4761 : LDeferredCode(codegen), instr_(instr) { } 4761 : LDeferredCode(codegen), instr_(instr) { }
4762 void Generate() OVERRIDE { 4762 void Generate() override {
4763 codegen()->DoDeferredNumberTagIU(instr_, 4763 codegen()->DoDeferredNumberTagIU(instr_,
4764 instr_->value(), 4764 instr_->value(),
4765 instr_->temp1(), 4765 instr_->temp1(),
4766 instr_->temp2(), 4766 instr_->temp2(),
4767 UNSIGNED_INT32); 4767 UNSIGNED_INT32);
4768 } 4768 }
4769 LInstruction* instr() OVERRIDE { return instr_; } 4769 LInstruction* instr() override { return instr_; }
4770 4770
4771 private: 4771 private:
4772 LNumberTagU* instr_; 4772 LNumberTagU* instr_;
4773 }; 4773 };
4774 4774
4775 Register input = ToRegister(instr->value()); 4775 Register input = ToRegister(instr->value());
4776 Register result = ToRegister(instr->result()); 4776 Register result = ToRegister(instr->result());
4777 4777
4778 DeferredNumberTagU* deferred = new(zone()) DeferredNumberTagU(this, instr); 4778 DeferredNumberTagU* deferred = new(zone()) DeferredNumberTagU(this, instr);
4779 __ Branch(deferred->entry(), hi, input, Operand(Smi::kMaxValue)); 4779 __ Branch(deferred->entry(), hi, input, Operand(Smi::kMaxValue));
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
4839 } 4839 }
4840 4840
4841 // Done. Put the value in dbl_scratch into the value of the allocated heap 4841 // Done. Put the value in dbl_scratch into the value of the allocated heap
4842 // number. 4842 // number.
4843 __ bind(&done); 4843 __ bind(&done);
4844 __ sdc1(dbl_scratch, FieldMemOperand(dst, HeapNumber::kValueOffset)); 4844 __ sdc1(dbl_scratch, FieldMemOperand(dst, HeapNumber::kValueOffset));
4845 } 4845 }
4846 4846
4847 4847
4848 void LCodeGen::DoNumberTagD(LNumberTagD* instr) { 4848 void LCodeGen::DoNumberTagD(LNumberTagD* instr) {
4849 class DeferredNumberTagD FINAL : public LDeferredCode { 4849 class DeferredNumberTagD final : public LDeferredCode {
4850 public: 4850 public:
4851 DeferredNumberTagD(LCodeGen* codegen, LNumberTagD* instr) 4851 DeferredNumberTagD(LCodeGen* codegen, LNumberTagD* instr)
4852 : LDeferredCode(codegen), instr_(instr) { } 4852 : LDeferredCode(codegen), instr_(instr) { }
4853 void Generate() OVERRIDE { codegen()->DoDeferredNumberTagD(instr_); } 4853 void Generate() override { codegen()->DoDeferredNumberTagD(instr_); }
4854 LInstruction* instr() OVERRIDE { return instr_; } 4854 LInstruction* instr() override { return instr_; }
4855 4855
4856 private: 4856 private:
4857 LNumberTagD* instr_; 4857 LNumberTagD* instr_;
4858 }; 4858 };
4859 4859
4860 DoubleRegister input_reg = ToDoubleRegister(instr->value()); 4860 DoubleRegister input_reg = ToDoubleRegister(instr->value());
4861 Register scratch = scratch0(); 4861 Register scratch = scratch0();
4862 Register reg = ToRegister(instr->result()); 4862 Register reg = ToRegister(instr->result());
4863 Register temp1 = ToRegister(instr->temp()); 4863 Register temp1 = ToRegister(instr->temp());
4864 Register temp2 = ToRegister(instr->temp2()); 4864 Register temp2 = ToRegister(instr->temp2());
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
5067 __ And(scratch1, scratch1, Operand(HeapNumber::kSignMask)); 5067 __ And(scratch1, scratch1, Operand(HeapNumber::kSignMask));
5068 DeoptimizeIf(ne, instr, Deoptimizer::kMinusZero, scratch1, 5068 DeoptimizeIf(ne, instr, Deoptimizer::kMinusZero, scratch1,
5069 Operand(zero_reg)); 5069 Operand(zero_reg));
5070 } 5070 }
5071 } 5071 }
5072 __ bind(&done); 5072 __ bind(&done);
5073 } 5073 }
5074 5074
5075 5075
5076 void LCodeGen::DoTaggedToI(LTaggedToI* instr) { 5076 void LCodeGen::DoTaggedToI(LTaggedToI* instr) {
5077 class DeferredTaggedToI FINAL : public LDeferredCode { 5077 class DeferredTaggedToI final : public LDeferredCode {
5078 public: 5078 public:
5079 DeferredTaggedToI(LCodeGen* codegen, LTaggedToI* instr) 5079 DeferredTaggedToI(LCodeGen* codegen, LTaggedToI* instr)
5080 : LDeferredCode(codegen), instr_(instr) { } 5080 : LDeferredCode(codegen), instr_(instr) { }
5081 void Generate() OVERRIDE { codegen()->DoDeferredTaggedToI(instr_); } 5081 void Generate() override { codegen()->DoDeferredTaggedToI(instr_); }
5082 LInstruction* instr() OVERRIDE { return instr_; } 5082 LInstruction* instr() override { return instr_; }
5083 5083
5084 private: 5084 private:
5085 LTaggedToI* instr_; 5085 LTaggedToI* instr_;
5086 }; 5086 };
5087 5087
5088 LOperand* input = instr->value(); 5088 LOperand* input = instr->value();
5089 DCHECK(input->IsRegister()); 5089 DCHECK(input->IsRegister());
5090 DCHECK(input->Equals(instr->result())); 5090 DCHECK(input->Equals(instr->result()));
5091 5091
5092 Register input_reg = ToRegister(input); 5092 Register input_reg = ToRegister(input);
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
5279 instr->pointer_map(), 1, Safepoint::kNoLazyDeopt); 5279 instr->pointer_map(), 1, Safepoint::kNoLazyDeopt);
5280 __ StoreToSafepointRegisterSlot(v0, scratch0()); 5280 __ StoreToSafepointRegisterSlot(v0, scratch0());
5281 } 5281 }
5282 __ SmiTst(scratch0(), at); 5282 __ SmiTst(scratch0(), at);
5283 DeoptimizeIf(eq, instr, Deoptimizer::kInstanceMigrationFailed, at, 5283 DeoptimizeIf(eq, instr, Deoptimizer::kInstanceMigrationFailed, at,
5284 Operand(zero_reg)); 5284 Operand(zero_reg));
5285 } 5285 }
5286 5286
5287 5287
5288 void LCodeGen::DoCheckMaps(LCheckMaps* instr) { 5288 void LCodeGen::DoCheckMaps(LCheckMaps* instr) {
5289 class DeferredCheckMaps FINAL : public LDeferredCode { 5289 class DeferredCheckMaps final : public LDeferredCode {
5290 public: 5290 public:
5291 DeferredCheckMaps(LCodeGen* codegen, LCheckMaps* instr, Register object) 5291 DeferredCheckMaps(LCodeGen* codegen, LCheckMaps* instr, Register object)
5292 : LDeferredCode(codegen), instr_(instr), object_(object) { 5292 : LDeferredCode(codegen), instr_(instr), object_(object) {
5293 SetExit(check_maps()); 5293 SetExit(check_maps());
5294 } 5294 }
5295 void Generate() OVERRIDE { 5295 void Generate() override {
5296 codegen()->DoDeferredInstanceMigration(instr_, object_); 5296 codegen()->DoDeferredInstanceMigration(instr_, object_);
5297 } 5297 }
5298 Label* check_maps() { return &check_maps_; } 5298 Label* check_maps() { return &check_maps_; }
5299 LInstruction* instr() OVERRIDE { return instr_; } 5299 LInstruction* instr() override { return instr_; }
5300 5300
5301 private: 5301 private:
5302 LCheckMaps* instr_; 5302 LCheckMaps* instr_;
5303 Label check_maps_; 5303 Label check_maps_;
5304 Register object_; 5304 Register object_;
5305 }; 5305 };
5306 5306
5307 if (instr->hydrogen()->IsStabilityCheck()) { 5307 if (instr->hydrogen()->IsStabilityCheck()) {
5308 const UniqueSet<Map>* maps = instr->hydrogen()->maps(); 5308 const UniqueSet<Map>* maps = instr->hydrogen()->maps();
5309 for (int i = 0; i < maps->size(); ++i) { 5309 for (int i = 0; i < maps->size(); ++i) {
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
5405 5405
5406 void LCodeGen::DoConstructDouble(LConstructDouble* instr) { 5406 void LCodeGen::DoConstructDouble(LConstructDouble* instr) {
5407 Register hi_reg = ToRegister(instr->hi()); 5407 Register hi_reg = ToRegister(instr->hi());
5408 Register lo_reg = ToRegister(instr->lo()); 5408 Register lo_reg = ToRegister(instr->lo());
5409 DoubleRegister result_reg = ToDoubleRegister(instr->result()); 5409 DoubleRegister result_reg = ToDoubleRegister(instr->result());
5410 __ Move(result_reg, lo_reg, hi_reg); 5410 __ Move(result_reg, lo_reg, hi_reg);
5411 } 5411 }
5412 5412
5413 5413
5414 void LCodeGen::DoAllocate(LAllocate* instr) { 5414 void LCodeGen::DoAllocate(LAllocate* instr) {
5415 class DeferredAllocate FINAL : public LDeferredCode { 5415 class DeferredAllocate final : public LDeferredCode {
5416 public: 5416 public:
5417 DeferredAllocate(LCodeGen* codegen, LAllocate* instr) 5417 DeferredAllocate(LCodeGen* codegen, LAllocate* instr)
5418 : LDeferredCode(codegen), instr_(instr) { } 5418 : LDeferredCode(codegen), instr_(instr) { }
5419 void Generate() OVERRIDE { codegen()->DoDeferredAllocate(instr_); } 5419 void Generate() override { codegen()->DoDeferredAllocate(instr_); }
5420 LInstruction* instr() OVERRIDE { return instr_; } 5420 LInstruction* instr() override { return instr_; }
5421 5421
5422 private: 5422 private:
5423 LAllocate* instr_; 5423 LAllocate* instr_;
5424 }; 5424 };
5425 5425
5426 DeferredAllocate* deferred = 5426 DeferredAllocate* deferred =
5427 new(zone()) DeferredAllocate(this, instr); 5427 new(zone()) DeferredAllocate(this, instr);
5428 5428
5429 Register result = ToRegister(instr->result()); 5429 Register result = ToRegister(instr->result());
5430 Register scratch = ToRegister(instr->temp1()); 5430 Register scratch = ToRegister(instr->temp1());
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
5811 __ CallRuntimeSaveDoubles(Runtime::kStackGuard); 5811 __ CallRuntimeSaveDoubles(Runtime::kStackGuard);
5812 RecordSafepointWithLazyDeopt( 5812 RecordSafepointWithLazyDeopt(
5813 instr, RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS); 5813 instr, RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS);
5814 DCHECK(instr->HasEnvironment()); 5814 DCHECK(instr->HasEnvironment());
5815 LEnvironment* env = instr->environment(); 5815 LEnvironment* env = instr->environment();
5816 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); 5816 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index());
5817 } 5817 }
5818 5818
5819 5819
5820 void LCodeGen::DoStackCheck(LStackCheck* instr) { 5820 void LCodeGen::DoStackCheck(LStackCheck* instr) {
5821 class DeferredStackCheck FINAL : public LDeferredCode { 5821 class DeferredStackCheck final : public LDeferredCode {
5822 public: 5822 public:
5823 DeferredStackCheck(LCodeGen* codegen, LStackCheck* instr) 5823 DeferredStackCheck(LCodeGen* codegen, LStackCheck* instr)
5824 : LDeferredCode(codegen), instr_(instr) { } 5824 : LDeferredCode(codegen), instr_(instr) { }
5825 void Generate() OVERRIDE { codegen()->DoDeferredStackCheck(instr_); } 5825 void Generate() override { codegen()->DoDeferredStackCheck(instr_); }
5826 LInstruction* instr() OVERRIDE { return instr_; } 5826 LInstruction* instr() override { return instr_; }
5827 5827
5828 private: 5828 private:
5829 LStackCheck* instr_; 5829 LStackCheck* instr_;
5830 }; 5830 };
5831 5831
5832 DCHECK(instr->HasEnvironment()); 5832 DCHECK(instr->HasEnvironment());
5833 LEnvironment* env = instr->environment(); 5833 LEnvironment* env = instr->environment();
5834 // There is no LLazyBailout instruction for stack-checks. We have to 5834 // There is no LLazyBailout instruction for stack-checks. We have to
5835 // prepare for lazy deoptimization explicitly here. 5835 // prepare for lazy deoptimization explicitly here.
5836 if (instr->hydrogen()->is_function_entry()) { 5836 if (instr->hydrogen()->is_function_entry()) {
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
5948 __ Push(object, index); 5948 __ Push(object, index);
5949 __ mov(cp, zero_reg); 5949 __ mov(cp, zero_reg);
5950 __ CallRuntimeSaveDoubles(Runtime::kLoadMutableDouble); 5950 __ CallRuntimeSaveDoubles(Runtime::kLoadMutableDouble);
5951 RecordSafepointWithRegisters( 5951 RecordSafepointWithRegisters(
5952 instr->pointer_map(), 2, Safepoint::kNoLazyDeopt); 5952 instr->pointer_map(), 2, Safepoint::kNoLazyDeopt);
5953 __ StoreToSafepointRegisterSlot(v0, result); 5953 __ StoreToSafepointRegisterSlot(v0, result);
5954 } 5954 }
5955 5955
5956 5956
5957 void LCodeGen::DoLoadFieldByIndex(LLoadFieldByIndex* instr) { 5957 void LCodeGen::DoLoadFieldByIndex(LLoadFieldByIndex* instr) {
5958 class DeferredLoadMutableDouble FINAL : public LDeferredCode { 5958 class DeferredLoadMutableDouble final : public LDeferredCode {
5959 public: 5959 public:
5960 DeferredLoadMutableDouble(LCodeGen* codegen, 5960 DeferredLoadMutableDouble(LCodeGen* codegen,
5961 LLoadFieldByIndex* instr, 5961 LLoadFieldByIndex* instr,
5962 Register result, 5962 Register result,
5963 Register object, 5963 Register object,
5964 Register index) 5964 Register index)
5965 : LDeferredCode(codegen), 5965 : LDeferredCode(codegen),
5966 instr_(instr), 5966 instr_(instr),
5967 result_(result), 5967 result_(result),
5968 object_(object), 5968 object_(object),
5969 index_(index) { 5969 index_(index) {
5970 } 5970 }
5971 void Generate() OVERRIDE { 5971 void Generate() override {
5972 codegen()->DoDeferredLoadMutableDouble(instr_, result_, object_, index_); 5972 codegen()->DoDeferredLoadMutableDouble(instr_, result_, object_, index_);
5973 } 5973 }
5974 LInstruction* instr() OVERRIDE { return instr_; } 5974 LInstruction* instr() override { return instr_; }
5975 5975
5976 private: 5976 private:
5977 LLoadFieldByIndex* instr_; 5977 LLoadFieldByIndex* instr_;
5978 Register result_; 5978 Register result_;
5979 Register object_; 5979 Register object_;
5980 Register index_; 5980 Register index_;
5981 }; 5981 };
5982 5982
5983 Register object = ToRegister(instr->object()); 5983 Register object = ToRegister(instr->object());
5984 Register index = ToRegister(instr->index()); 5984 Register index = ToRegister(instr->index());
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
6024 __ li(at, scope_info); 6024 __ li(at, scope_info);
6025 __ Push(at, ToRegister(instr->function())); 6025 __ Push(at, ToRegister(instr->function()));
6026 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6026 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6027 RecordSafepoint(Safepoint::kNoLazyDeopt); 6027 RecordSafepoint(Safepoint::kNoLazyDeopt);
6028 } 6028 }
6029 6029
6030 6030
6031 #undef __ 6031 #undef __
6032 6032
6033 } } // namespace v8::internal 6033 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips64/lithium-codegen-mips64.h ('k') | src/mips64/lithium-gap-resolver-mips64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698