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

Side by Side Diff: src/ppc/lithium-codegen-ppc.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/ppc/lithium-codegen-ppc.h ('k') | src/ppc/lithium-gap-resolver-ppc.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/cpu-profiler.h" 10 #include "src/cpu-profiler.h"
11 #include "src/hydrogen-osr.h" 11 #include "src/hydrogen-osr.h"
12 #include "src/ic/ic.h" 12 #include "src/ic/ic.h"
13 #include "src/ic/stub-cache.h" 13 #include "src/ic/stub-cache.h"
14 #include "src/ppc/lithium-codegen-ppc.h" 14 #include "src/ppc/lithium-codegen-ppc.h"
15 #include "src/ppc/lithium-gap-resolver-ppc.h" 15 #include "src/ppc/lithium-gap-resolver-ppc.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, LPointerMap* pointers, 23 SafepointGenerator(LCodeGen* codegen, LPointerMap* pointers,
24 Safepoint::DeoptMode mode) 24 Safepoint::DeoptMode mode)
25 : codegen_(codegen), pointers_(pointers), deopt_mode_(mode) {} 25 : codegen_(codegen), pointers_(pointers), deopt_mode_(mode) {}
26 virtual ~SafepointGenerator() {} 26 virtual ~SafepointGenerator() {}
27 27
28 void BeforeCall(int call_size) const OVERRIDE {} 28 void BeforeCall(int call_size) const override {}
29 29
30 void AfterCall() const OVERRIDE { 30 void AfterCall() const override {
31 codegen_->RecordSafepoint(pointers_, deopt_mode_); 31 codegen_->RecordSafepoint(pointers_, deopt_mode_);
32 } 32 }
33 33
34 private: 34 private:
35 LCodeGen* codegen_; 35 LCodeGen* codegen_;
36 LPointerMap* pointers_; 36 LPointerMap* pointers_;
37 Safepoint::DeoptMode deopt_mode_; 37 Safepoint::DeoptMode deopt_mode_;
38 }; 38 };
39 39
40 40
(...skipping 2804 matching lines...) Expand 10 before | Expand all | Expand 10 after
2845 __ b(&done); 2845 __ b(&done);
2846 2846
2847 __ bind(&equal); 2847 __ bind(&equal);
2848 __ mov(r3, Operand(factory()->true_value())); 2848 __ mov(r3, Operand(factory()->true_value()));
2849 __ bind(&done); 2849 __ bind(&done);
2850 } 2850 }
2851 } 2851 }
2852 2852
2853 2853
2854 void LCodeGen::DoInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr) { 2854 void LCodeGen::DoInstanceOfKnownGlobal(LInstanceOfKnownGlobal* instr) {
2855 class DeferredInstanceOfKnownGlobal FINAL : public LDeferredCode { 2855 class DeferredInstanceOfKnownGlobal final : public LDeferredCode {
2856 public: 2856 public:
2857 DeferredInstanceOfKnownGlobal(LCodeGen* codegen, 2857 DeferredInstanceOfKnownGlobal(LCodeGen* codegen,
2858 LInstanceOfKnownGlobal* instr) 2858 LInstanceOfKnownGlobal* instr)
2859 : LDeferredCode(codegen), instr_(instr) {} 2859 : LDeferredCode(codegen), instr_(instr) {}
2860 void Generate() OVERRIDE { 2860 void Generate() override {
2861 codegen()->DoDeferredInstanceOfKnownGlobal(instr_, &map_check_); 2861 codegen()->DoDeferredInstanceOfKnownGlobal(instr_, &map_check_);
2862 } 2862 }
2863 LInstruction* instr() OVERRIDE { return instr_; } 2863 LInstruction* instr() override { return instr_; }
2864 Label* map_check() { return &map_check_; } 2864 Label* map_check() { return &map_check_; }
2865 2865
2866 private: 2866 private:
2867 LInstanceOfKnownGlobal* instr_; 2867 LInstanceOfKnownGlobal* instr_;
2868 Label map_check_; 2868 Label map_check_;
2869 }; 2869 };
2870 2870
2871 DeferredInstanceOfKnownGlobal* deferred; 2871 DeferredInstanceOfKnownGlobal* deferred;
2872 deferred = new (zone()) DeferredInstanceOfKnownGlobal(this, instr); 2872 deferred = new (zone()) DeferredInstanceOfKnownGlobal(this, instr);
2873 2873
(...skipping 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after
3911 DeoptimizeIf(eq, instr, Deoptimizer::kOverflow); 3911 DeoptimizeIf(eq, instr, Deoptimizer::kOverflow);
3912 3912
3913 __ neg(result, result); 3913 __ neg(result, result);
3914 __ bind(&done); 3914 __ bind(&done);
3915 } 3915 }
3916 #endif 3916 #endif
3917 3917
3918 3918
3919 void LCodeGen::DoMathAbs(LMathAbs* instr) { 3919 void LCodeGen::DoMathAbs(LMathAbs* instr) {
3920 // Class for deferred case. 3920 // Class for deferred case.
3921 class DeferredMathAbsTaggedHeapNumber FINAL : public LDeferredCode { 3921 class DeferredMathAbsTaggedHeapNumber final : public LDeferredCode {
3922 public: 3922 public:
3923 DeferredMathAbsTaggedHeapNumber(LCodeGen* codegen, LMathAbs* instr) 3923 DeferredMathAbsTaggedHeapNumber(LCodeGen* codegen, LMathAbs* instr)
3924 : LDeferredCode(codegen), instr_(instr) {} 3924 : LDeferredCode(codegen), instr_(instr) {}
3925 void Generate() OVERRIDE { 3925 void Generate() override {
3926 codegen()->DoDeferredMathAbsTaggedHeapNumber(instr_); 3926 codegen()->DoDeferredMathAbsTaggedHeapNumber(instr_);
3927 } 3927 }
3928 LInstruction* instr() OVERRIDE { return instr_; } 3928 LInstruction* instr() override { return instr_; }
3929 3929
3930 private: 3930 private:
3931 LMathAbs* instr_; 3931 LMathAbs* instr_;
3932 }; 3932 };
3933 3933
3934 Representation r = instr->hydrogen()->value()->representation(); 3934 Representation r = instr->hydrogen()->value()->representation();
3935 if (r.IsDouble()) { 3935 if (r.IsDouble()) {
3936 DoubleRegister input = ToDoubleRegister(instr->value()); 3936 DoubleRegister input = ToDoubleRegister(instr->value());
3937 DoubleRegister result = ToDoubleRegister(instr->result()); 3937 DoubleRegister result = ToDoubleRegister(instr->result());
3938 __ fabs(result, input); 3938 __ fabs(result, input);
(...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after
4800 DCHECK(ToRegister(instr->context()).is(cp)); 4800 DCHECK(ToRegister(instr->context()).is(cp));
4801 DCHECK(ToRegister(instr->left()).is(r4)); 4801 DCHECK(ToRegister(instr->left()).is(r4));
4802 DCHECK(ToRegister(instr->right()).is(r3)); 4802 DCHECK(ToRegister(instr->right()).is(r3));
4803 StringAddStub stub(isolate(), instr->hydrogen()->flags(), 4803 StringAddStub stub(isolate(), instr->hydrogen()->flags(),
4804 instr->hydrogen()->pretenure_flag()); 4804 instr->hydrogen()->pretenure_flag());
4805 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr); 4805 CallCode(stub.GetCode(), RelocInfo::CODE_TARGET, instr);
4806 } 4806 }
4807 4807
4808 4808
4809 void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) { 4809 void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) {
4810 class DeferredStringCharCodeAt FINAL : public LDeferredCode { 4810 class DeferredStringCharCodeAt final : public LDeferredCode {
4811 public: 4811 public:
4812 DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr) 4812 DeferredStringCharCodeAt(LCodeGen* codegen, LStringCharCodeAt* instr)
4813 : LDeferredCode(codegen), instr_(instr) {} 4813 : LDeferredCode(codegen), instr_(instr) {}
4814 void Generate() OVERRIDE { codegen()->DoDeferredStringCharCodeAt(instr_); } 4814 void Generate() override { codegen()->DoDeferredStringCharCodeAt(instr_); }
4815 LInstruction* instr() OVERRIDE { return instr_; } 4815 LInstruction* instr() override { return instr_; }
4816 4816
4817 private: 4817 private:
4818 LStringCharCodeAt* instr_; 4818 LStringCharCodeAt* instr_;
4819 }; 4819 };
4820 4820
4821 DeferredStringCharCodeAt* deferred = 4821 DeferredStringCharCodeAt* deferred =
4822 new (zone()) DeferredStringCharCodeAt(this, instr); 4822 new (zone()) DeferredStringCharCodeAt(this, instr);
4823 4823
4824 StringCharLoadGenerator::Generate( 4824 StringCharLoadGenerator::Generate(
4825 masm(), ToRegister(instr->string()), ToRegister(instr->index()), 4825 masm(), ToRegister(instr->string()), ToRegister(instr->index()),
(...skipping 27 matching lines...) Expand all
4853 } 4853 }
4854 CallRuntimeFromDeferred(Runtime::kStringCharCodeAtRT, 2, instr, 4854 CallRuntimeFromDeferred(Runtime::kStringCharCodeAtRT, 2, instr,
4855 instr->context()); 4855 instr->context());
4856 __ AssertSmi(r3); 4856 __ AssertSmi(r3);
4857 __ SmiUntag(r3); 4857 __ SmiUntag(r3);
4858 __ StoreToSafepointRegisterSlot(r3, result); 4858 __ StoreToSafepointRegisterSlot(r3, result);
4859 } 4859 }
4860 4860
4861 4861
4862 void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) { 4862 void LCodeGen::DoStringCharFromCode(LStringCharFromCode* instr) {
4863 class DeferredStringCharFromCode FINAL : public LDeferredCode { 4863 class DeferredStringCharFromCode final : public LDeferredCode {
4864 public: 4864 public:
4865 DeferredStringCharFromCode(LCodeGen* codegen, LStringCharFromCode* instr) 4865 DeferredStringCharFromCode(LCodeGen* codegen, LStringCharFromCode* instr)
4866 : LDeferredCode(codegen), instr_(instr) {} 4866 : LDeferredCode(codegen), instr_(instr) {}
4867 void Generate() OVERRIDE { 4867 void Generate() override {
4868 codegen()->DoDeferredStringCharFromCode(instr_); 4868 codegen()->DoDeferredStringCharFromCode(instr_);
4869 } 4869 }
4870 LInstruction* instr() OVERRIDE { return instr_; } 4870 LInstruction* instr() override { return instr_; }
4871 4871
4872 private: 4872 private:
4873 LStringCharFromCode* instr_; 4873 LStringCharFromCode* instr_;
4874 }; 4874 };
4875 4875
4876 DeferredStringCharFromCode* deferred = 4876 DeferredStringCharFromCode* deferred =
4877 new (zone()) DeferredStringCharFromCode(this, instr); 4877 new (zone()) DeferredStringCharFromCode(this, instr);
4878 4878
4879 DCHECK(instr->hydrogen()->value()->representation().IsInteger32()); 4879 DCHECK(instr->hydrogen()->value()->representation().IsInteger32());
4880 Register char_code = ToRegister(instr->char_code()); 4880 Register char_code = ToRegister(instr->char_code());
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
4927 4927
4928 4928
4929 void LCodeGen::DoUint32ToDouble(LUint32ToDouble* instr) { 4929 void LCodeGen::DoUint32ToDouble(LUint32ToDouble* instr) {
4930 LOperand* input = instr->value(); 4930 LOperand* input = instr->value();
4931 LOperand* output = instr->result(); 4931 LOperand* output = instr->result();
4932 __ ConvertUnsignedIntToDouble(ToRegister(input), ToDoubleRegister(output)); 4932 __ ConvertUnsignedIntToDouble(ToRegister(input), ToDoubleRegister(output));
4933 } 4933 }
4934 4934
4935 4935
4936 void LCodeGen::DoNumberTagI(LNumberTagI* instr) { 4936 void LCodeGen::DoNumberTagI(LNumberTagI* instr) {
4937 class DeferredNumberTagI FINAL : public LDeferredCode { 4937 class DeferredNumberTagI final : public LDeferredCode {
4938 public: 4938 public:
4939 DeferredNumberTagI(LCodeGen* codegen, LNumberTagI* instr) 4939 DeferredNumberTagI(LCodeGen* codegen, LNumberTagI* instr)
4940 : LDeferredCode(codegen), instr_(instr) {} 4940 : LDeferredCode(codegen), instr_(instr) {}
4941 void Generate() OVERRIDE { 4941 void Generate() override {
4942 codegen()->DoDeferredNumberTagIU(instr_, instr_->value(), instr_->temp1(), 4942 codegen()->DoDeferredNumberTagIU(instr_, instr_->value(), instr_->temp1(),
4943 instr_->temp2(), SIGNED_INT32); 4943 instr_->temp2(), SIGNED_INT32);
4944 } 4944 }
4945 LInstruction* instr() OVERRIDE { return instr_; } 4945 LInstruction* instr() override { return instr_; }
4946 4946
4947 private: 4947 private:
4948 LNumberTagI* instr_; 4948 LNumberTagI* instr_;
4949 }; 4949 };
4950 4950
4951 Register src = ToRegister(instr->value()); 4951 Register src = ToRegister(instr->value());
4952 Register dst = ToRegister(instr->result()); 4952 Register dst = ToRegister(instr->result());
4953 4953
4954 DeferredNumberTagI* deferred = new (zone()) DeferredNumberTagI(this, instr); 4954 DeferredNumberTagI* deferred = new (zone()) DeferredNumberTagI(this, instr);
4955 #if V8_TARGET_ARCH_PPC64 4955 #if V8_TARGET_ARCH_PPC64
4956 __ SmiTag(dst, src); 4956 __ SmiTag(dst, src);
4957 #else 4957 #else
4958 __ SmiTagCheckOverflow(dst, src, r0); 4958 __ SmiTagCheckOverflow(dst, src, r0);
4959 __ BranchOnOverflow(deferred->entry()); 4959 __ BranchOnOverflow(deferred->entry());
4960 #endif 4960 #endif
4961 __ bind(deferred->exit()); 4961 __ bind(deferred->exit());
4962 } 4962 }
4963 4963
4964 4964
4965 void LCodeGen::DoNumberTagU(LNumberTagU* instr) { 4965 void LCodeGen::DoNumberTagU(LNumberTagU* instr) {
4966 class DeferredNumberTagU FINAL : public LDeferredCode { 4966 class DeferredNumberTagU final : public LDeferredCode {
4967 public: 4967 public:
4968 DeferredNumberTagU(LCodeGen* codegen, LNumberTagU* instr) 4968 DeferredNumberTagU(LCodeGen* codegen, LNumberTagU* instr)
4969 : LDeferredCode(codegen), instr_(instr) {} 4969 : LDeferredCode(codegen), instr_(instr) {}
4970 void Generate() OVERRIDE { 4970 void Generate() override {
4971 codegen()->DoDeferredNumberTagIU(instr_, instr_->value(), instr_->temp1(), 4971 codegen()->DoDeferredNumberTagIU(instr_, instr_->value(), instr_->temp1(),
4972 instr_->temp2(), UNSIGNED_INT32); 4972 instr_->temp2(), UNSIGNED_INT32);
4973 } 4973 }
4974 LInstruction* instr() OVERRIDE { return instr_; } 4974 LInstruction* instr() override { return instr_; }
4975 4975
4976 private: 4976 private:
4977 LNumberTagU* instr_; 4977 LNumberTagU* instr_;
4978 }; 4978 };
4979 4979
4980 Register input = ToRegister(instr->value()); 4980 Register input = ToRegister(instr->value());
4981 Register result = ToRegister(instr->result()); 4981 Register result = ToRegister(instr->result());
4982 4982
4983 DeferredNumberTagU* deferred = new (zone()) DeferredNumberTagU(this, instr); 4983 DeferredNumberTagU* deferred = new (zone()) DeferredNumberTagU(this, instr);
4984 __ Cmpli(input, Operand(Smi::kMaxValue), r0); 4984 __ Cmpli(input, Operand(Smi::kMaxValue), r0);
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
5042 } 5042 }
5043 5043
5044 // Done. Put the value in dbl_scratch into the value of the allocated heap 5044 // Done. Put the value in dbl_scratch into the value of the allocated heap
5045 // number. 5045 // number.
5046 __ bind(&done); 5046 __ bind(&done);
5047 __ stfd(dbl_scratch, FieldMemOperand(dst, HeapNumber::kValueOffset)); 5047 __ stfd(dbl_scratch, FieldMemOperand(dst, HeapNumber::kValueOffset));
5048 } 5048 }
5049 5049
5050 5050
5051 void LCodeGen::DoNumberTagD(LNumberTagD* instr) { 5051 void LCodeGen::DoNumberTagD(LNumberTagD* instr) {
5052 class DeferredNumberTagD FINAL : public LDeferredCode { 5052 class DeferredNumberTagD final : public LDeferredCode {
5053 public: 5053 public:
5054 DeferredNumberTagD(LCodeGen* codegen, LNumberTagD* instr) 5054 DeferredNumberTagD(LCodeGen* codegen, LNumberTagD* instr)
5055 : LDeferredCode(codegen), instr_(instr) {} 5055 : LDeferredCode(codegen), instr_(instr) {}
5056 void Generate() OVERRIDE { codegen()->DoDeferredNumberTagD(instr_); } 5056 void Generate() override { codegen()->DoDeferredNumberTagD(instr_); }
5057 LInstruction* instr() OVERRIDE { return instr_; } 5057 LInstruction* instr() override { return instr_; }
5058 5058
5059 private: 5059 private:
5060 LNumberTagD* instr_; 5060 LNumberTagD* instr_;
5061 }; 5061 };
5062 5062
5063 DoubleRegister input_reg = ToDoubleRegister(instr->value()); 5063 DoubleRegister input_reg = ToDoubleRegister(instr->value());
5064 Register scratch = scratch0(); 5064 Register scratch = scratch0();
5065 Register reg = ToRegister(instr->result()); 5065 Register reg = ToRegister(instr->result());
5066 Register temp1 = ToRegister(instr->temp()); 5066 Register temp1 = ToRegister(instr->temp());
5067 Register temp2 = ToRegister(instr->temp2()); 5067 Register temp2 = ToRegister(instr->temp2());
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
5269 Register::kExponentOffset)); 5269 Register::kExponentOffset));
5270 __ cmpwi(scratch1, Operand::Zero()); 5270 __ cmpwi(scratch1, Operand::Zero());
5271 DeoptimizeIf(lt, instr, Deoptimizer::kMinusZero); 5271 DeoptimizeIf(lt, instr, Deoptimizer::kMinusZero);
5272 } 5272 }
5273 } 5273 }
5274 __ bind(&done); 5274 __ bind(&done);
5275 } 5275 }
5276 5276
5277 5277
5278 void LCodeGen::DoTaggedToI(LTaggedToI* instr) { 5278 void LCodeGen::DoTaggedToI(LTaggedToI* instr) {
5279 class DeferredTaggedToI FINAL : public LDeferredCode { 5279 class DeferredTaggedToI final : public LDeferredCode {
5280 public: 5280 public:
5281 DeferredTaggedToI(LCodeGen* codegen, LTaggedToI* instr) 5281 DeferredTaggedToI(LCodeGen* codegen, LTaggedToI* instr)
5282 : LDeferredCode(codegen), instr_(instr) {} 5282 : LDeferredCode(codegen), instr_(instr) {}
5283 void Generate() OVERRIDE { codegen()->DoDeferredTaggedToI(instr_); } 5283 void Generate() override { codegen()->DoDeferredTaggedToI(instr_); }
5284 LInstruction* instr() OVERRIDE { return instr_; } 5284 LInstruction* instr() override { return instr_; }
5285 5285
5286 private: 5286 private:
5287 LTaggedToI* instr_; 5287 LTaggedToI* instr_;
5288 }; 5288 };
5289 5289
5290 LOperand* input = instr->value(); 5290 LOperand* input = instr->value();
5291 DCHECK(input->IsRegister()); 5291 DCHECK(input->IsRegister());
5292 DCHECK(input->Equals(instr->result())); 5292 DCHECK(input->Equals(instr->result()));
5293 5293
5294 Register input_reg = ToRegister(input); 5294 Register input_reg = ToRegister(input);
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
5478 RecordSafepointWithRegisters(instr->pointer_map(), 1, 5478 RecordSafepointWithRegisters(instr->pointer_map(), 1,
5479 Safepoint::kNoLazyDeopt); 5479 Safepoint::kNoLazyDeopt);
5480 __ StoreToSafepointRegisterSlot(r3, temp); 5480 __ StoreToSafepointRegisterSlot(r3, temp);
5481 } 5481 }
5482 __ TestIfSmi(temp, r0); 5482 __ TestIfSmi(temp, r0);
5483 DeoptimizeIf(eq, instr, Deoptimizer::kInstanceMigrationFailed, cr0); 5483 DeoptimizeIf(eq, instr, Deoptimizer::kInstanceMigrationFailed, cr0);
5484 } 5484 }
5485 5485
5486 5486
5487 void LCodeGen::DoCheckMaps(LCheckMaps* instr) { 5487 void LCodeGen::DoCheckMaps(LCheckMaps* instr) {
5488 class DeferredCheckMaps FINAL : public LDeferredCode { 5488 class DeferredCheckMaps final : public LDeferredCode {
5489 public: 5489 public:
5490 DeferredCheckMaps(LCodeGen* codegen, LCheckMaps* instr, Register object) 5490 DeferredCheckMaps(LCodeGen* codegen, LCheckMaps* instr, Register object)
5491 : LDeferredCode(codegen), instr_(instr), object_(object) { 5491 : LDeferredCode(codegen), instr_(instr), object_(object) {
5492 SetExit(check_maps()); 5492 SetExit(check_maps());
5493 } 5493 }
5494 void Generate() OVERRIDE { 5494 void Generate() override {
5495 codegen()->DoDeferredInstanceMigration(instr_, object_); 5495 codegen()->DoDeferredInstanceMigration(instr_, object_);
5496 } 5496 }
5497 Label* check_maps() { return &check_maps_; } 5497 Label* check_maps() { return &check_maps_; }
5498 LInstruction* instr() OVERRIDE { return instr_; } 5498 LInstruction* instr() override { return instr_; }
5499 5499
5500 private: 5500 private:
5501 LCheckMaps* instr_; 5501 LCheckMaps* instr_;
5502 Label check_maps_; 5502 Label check_maps_;
5503 Register object_; 5503 Register object_;
5504 }; 5504 };
5505 5505
5506 if (instr->hydrogen()->IsStabilityCheck()) { 5506 if (instr->hydrogen()->IsStabilityCheck()) {
5507 const UniqueSet<Map>* maps = instr->hydrogen()->maps(); 5507 const UniqueSet<Map>* maps = instr->hydrogen()->maps();
5508 for (int i = 0; i < maps->size(); ++i) { 5508 for (int i = 0; i < maps->size(); ++i) {
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
5610 DoubleRegister result_reg = ToDoubleRegister(instr->result()); 5610 DoubleRegister result_reg = ToDoubleRegister(instr->result());
5611 #if V8_TARGET_ARCH_PPC64 5611 #if V8_TARGET_ARCH_PPC64
5612 __ MovInt64ComponentsToDouble(result_reg, hi_reg, lo_reg, r0); 5612 __ MovInt64ComponentsToDouble(result_reg, hi_reg, lo_reg, r0);
5613 #else 5613 #else
5614 __ MovInt64ToDouble(result_reg, hi_reg, lo_reg); 5614 __ MovInt64ToDouble(result_reg, hi_reg, lo_reg);
5615 #endif 5615 #endif
5616 } 5616 }
5617 5617
5618 5618
5619 void LCodeGen::DoAllocate(LAllocate* instr) { 5619 void LCodeGen::DoAllocate(LAllocate* instr) {
5620 class DeferredAllocate FINAL : public LDeferredCode { 5620 class DeferredAllocate final : public LDeferredCode {
5621 public: 5621 public:
5622 DeferredAllocate(LCodeGen* codegen, LAllocate* instr) 5622 DeferredAllocate(LCodeGen* codegen, LAllocate* instr)
5623 : LDeferredCode(codegen), instr_(instr) {} 5623 : LDeferredCode(codegen), instr_(instr) {}
5624 void Generate() OVERRIDE { codegen()->DoDeferredAllocate(instr_); } 5624 void Generate() override { codegen()->DoDeferredAllocate(instr_); }
5625 LInstruction* instr() OVERRIDE { return instr_; } 5625 LInstruction* instr() override { return instr_; }
5626 5626
5627 private: 5627 private:
5628 LAllocate* instr_; 5628 LAllocate* instr_;
5629 }; 5629 };
5630 5630
5631 DeferredAllocate* deferred = new (zone()) DeferredAllocate(this, instr); 5631 DeferredAllocate* deferred = new (zone()) DeferredAllocate(this, instr);
5632 5632
5633 Register result = ToRegister(instr->result()); 5633 Register result = ToRegister(instr->result());
5634 Register scratch = ToRegister(instr->temp1()); 5634 Register scratch = ToRegister(instr->temp1());
5635 Register scratch2 = ToRegister(instr->temp2()); 5635 Register scratch2 = ToRegister(instr->temp2());
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
5967 __ CallRuntimeSaveDoubles(Runtime::kStackGuard); 5967 __ CallRuntimeSaveDoubles(Runtime::kStackGuard);
5968 RecordSafepointWithLazyDeopt( 5968 RecordSafepointWithLazyDeopt(
5969 instr, RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS); 5969 instr, RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS);
5970 DCHECK(instr->HasEnvironment()); 5970 DCHECK(instr->HasEnvironment());
5971 LEnvironment* env = instr->environment(); 5971 LEnvironment* env = instr->environment();
5972 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); 5972 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index());
5973 } 5973 }
5974 5974
5975 5975
5976 void LCodeGen::DoStackCheck(LStackCheck* instr) { 5976 void LCodeGen::DoStackCheck(LStackCheck* instr) {
5977 class DeferredStackCheck FINAL : public LDeferredCode { 5977 class DeferredStackCheck final : public LDeferredCode {
5978 public: 5978 public:
5979 DeferredStackCheck(LCodeGen* codegen, LStackCheck* instr) 5979 DeferredStackCheck(LCodeGen* codegen, LStackCheck* instr)
5980 : LDeferredCode(codegen), instr_(instr) {} 5980 : LDeferredCode(codegen), instr_(instr) {}
5981 void Generate() OVERRIDE { codegen()->DoDeferredStackCheck(instr_); } 5981 void Generate() override { codegen()->DoDeferredStackCheck(instr_); }
5982 LInstruction* instr() OVERRIDE { return instr_; } 5982 LInstruction* instr() override { return instr_; }
5983 5983
5984 private: 5984 private:
5985 LStackCheck* instr_; 5985 LStackCheck* instr_;
5986 }; 5986 };
5987 5987
5988 DCHECK(instr->HasEnvironment()); 5988 DCHECK(instr->HasEnvironment());
5989 LEnvironment* env = instr->environment(); 5989 LEnvironment* env = instr->environment();
5990 // There is no LLazyBailout instruction for stack-checks. We have to 5990 // There is no LLazyBailout instruction for stack-checks. We have to
5991 // prepare for lazy deoptimization explicitly here. 5991 // prepare for lazy deoptimization explicitly here.
5992 if (instr->hydrogen()->is_function_entry()) { 5992 if (instr->hydrogen()->is_function_entry()) {
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
6100 __ Push(object, index); 6100 __ Push(object, index);
6101 __ li(cp, Operand::Zero()); 6101 __ li(cp, Operand::Zero());
6102 __ CallRuntimeSaveDoubles(Runtime::kLoadMutableDouble); 6102 __ CallRuntimeSaveDoubles(Runtime::kLoadMutableDouble);
6103 RecordSafepointWithRegisters(instr->pointer_map(), 2, 6103 RecordSafepointWithRegisters(instr->pointer_map(), 2,
6104 Safepoint::kNoLazyDeopt); 6104 Safepoint::kNoLazyDeopt);
6105 __ StoreToSafepointRegisterSlot(r3, result); 6105 __ StoreToSafepointRegisterSlot(r3, result);
6106 } 6106 }
6107 6107
6108 6108
6109 void LCodeGen::DoLoadFieldByIndex(LLoadFieldByIndex* instr) { 6109 void LCodeGen::DoLoadFieldByIndex(LLoadFieldByIndex* instr) {
6110 class DeferredLoadMutableDouble FINAL : public LDeferredCode { 6110 class DeferredLoadMutableDouble final : public LDeferredCode {
6111 public: 6111 public:
6112 DeferredLoadMutableDouble(LCodeGen* codegen, LLoadFieldByIndex* instr, 6112 DeferredLoadMutableDouble(LCodeGen* codegen, LLoadFieldByIndex* instr,
6113 Register result, Register object, Register index) 6113 Register result, Register object, Register index)
6114 : LDeferredCode(codegen), 6114 : LDeferredCode(codegen),
6115 instr_(instr), 6115 instr_(instr),
6116 result_(result), 6116 result_(result),
6117 object_(object), 6117 object_(object),
6118 index_(index) {} 6118 index_(index) {}
6119 void Generate() OVERRIDE { 6119 void Generate() override {
6120 codegen()->DoDeferredLoadMutableDouble(instr_, result_, object_, index_); 6120 codegen()->DoDeferredLoadMutableDouble(instr_, result_, object_, index_);
6121 } 6121 }
6122 LInstruction* instr() OVERRIDE { return instr_; } 6122 LInstruction* instr() override { return instr_; }
6123 6123
6124 private: 6124 private:
6125 LLoadFieldByIndex* instr_; 6125 LLoadFieldByIndex* instr_;
6126 Register result_; 6126 Register result_;
6127 Register object_; 6127 Register object_;
6128 Register index_; 6128 Register index_;
6129 }; 6129 };
6130 6130
6131 Register object = ToRegister(instr->object()); 6131 Register object = ToRegister(instr->object());
6132 Register index = ToRegister(instr->index()); 6132 Register index = ToRegister(instr->index());
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
6175 __ Push(scope_info); 6175 __ Push(scope_info);
6176 __ push(ToRegister(instr->function())); 6176 __ push(ToRegister(instr->function()));
6177 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6177 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6178 RecordSafepoint(Safepoint::kNoLazyDeopt); 6178 RecordSafepoint(Safepoint::kNoLazyDeopt);
6179 } 6179 }
6180 6180
6181 6181
6182 #undef __ 6182 #undef __
6183 } 6183 }
6184 } // namespace v8::internal 6184 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ppc/lithium-codegen-ppc.h ('k') | src/ppc/lithium-gap-resolver-ppc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698