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

Side by Side Diff: src/mips/lithium-codegen-mips.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/mips/lithium-codegen-mips.h ('k') | src/mips/lithium-gap-resolver-mips.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.7 1 // Copyright 2012 the V8 project authors. All rights reserved.7
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 24 matching lines...) Expand all
35 #include "src/ic/ic.h" 35 #include "src/ic/ic.h"
36 #include "src/ic/stub-cache.h" 36 #include "src/ic/stub-cache.h"
37 #include "src/mips/lithium-codegen-mips.h" 37 #include "src/mips/lithium-codegen-mips.h"
38 #include "src/mips/lithium-gap-resolver-mips.h" 38 #include "src/mips/lithium-gap-resolver-mips.h"
39 39
40 40
41 namespace v8 { 41 namespace v8 {
42 namespace internal { 42 namespace internal {
43 43
44 44
45 class SafepointGenerator FINAL : public CallWrapper { 45 class SafepointGenerator final : public CallWrapper {
46 public: 46 public:
47 SafepointGenerator(LCodeGen* codegen, 47 SafepointGenerator(LCodeGen* codegen,
48 LPointerMap* pointers, 48 LPointerMap* pointers,
49 Safepoint::DeoptMode mode) 49 Safepoint::DeoptMode mode)
50 : codegen_(codegen), 50 : codegen_(codegen),
51 pointers_(pointers), 51 pointers_(pointers),
52 deopt_mode_(mode) { } 52 deopt_mode_(mode) { }
53 virtual ~SafepointGenerator() {} 53 virtual ~SafepointGenerator() {}
54 54
55 void BeforeCall(int call_size) const OVERRIDE {} 55 void BeforeCall(int call_size) const override {}
56 56
57 void AfterCall() const OVERRIDE { 57 void AfterCall() const override {
58 codegen_->RecordSafepoint(pointers_, deopt_mode_); 58 codegen_->RecordSafepoint(pointers_, deopt_mode_);
59 } 59 }
60 60
61 private: 61 private:
62 LCodeGen* codegen_; 62 LCodeGen* codegen_;
63 LPointerMap* pointers_; 63 LPointerMap* pointers_;
64 Safepoint::DeoptMode deopt_mode_; 64 Safepoint::DeoptMode deopt_mode_;
65 }; 65 };
66 66
67 67
(...skipping 2644 matching lines...) Expand 10 before | Expand all | Expand 10 after
2712 __ Branch(&true_label, eq, result, Operand(zero_reg)); 2712 __ Branch(&true_label, eq, result, Operand(zero_reg));
2713 __ li(result, Operand(factory()->false_value())); 2713 __ li(result, Operand(factory()->false_value()));
2714 __ Branch(&done); 2714 __ Branch(&done);
2715 __ bind(&true_label); 2715 __ bind(&true_label);
2716 __ li(result, Operand(factory()->true_value())); 2716 __ li(result, Operand(factory()->true_value()));
2717 __ bind(&done); 2717 __ bind(&done);
2718 } 2718 }
2719 2719
2720 2720
2721 void LCodeGen::DoInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr) { 2721 void LCodeGen::DoInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr) {
2722 class DeferredInstanceOfKnownGlobal FINAL : public LDeferredCode { 2722 class DeferredInstanceOfKnownGlobal final : public LDeferredCode {
2723 public: 2723 public:
2724 DeferredInstanceOfKnownGlobal(LCodeGen* codegen, 2724 DeferredInstanceOfKnownGlobal(LCodeGen* codegen,
2725 LInstanceOfKnownGlobal* instr) 2725 LInstanceOfKnownGlobal* instr)
2726 : LDeferredCode(codegen), instr_(instr) { } 2726 : LDeferredCode(codegen), instr_(instr) { }
2727 void Generate() OVERRIDE { 2727 void Generate() override {
2728 codegen()->DoDeferredInstanceOfKnownGlobal(instr_, &map_check_); 2728 codegen()->DoDeferredInstanceOfKnownGlobal(instr_, &map_check_);
2729 } 2729 }
2730 LInstruction* instr() OVERRIDE { return instr_; } 2730 LInstruction* instr() override { return instr_; }
2731 Label* map_check() { return &map_check_; } 2731 Label* map_check() { return &map_check_; }
2732 2732
2733 private: 2733 private:
2734 LInstanceOfKnownGlobal* instr_; 2734 LInstanceOfKnownGlobal* instr_;
2735 Label map_check_; 2735 Label map_check_;
2736 }; 2736 };
2737 2737
2738 DeferredInstanceOfKnownGlobal* deferred; 2738 DeferredInstanceOfKnownGlobal* deferred;
2739 deferred = new(zone()) DeferredInstanceOfKnownGlobal(this, instr); 2739 deferred = new(zone()) DeferredInstanceOfKnownGlobal(this, instr);
2740 2740
(...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after
3662 __ mov(result, input); 3662 __ mov(result, input);
3663 __ subu(result, zero_reg, input); 3663 __ subu(result, zero_reg, input);
3664 // Overflow if result is still negative, i.e. 0x80000000. 3664 // Overflow if result is still negative, i.e. 0x80000000.
3665 DeoptimizeIf(lt, instr, Deoptimizer::kOverflow, result, Operand(zero_reg)); 3665 DeoptimizeIf(lt, instr, Deoptimizer::kOverflow, result, Operand(zero_reg));
3666 __ bind(&done); 3666 __ bind(&done);
3667 } 3667 }
3668 3668
3669 3669
3670 void LCodeGen::DoMathAbs(LMathAbs* instr) { 3670 void LCodeGen::DoMathAbs(LMathAbs* instr) {
3671 // Class for deferred case. 3671 // Class for deferred case.
3672 class DeferredMathAbsTaggedHeapNumber FINAL : public LDeferredCode { 3672 class DeferredMathAbsTaggedHeapNumber final : public LDeferredCode {
3673 public: 3673 public:
3674 DeferredMathAbsTaggedHeapNumber(LCodeGen* codegen, LMathAbs* instr) 3674 DeferredMathAbsTaggedHeapNumber(LCodeGen* codegen, LMathAbs* instr)
3675 : LDeferredCode(codegen), instr_(instr) { } 3675 : LDeferredCode(codegen), instr_(instr) { }
3676 void Generate() OVERRIDE { 3676 void Generate() override {
3677 codegen()->DoDeferredMathAbsTaggedHeapNumber(instr_); 3677 codegen()->DoDeferredMathAbsTaggedHeapNumber(instr_);
3678 } 3678 }
3679 LInstruction* instr() OVERRIDE { return instr_; } 3679 LInstruction* instr() override { return instr_; }
3680 3680
3681 private: 3681 private:
3682 LMathAbs* instr_; 3682 LMathAbs* instr_;
3683 }; 3683 };
3684 3684
3685 Representation r = instr->hydrogen()->value()->representation(); 3685 Representation r = instr->hydrogen()->value()->representation();
3686 if (r.IsDouble()) { 3686 if (r.IsDouble()) {
3687 FPURegister input = ToDoubleRegister(instr->value()); 3687 FPURegister input = ToDoubleRegister(instr->value());
3688 FPURegister result = ToDoubleRegister(instr->result()); 3688 FPURegister result = ToDoubleRegister(instr->result());
3689 __ abs_d(result, input); 3689 __ abs_d(result, input);
(...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after
4522 DCHECK(ToRegister(instr->left()).is(a1)); 4522 DCHECK(ToRegister(instr->left()).is(a1));
4523 DCHECK(ToRegister(instr->right()).is(a0)); 4523 DCHECK(ToRegister(instr->right()).is(a0));
4524 StringAddStub stub(isolate(), 4524 StringAddStub stub(isolate(),
4525 instr->hydrogen()->flags(), 4525 instr->hydrogen()->flags(),
4526 instr->hydrogen()->pretenure_flag()); 4526 instr->hydrogen()->pretenure_flag());
4527 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); 4527 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
4528 } 4528 }
4529 4529
4530 4530
4531 void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) { 4531 void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) {
4532 class DeferredStringCharCodeAt FINAL : public LDeferredCode { 4532 class DeferredStringCharCodeAt final : public LDeferredCode {
4533 public: 4533 public:
4534 DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr) 4534 DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr)
4535 : LDeferredCode(codegen), instr_(instr) { } 4535 : LDeferredCode(codegen), instr_(instr) { }
4536 void Generate() OVERRIDE { codegen()->DoDeferredStringCharCodeAt(instr_); } 4536 void Generate() override { codegen()->DoDeferredStringCharCodeAt(instr_); }
4537 LInstruction* instr() OVERRIDE { return instr_; } 4537 LInstruction* instr() override { return instr_; }
4538 4538
4539 private: 4539 private:
4540 LStringCharCodeAt* instr_; 4540 LStringCharCodeAt* instr_;
4541 }; 4541 };
4542 4542
4543 DeferredStringCharCodeAt* deferred = 4543 DeferredStringCharCodeAt* deferred =
4544 new(zone()) DeferredStringCharCodeAt(this, instr); 4544 new(zone()) DeferredStringCharCodeAt(this, instr);
4545 StringCharLoadGenerator::Generate(masm(), 4545 StringCharLoadGenerator::Generate(masm(),
4546 ToRegister(instr->string()), 4546 ToRegister(instr->string()),
4547 ToRegister(instr->index()), 4547 ToRegister(instr->index()),
(...skipping 28 matching lines...) Expand all
4576 } 4576 }
4577 CallRuntimeFromDeferred(Runtime::kStringCharCodeAtRT, 2, instr, 4577 CallRuntimeFromDeferred(Runtime::kStringCharCodeAtRT, 2, instr,
4578 instr->context()); 4578 instr->context());
4579 __ AssertSmi(v0); 4579 __ AssertSmi(v0);
4580 __ SmiUntag(v0); 4580 __ SmiUntag(v0);
4581 __ StoreToSafepointRegisterSlot(v0, result); 4581 __ StoreToSafepointRegisterSlot(v0, result);
4582 } 4582 }
4583 4583
4584 4584
4585 void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) { 4585 void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) {
4586 class DeferredStringCharFromCode FINAL : public LDeferredCode { 4586 class DeferredStringCharFromCode final : public LDeferredCode {
4587 public: 4587 public:
4588 DeferredStringCharFromCode(LCodeGen* codegen, LStringCharFromCode* instr) 4588 DeferredStringCharFromCode(LCodeGen* codegen, LStringCharFromCode* instr)
4589 : LDeferredCode(codegen), instr_(instr) { } 4589 : LDeferredCode(codegen), instr_(instr) { }
4590 void Generate() OVERRIDE { 4590 void Generate() override {
4591 codegen()->DoDeferredStringCharFromCode(instr_); 4591 codegen()->DoDeferredStringCharFromCode(instr_);
4592 } 4592 }
4593 LInstruction* instr() OVERRIDE { return instr_; } 4593 LInstruction* instr() override { return instr_; }
4594 4594
4595 private: 4595 private:
4596 LStringCharFromCode* instr_; 4596 LStringCharFromCode* instr_;
4597 }; 4597 };
4598 4598
4599 DeferredStringCharFromCode* deferred = 4599 DeferredStringCharFromCode* deferred =
4600 new(zone()) DeferredStringCharFromCode(this, instr); 4600 new(zone()) DeferredStringCharFromCode(this, instr);
4601 4601
4602 DCHECK(instr->hydrogen()->value()->representation().IsInteger32()); 4602 DCHECK(instr->hydrogen()->value()->representation().IsInteger32());
4603 Register char_code = ToRegister(instr->char_code()); 4603 Register char_code = ToRegister(instr->char_code());
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
4655 LOperand* input = instr->value(); 4655 LOperand* input = instr->value();
4656 LOperand* output = instr->result(); 4656 LOperand* output = instr->result();
4657 4657
4658 FPURegister dbl_scratch = double_scratch0(); 4658 FPURegister dbl_scratch = double_scratch0();
4659 __ mtc1(ToRegister(input), dbl_scratch); 4659 __ mtc1(ToRegister(input), dbl_scratch);
4660 __ Cvt_d_uw(ToDoubleRegister(output), dbl_scratch, f22); 4660 __ Cvt_d_uw(ToDoubleRegister(output), dbl_scratch, f22);
4661 } 4661 }
4662 4662
4663 4663
4664 void LCodeGen::DoNumberTagI(LNumberTagI* instr) { 4664 void LCodeGen::DoNumberTagI(LNumberTagI* instr) {
4665 class DeferredNumberTagI FINAL : public LDeferredCode { 4665 class DeferredNumberTagI final : public LDeferredCode {
4666 public: 4666 public:
4667 DeferredNumberTagI(LCodeGen* codegen, LNumberTagI* instr) 4667 DeferredNumberTagI(LCodeGen* codegen, LNumberTagI* instr)
4668 : LDeferredCode(codegen), instr_(instr) { } 4668 : LDeferredCode(codegen), instr_(instr) { }
4669 void Generate() OVERRIDE { 4669 void Generate() override {
4670 codegen()->DoDeferredNumberTagIU(instr_, 4670 codegen()->DoDeferredNumberTagIU(instr_,
4671 instr_->value(), 4671 instr_->value(),
4672 instr_->temp1(), 4672 instr_->temp1(),
4673 instr_->temp2(), 4673 instr_->temp2(),
4674 SIGNED_INT32); 4674 SIGNED_INT32);
4675 } 4675 }
4676 LInstruction* instr() OVERRIDE { return instr_; } 4676 LInstruction* instr() override { return instr_; }
4677 4677
4678 private: 4678 private:
4679 LNumberTagI* instr_; 4679 LNumberTagI* instr_;
4680 }; 4680 };
4681 4681
4682 Register src = ToRegister(instr->value()); 4682 Register src = ToRegister(instr->value());
4683 Register dst = ToRegister(instr->result()); 4683 Register dst = ToRegister(instr->result());
4684 Register overflow = scratch0(); 4684 Register overflow = scratch0();
4685 4685
4686 DeferredNumberTagI* deferred = new(zone()) DeferredNumberTagI(this, instr); 4686 DeferredNumberTagI* deferred = new(zone()) DeferredNumberTagI(this, instr);
4687 __ SmiTagCheckOverflow(dst, src, overflow); 4687 __ SmiTagCheckOverflow(dst, src, overflow);
4688 __ BranchOnOverflow(deferred->entry(), overflow); 4688 __ BranchOnOverflow(deferred->entry(), overflow);
4689 __ bind(deferred->exit()); 4689 __ bind(deferred->exit());
4690 } 4690 }
4691 4691
4692 4692
4693 void LCodeGen::DoNumberTagU(LNumberTagU* instr) { 4693 void LCodeGen::DoNumberTagU(LNumberTagU* instr) {
4694 class DeferredNumberTagU FINAL : public LDeferredCode { 4694 class DeferredNumberTagU final : public LDeferredCode {
4695 public: 4695 public:
4696 DeferredNumberTagU(LCodeGen* codegen, LNumberTagU* instr) 4696 DeferredNumberTagU(LCodeGen* codegen, LNumberTagU* instr)
4697 : LDeferredCode(codegen), instr_(instr) { } 4697 : LDeferredCode(codegen), instr_(instr) { }
4698 void Generate() OVERRIDE { 4698 void Generate() override {
4699 codegen()->DoDeferredNumberTagIU(instr_, 4699 codegen()->DoDeferredNumberTagIU(instr_,
4700 instr_->value(), 4700 instr_->value(),
4701 instr_->temp1(), 4701 instr_->temp1(),
4702 instr_->temp2(), 4702 instr_->temp2(),
4703 UNSIGNED_INT32); 4703 UNSIGNED_INT32);
4704 } 4704 }
4705 LInstruction* instr() OVERRIDE { return instr_; } 4705 LInstruction* instr() override { return instr_; }
4706 4706
4707 private: 4707 private:
4708 LNumberTagU* instr_; 4708 LNumberTagU* instr_;
4709 }; 4709 };
4710 4710
4711 Register input = ToRegister(instr->value()); 4711 Register input = ToRegister(instr->value());
4712 Register result = ToRegister(instr->result()); 4712 Register result = ToRegister(instr->result());
4713 4713
4714 DeferredNumberTagU* deferred = new(zone()) DeferredNumberTagU(this, instr); 4714 DeferredNumberTagU* deferred = new(zone()) DeferredNumberTagU(this, instr);
4715 __ Branch(deferred->entry(), hi, input, Operand(Smi::kMaxValue)); 4715 __ Branch(deferred->entry(), hi, input, Operand(Smi::kMaxValue));
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
4779 4779
4780 // Done. Put the value in dbl_scratch into the value of the allocated heap 4780 // Done. Put the value in dbl_scratch into the value of the allocated heap
4781 // number. 4781 // number.
4782 __ bind(&done); 4782 __ bind(&done);
4783 __ sdc1(dbl_scratch, MemOperand(dst, HeapNumber::kValueOffset)); 4783 __ sdc1(dbl_scratch, MemOperand(dst, HeapNumber::kValueOffset));
4784 __ Addu(dst, dst, kHeapObjectTag); 4784 __ Addu(dst, dst, kHeapObjectTag);
4785 } 4785 }
4786 4786
4787 4787
4788 void LCodeGen::DoNumberTagD(LNumberTagD* instr) { 4788 void LCodeGen::DoNumberTagD(LNumberTagD* instr) {
4789 class DeferredNumberTagD FINAL : public LDeferredCode { 4789 class DeferredNumberTagD final : public LDeferredCode {
4790 public: 4790 public:
4791 DeferredNumberTagD(LCodeGen* codegen, LNumberTagD* instr) 4791 DeferredNumberTagD(LCodeGen* codegen, LNumberTagD* instr)
4792 : LDeferredCode(codegen), instr_(instr) { } 4792 : LDeferredCode(codegen), instr_(instr) { }
4793 void Generate() OVERRIDE { codegen()->DoDeferredNumberTagD(instr_); } 4793 void Generate() override { codegen()->DoDeferredNumberTagD(instr_); }
4794 LInstruction* instr() OVERRIDE { return instr_; } 4794 LInstruction* instr() override { return instr_; }
4795 4795
4796 private: 4796 private:
4797 LNumberTagD* instr_; 4797 LNumberTagD* instr_;
4798 }; 4798 };
4799 4799
4800 DoubleRegister input_reg = ToDoubleRegister(instr->value()); 4800 DoubleRegister input_reg = ToDoubleRegister(instr->value());
4801 Register scratch = scratch0(); 4801 Register scratch = scratch0();
4802 Register reg = ToRegister(instr->result()); 4802 Register reg = ToRegister(instr->result());
4803 Register temp1 = ToRegister(instr->temp()); 4803 Register temp1 = ToRegister(instr->temp());
4804 Register temp2 = ToRegister(instr->temp2()); 4804 Register temp2 = ToRegister(instr->temp2());
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
5007 __ And(scratch1, scratch1, Operand(HeapNumber::kSignMask)); 5007 __ And(scratch1, scratch1, Operand(HeapNumber::kSignMask));
5008 DeoptimizeIf(ne, instr, Deoptimizer::kMinusZero, scratch1, 5008 DeoptimizeIf(ne, instr, Deoptimizer::kMinusZero, scratch1,
5009 Operand(zero_reg)); 5009 Operand(zero_reg));
5010 } 5010 }
5011 } 5011 }
5012 __ bind(&done); 5012 __ bind(&done);
5013 } 5013 }
5014 5014
5015 5015
5016 void LCodeGen::DoTaggedToI(LTaggedToI* instr) { 5016 void LCodeGen::DoTaggedToI(LTaggedToI* instr) {
5017 class DeferredTaggedToI FINAL : public LDeferredCode { 5017 class DeferredTaggedToI final : public LDeferredCode {
5018 public: 5018 public:
5019 DeferredTaggedToI(LCodeGen* codegen, LTaggedToI* instr) 5019 DeferredTaggedToI(LCodeGen* codegen, LTaggedToI* instr)
5020 : LDeferredCode(codegen), instr_(instr) { } 5020 : LDeferredCode(codegen), instr_(instr) { }
5021 void Generate() OVERRIDE { codegen()->DoDeferredTaggedToI(instr_); } 5021 void Generate() override { codegen()->DoDeferredTaggedToI(instr_); }
5022 LInstruction* instr() OVERRIDE { return instr_; } 5022 LInstruction* instr() override { return instr_; }
5023 5023
5024 private: 5024 private:
5025 LTaggedToI* instr_; 5025 LTaggedToI* instr_;
5026 }; 5026 };
5027 5027
5028 LOperand* input = instr->value(); 5028 LOperand* input = instr->value();
5029 DCHECK(input->IsRegister()); 5029 DCHECK(input->IsRegister());
5030 DCHECK(input->Equals(instr->result())); 5030 DCHECK(input->Equals(instr->result()));
5031 5031
5032 Register input_reg = ToRegister(input); 5032 Register input_reg = ToRegister(input);
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
5220 instr->pointer_map(), 1, Safepoint::kNoLazyDeopt); 5220 instr->pointer_map(), 1, Safepoint::kNoLazyDeopt);
5221 __ StoreToSafepointRegisterSlot(v0, scratch0()); 5221 __ StoreToSafepointRegisterSlot(v0, scratch0());
5222 } 5222 }
5223 __ SmiTst(scratch0(), at); 5223 __ SmiTst(scratch0(), at);
5224 DeoptimizeIf(eq, instr, Deoptimizer::kInstanceMigrationFailed, at, 5224 DeoptimizeIf(eq, instr, Deoptimizer::kInstanceMigrationFailed, at,
5225 Operand(zero_reg)); 5225 Operand(zero_reg));
5226 } 5226 }
5227 5227
5228 5228
5229 void LCodeGen::DoCheckMaps(LCheckMaps* instr) { 5229 void LCodeGen::DoCheckMaps(LCheckMaps* instr) {
5230 class DeferredCheckMaps FINAL : public LDeferredCode { 5230 class DeferredCheckMaps final : public LDeferredCode {
5231 public: 5231 public:
5232 DeferredCheckMaps(LCodeGen* codegen, LCheckMaps* instr, Register object) 5232 DeferredCheckMaps(LCodeGen* codegen, LCheckMaps* instr, Register object)
5233 : LDeferredCode(codegen), instr_(instr), object_(object) { 5233 : LDeferredCode(codegen), instr_(instr), object_(object) {
5234 SetExit(check_maps()); 5234 SetExit(check_maps());
5235 } 5235 }
5236 void Generate() OVERRIDE { 5236 void Generate() override {
5237 codegen()->DoDeferredInstanceMigration(instr_, object_); 5237 codegen()->DoDeferredInstanceMigration(instr_, object_);
5238 } 5238 }
5239 Label* check_maps() { return &check_maps_; } 5239 Label* check_maps() { return &check_maps_; }
5240 LInstruction* instr() OVERRIDE { return instr_; } 5240 LInstruction* instr() override { return instr_; }
5241 5241
5242 private: 5242 private:
5243 LCheckMaps* instr_; 5243 LCheckMaps* instr_;
5244 Label check_maps_; 5244 Label check_maps_;
5245 Register object_; 5245 Register object_;
5246 }; 5246 };
5247 5247
5248 if (instr->hydrogen()->IsStabilityCheck()) { 5248 if (instr->hydrogen()->IsStabilityCheck()) {
5249 const UniqueSet<Map>* maps = instr->hydrogen()->maps(); 5249 const UniqueSet<Map>* maps = instr->hydrogen()->maps();
5250 for (int i = 0; i < maps->size(); ++i) { 5250 for (int i = 0; i < maps->size(); ++i) {
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
5346 5346
5347 void LCodeGen::DoConstructDouble(LConstructDouble* instr) { 5347 void LCodeGen::DoConstructDouble(LConstructDouble* instr) {
5348 Register hi_reg = ToRegister(instr->hi()); 5348 Register hi_reg = ToRegister(instr->hi());
5349 Register lo_reg = ToRegister(instr->lo()); 5349 Register lo_reg = ToRegister(instr->lo());
5350 DoubleRegister result_reg = ToDoubleRegister(instr->result()); 5350 DoubleRegister result_reg = ToDoubleRegister(instr->result());
5351 __ Move(result_reg, lo_reg, hi_reg); 5351 __ Move(result_reg, lo_reg, hi_reg);
5352 } 5352 }
5353 5353
5354 5354
5355 void LCodeGen::DoAllocate(LAllocate* instr) { 5355 void LCodeGen::DoAllocate(LAllocate* instr) {
5356 class DeferredAllocate FINAL : public LDeferredCode { 5356 class DeferredAllocate final : public LDeferredCode {
5357 public: 5357 public:
5358 DeferredAllocate(LCodeGen* codegen, LAllocate* instr) 5358 DeferredAllocate(LCodeGen* codegen, LAllocate* instr)
5359 : LDeferredCode(codegen), instr_(instr) { } 5359 : LDeferredCode(codegen), instr_(instr) { }
5360 void Generate() OVERRIDE { codegen()->DoDeferredAllocate(instr_); } 5360 void Generate() override { codegen()->DoDeferredAllocate(instr_); }
5361 LInstruction* instr() OVERRIDE { return instr_; } 5361 LInstruction* instr() override { return instr_; }
5362 5362
5363 private: 5363 private:
5364 LAllocate* instr_; 5364 LAllocate* instr_;
5365 }; 5365 };
5366 5366
5367 DeferredAllocate* deferred = 5367 DeferredAllocate* deferred =
5368 new(zone()) DeferredAllocate(this, instr); 5368 new(zone()) DeferredAllocate(this, instr);
5369 5369
5370 Register result = ToRegister(instr->result()); 5370 Register result = ToRegister(instr->result());
5371 Register scratch = ToRegister(instr->temp1()); 5371 Register scratch = ToRegister(instr->temp1());
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
5750 __ CallRuntimeSaveDoubles(Runtime::kStackGuard); 5750 __ CallRuntimeSaveDoubles(Runtime::kStackGuard);
5751 RecordSafepointWithLazyDeopt( 5751 RecordSafepointWithLazyDeopt(
5752 instr, RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS); 5752 instr, RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS);
5753 DCHECK(instr->HasEnvironment()); 5753 DCHECK(instr->HasEnvironment());
5754 LEnvironment* env = instr->environment(); 5754 LEnvironment* env = instr->environment();
5755 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); 5755 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index());
5756 } 5756 }
5757 5757
5758 5758
5759 void LCodeGen::DoStackCheck(LStackCheck* instr) { 5759 void LCodeGen::DoStackCheck(LStackCheck* instr) {
5760 class DeferredStackCheck FINAL : public LDeferredCode { 5760 class DeferredStackCheck final : public LDeferredCode {
5761 public: 5761 public:
5762 DeferredStackCheck(LCodeGen* codegen, LStackCheck* instr) 5762 DeferredStackCheck(LCodeGen* codegen, LStackCheck* instr)
5763 : LDeferredCode(codegen), instr_(instr) { } 5763 : LDeferredCode(codegen), instr_(instr) { }
5764 void Generate() OVERRIDE { codegen()->DoDeferredStackCheck(instr_); } 5764 void Generate() override { codegen()->DoDeferredStackCheck(instr_); }
5765 LInstruction* instr() OVERRIDE { return instr_; } 5765 LInstruction* instr() override { return instr_; }
5766 5766
5767 private: 5767 private:
5768 LStackCheck* instr_; 5768 LStackCheck* instr_;
5769 }; 5769 };
5770 5770
5771 DCHECK(instr->HasEnvironment()); 5771 DCHECK(instr->HasEnvironment());
5772 LEnvironment* env = instr->environment(); 5772 LEnvironment* env = instr->environment();
5773 // There is no LLazyBailout instruction for stack-checks. We have to 5773 // There is no LLazyBailout instruction for stack-checks. We have to
5774 // prepare for lazy deoptimization explicitly here. 5774 // prepare for lazy deoptimization explicitly here.
5775 if (instr->hydrogen()->is_function_entry()) { 5775 if (instr->hydrogen()->is_function_entry()) {
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
5886 __ Push(object, index); 5886 __ Push(object, index);
5887 __ mov(cp, zero_reg); 5887 __ mov(cp, zero_reg);
5888 __ CallRuntimeSaveDoubles(Runtime::kLoadMutableDouble); 5888 __ CallRuntimeSaveDoubles(Runtime::kLoadMutableDouble);
5889 RecordSafepointWithRegisters( 5889 RecordSafepointWithRegisters(
5890 instr->pointer_map(), 2, Safepoint::kNoLazyDeopt); 5890 instr->pointer_map(), 2, Safepoint::kNoLazyDeopt);
5891 __ StoreToSafepointRegisterSlot(v0, result); 5891 __ StoreToSafepointRegisterSlot(v0, result);
5892 } 5892 }
5893 5893
5894 5894
5895 void LCodeGen::DoLoadFieldByIndex(LLoadFieldByIndex* instr) { 5895 void LCodeGen::DoLoadFieldByIndex(LLoadFieldByIndex* instr) {
5896 class DeferredLoadMutableDouble FINAL : public LDeferredCode { 5896 class DeferredLoadMutableDouble final : public LDeferredCode {
5897 public: 5897 public:
5898 DeferredLoadMutableDouble(LCodeGen* codegen, 5898 DeferredLoadMutableDouble(LCodeGen* codegen,
5899 LLoadFieldByIndex* instr, 5899 LLoadFieldByIndex* instr,
5900 Register result, 5900 Register result,
5901 Register object, 5901 Register object,
5902 Register index) 5902 Register index)
5903 : LDeferredCode(codegen), 5903 : LDeferredCode(codegen),
5904 instr_(instr), 5904 instr_(instr),
5905 result_(result), 5905 result_(result),
5906 object_(object), 5906 object_(object),
5907 index_(index) { 5907 index_(index) {
5908 } 5908 }
5909 void Generate() OVERRIDE { 5909 void Generate() override {
5910 codegen()->DoDeferredLoadMutableDouble(instr_, result_, object_, index_); 5910 codegen()->DoDeferredLoadMutableDouble(instr_, result_, object_, index_);
5911 } 5911 }
5912 LInstruction* instr() OVERRIDE { return instr_; } 5912 LInstruction* instr() override { return instr_; }
5913 5913
5914 private: 5914 private:
5915 LLoadFieldByIndex* instr_; 5915 LLoadFieldByIndex* instr_;
5916 Register result_; 5916 Register result_;
5917 Register object_; 5917 Register object_;
5918 Register index_; 5918 Register index_;
5919 }; 5919 };
5920 5920
5921 Register object = ToRegister(instr->object()); 5921 Register object = ToRegister(instr->object());
5922 Register index = ToRegister(instr->index()); 5922 Register index = ToRegister(instr->index());
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
5964 __ li(at, scope_info); 5964 __ li(at, scope_info);
5965 __ Push(at, ToRegister(instr->function())); 5965 __ Push(at, ToRegister(instr->function()));
5966 CallRuntime(Runtime::kPushBlockContext, 2, instr); 5966 CallRuntime(Runtime::kPushBlockContext, 2, instr);
5967 RecordSafepoint(Safepoint::kNoLazyDeopt); 5967 RecordSafepoint(Safepoint::kNoLazyDeopt);
5968 } 5968 }
5969 5969
5970 5970
5971 #undef __ 5971 #undef __
5972 5972
5973 } } // namespace v8::internal 5973 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips/lithium-codegen-mips.h ('k') | src/mips/lithium-gap-resolver-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698