OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/arm64/lithium-codegen-arm64.h" | 7 #include "src/arm64/lithium-codegen-arm64.h" |
8 #include "src/arm64/lithium-gap-resolver-arm64.h" | 8 #include "src/arm64/lithium-gap-resolver-arm64.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 virtual void BeforeCall(int call_size) const { } | 31 virtual void BeforeCall(int call_size) const { } |
(...skipping 5902 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5934 __ Push(index); | 5934 __ Push(index); |
5935 __ Mov(cp, 0); | 5935 __ Mov(cp, 0); |
5936 __ CallRuntimeSaveDoubles(Runtime::kLoadMutableDouble); | 5936 __ CallRuntimeSaveDoubles(Runtime::kLoadMutableDouble); |
5937 RecordSafepointWithRegisters( | 5937 RecordSafepointWithRegisters( |
5938 instr->pointer_map(), 2, Safepoint::kNoLazyDeopt); | 5938 instr->pointer_map(), 2, Safepoint::kNoLazyDeopt); |
5939 __ StoreToSafepointRegisterSlot(x0, result); | 5939 __ StoreToSafepointRegisterSlot(x0, result); |
5940 } | 5940 } |
5941 | 5941 |
5942 | 5942 |
5943 void LCodeGen::DoLoadFieldByIndex(LLoadFieldByIndex* instr) { | 5943 void LCodeGen::DoLoadFieldByIndex(LLoadFieldByIndex* instr) { |
5944 class DeferredLoadMutableDouble FINAL : public LDeferredCode { | 5944 class DeferredLoadMutableDouble final : public LDeferredCode { |
5945 public: | 5945 public: |
5946 DeferredLoadMutableDouble(LCodeGen* codegen, | 5946 DeferredLoadMutableDouble(LCodeGen* codegen, |
5947 LLoadFieldByIndex* instr, | 5947 LLoadFieldByIndex* instr, |
5948 Register result, | 5948 Register result, |
5949 Register object, | 5949 Register object, |
5950 Register index) | 5950 Register index) |
5951 : LDeferredCode(codegen), | 5951 : LDeferredCode(codegen), |
5952 instr_(instr), | 5952 instr_(instr), |
5953 result_(result), | 5953 result_(result), |
5954 object_(object), | 5954 object_(object), |
5955 index_(index) { | 5955 index_(index) { |
5956 } | 5956 } |
5957 void Generate() OVERRIDE { | 5957 void Generate() override { |
5958 codegen()->DoDeferredLoadMutableDouble(instr_, result_, object_, index_); | 5958 codegen()->DoDeferredLoadMutableDouble(instr_, result_, object_, index_); |
5959 } | 5959 } |
5960 LInstruction* instr() OVERRIDE { return instr_; } | 5960 LInstruction* instr() override { return instr_; } |
5961 | 5961 |
5962 private: | 5962 private: |
5963 LLoadFieldByIndex* instr_; | 5963 LLoadFieldByIndex* instr_; |
5964 Register result_; | 5964 Register result_; |
5965 Register object_; | 5965 Register object_; |
5966 Register index_; | 5966 Register index_; |
5967 }; | 5967 }; |
5968 Register object = ToRegister(instr->object()); | 5968 Register object = ToRegister(instr->object()); |
5969 Register index = ToRegister(instr->index()); | 5969 Register index = ToRegister(instr->index()); |
5970 Register result = ToRegister(instr->result()); | 5970 Register result = ToRegister(instr->result()); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6011 Handle<ScopeInfo> scope_info = instr->scope_info(); | 6011 Handle<ScopeInfo> scope_info = instr->scope_info(); |
6012 __ Push(scope_info); | 6012 __ Push(scope_info); |
6013 __ Push(ToRegister(instr->function())); | 6013 __ Push(ToRegister(instr->function())); |
6014 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6014 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
6015 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6015 RecordSafepoint(Safepoint::kNoLazyDeopt); |
6016 } | 6016 } |
6017 | 6017 |
6018 | 6018 |
6019 | 6019 |
6020 } } // namespace v8::internal | 6020 } } // namespace v8::internal |
OLD | NEW |